From 9478ddf3051e83eb9a5889ff90688b34dd0f96a5 Mon Sep 17 00:00:00 2001
From: lu <99954486@qq.com>
Date: 星期一, 16 十二月 2024 14:42:55 +0800
Subject: [PATCH] 1

---
 DevApp/Gs.DevApp/DevFrm/Sys/DocNoRule.cs |   68 +++++++++++++++++-----------------
 1 files changed, 34 insertions(+), 34 deletions(-)

diff --git a/DevApp/Gs.DevApp/DevFrm/Sys/DocNoRule.cs b/DevApp/Gs.DevApp/DevFrm/Sys/DocNoRule.cs
index 560814e..5210144 100644
--- a/DevApp/Gs.DevApp/DevFrm/Sys/DocNoRule.cs
+++ b/DevApp/Gs.DevApp/DevFrm/Sys/DocNoRule.cs
@@ -23,8 +23,17 @@
             toolBarMenu1.btnEscClick += ToolBarMenu1_btnEscClick;
             toolBarMenu1.btnChkClick += ToolBarMenu1_btnChkClick;
             toolBarMenu1.btnFChkClick += ToolBarMenu1_btnFChkClick;
-            gcMain.MouseDoubleClick += GcMain_MouseDoubleClick;
-            Gs.DevApp.ToolBox.UtilityHelper.SetGridSear(gridView1, picCheckBox, this, "checkStatus", "");
+            Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameter(gridView1, null, null, "", "", (value) =>
+            {
+                Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 0);
+            });
+            Gs.DevApp.ToolBox.UtilityHelper.SetTabParameter(gridView1, xtraTabControl1, pageBar1, (value) =>
+            {
+                getModel(value);
+            }, (value) =>
+            {
+                getPageList(this.pageBar1.CurrentPage);
+            });
             getPageList(1);
             pageBar1.PagerEvent += PageBar1_PagerEvent;
             getTree();
@@ -40,22 +49,6 @@
                 Txt_flagIncludeDocCode_CheckedChanged;
         }
 
-        /// <summary>
-        ///     鍙屽嚮浜嬩欢
-        /// </summary>
-        /// <param name="sender"></param>
-        /// <param name="e"></param>
-        private void GcMain_MouseDoubleClick(object sender, MouseEventArgs e)
-        {
-            var rowGuid =
-                UtilityHelper.GetCurrentDoubleRow(gridView1, e, "guid");
-            if (!string.IsNullOrEmpty(rowGuid))
-            {
-                getModel(rowGuid, false, 999);
-                txxtItem1.Enabled = txxtItem2.Enabled =
-                    txxtItem3.Enabled = txxtItem4.Enabled = false;
-            }
-        }
 
         /// <summary>
         ///     鍒嗛〉浜嬩欢
@@ -95,7 +88,7 @@
         /// <param name="e"></param>
         private void ToolBarMenu1_btnEscClick(object sender, EventArgs e)
         {
-            UtilityHelper.JumpToTab(xtraTabControl1, 0);
+            Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 1);
         }
 
         /// <summary>
@@ -127,8 +120,10 @@
                 var _rtn = UtilityHelper.ReturnToDynamic(strJson);
                 if (_rtn.rtnCode > 0)
                 {
-                    UtilityHelper.JumpToTab(xtraTabControl1, 0);
-                    getPageList(1);
+                    if (xtraTabControl1.SelectedTabPageIndex == 0)
+                        getPageList(this.pageBar1.CurrentPage);
+                    else
+                        Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 2);
                 }
                 MsgHelper.Warning("鎻愮ず锛�" + _rtn.rtnMsg);
             }
@@ -145,8 +140,13 @@
         /// <param name="e"></param>
         private void ToolBarMenu1_btnLoadClick(object sender, EventArgs e)
         {
-            UtilityHelper.JumpToTab(xtraTabControl1, 0);
-            getPageList(1);
+            if (xtraTabControl1.SelectedTabPageIndex == 1)
+                getModel(lbGuid.Text.Trim());
+            else
+            {
+               
+                getPageList(1);
+            }
         }
 
         /// <summary>
@@ -164,10 +164,9 @@
                 MsgHelper.Warning("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�");
                 return;
             }
-
-            getModel(rowGuid, true, 1);
-            txxtItem1.Enabled = txxtItem2.Enabled = txxtItem3.Enabled =
-                txxtItem4.Enabled = panelControl1.Enabled = true;
+            Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 3);
+            UtilityHelper.ChangeEnableByControl(panel1.Controls, true);
+            txxtItem1.Enabled = txxtItem2.Enabled = txxtItem3.Enabled =txxtItem4.Enabled = panelControl1.Enabled = true;
         }
 
         /// <summary>
@@ -177,8 +176,8 @@
         /// <param name="e"></param>
         private void ToolBarMenu1_btnAddClick(object sender, EventArgs e)
         {
-            UtilityHelper.JumpToTab(xtraTabControl1, 1);
             lbGuid.Text = "";
+            Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 4);
             UtilityHelper.CleanValueByControl(panel1.Controls, true);
             txxtItem1.SelectedIndex = txxtItem2.SelectedIndex =
                 txxtItem3.SelectedIndex = txxtItem4.SelectedIndex = 0;
@@ -282,15 +281,16 @@
             }
         }
 
-        private void getModel(string strGuid, bool isEdit, int tabIdx)
+        private void getModel(string strGuid)
         {
+            bool isEdit = false;
+            if (toolBarMenu1.currentAction == "add") return;
+            if (toolBarMenu1.currentAction == "edit") isEdit = true;
             if (string.IsNullOrEmpty(strGuid))
             {
                 MsgHelper.Warning("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�");
                 return;
             }
-
-            UtilityHelper.JumpToTab(xtraTabControl1, tabIdx);
             var _obj = new
             {
                 guid = strGuid //涓诲缓
@@ -317,6 +317,7 @@
                         txxtItem3.Text = "<" + _ary[2];
                     if (_ary.Length > 3)
                         txxtItem4.Text = "<" + _ary[3];
+                    txxtItem1.Enabled = txxtItem2.Enabled = txxtItem3.Enabled = txxtItem4.Enabled = panelControl1.Enabled = false;
                 }
                 else
                 {
@@ -347,7 +348,6 @@
             txt_docCode.Properties.ValueMember = "docCode"; // 瀹為檯鍊肩殑鍒�
             txt_docCode.Properties.TextEditStyle =TextEditStyles.DisableTextEditor;
         }
-
         private void Txt_flagIncludeDocCode_CheckedChanged(object sender,
             EventArgs e)
         {
@@ -446,9 +446,9 @@
                 if (_rtn.rtnCode > 0)
                 {
                     if (xtraTabControl1.SelectedTabPageIndex == 1)
-                        getModel(lbGuid.Text.Trim(), false, 999);
+                        getModel(lbGuid.Text.Trim());
                     else
-                        getPageList(1);
+                        getPageList(this.pageBar1.CurrentPage);
                 }
             }
             catch (Exception ex)

--
Gitblit v1.9.3