From d35bb711f8d3d267b44b4a80c20e31dabf309ae7 Mon Sep 17 00:00:00 2001
From: lu <99954486@qq.com>
Date: 星期二, 14 一月 2025 08:17:18 +0800
Subject: [PATCH] 其它入库

---
 DevApp/Gs.DevApp/DevFrm/BasicData/Frm_Department.cs |   36 +++++++++++++++++-------------------
 1 files changed, 17 insertions(+), 19 deletions(-)

diff --git a/DevApp/Gs.DevApp/DevFrm/BasicData/Frm_Department.cs b/DevApp/Gs.DevApp/DevFrm/BasicData/Frm_Department.cs
index 3822239..66183d3 100644
--- a/DevApp/Gs.DevApp/DevFrm/BasicData/Frm_Department.cs
+++ b/DevApp/Gs.DevApp/DevFrm/BasicData/Frm_Department.cs
@@ -20,8 +20,17 @@
             InitializeComponent();
             toolBarMenu1.btnLoadClick += ToolBarMenu1_btnLoadClick;
             toolBarMenu1.btnQueryClick += ToolBarMenu1_btnQueryClick;
-            
-            Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameter(gridView1);
+            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;
         }
@@ -31,20 +40,6 @@
             _filterList = Gs.DevApp.ToolBox.UtilityHelper.GetDilter(gridView1.Columns);
            Task.Delay(100);
             getPageList(1);
-        }
-
-      
-        /// <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);
         }
 
         /// <summary>
@@ -91,7 +86,7 @@
         private void ToolBarMenu1_btnLoadClick(object sender, EventArgs e)
         {
             if (xtraTabControl1.SelectedTabPageIndex == 1)
-                getModel(lbGuid.Text.Trim(), false, 999);
+                getModel(lbGuid.Text.Trim());
             else
             {
                 _filterList.Clear();
@@ -129,6 +124,7 @@
                     {
                         gcMain.DataSource = dt;
                         gcMain.ForceInitialize();
+                        gridView1.BestFitColumns();
                     }
                     else
                         UtilityHelper.SetDefaultTable(gcMain, gridView1);
@@ -148,14 +144,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 //涓诲缓

--
Gitblit v1.9.3