From b54d247ffc912c4af1c96fe05bc6ca1630a77be0 Mon Sep 17 00:00:00 2001
From: lu <99954486@qq.com>
Date: 星期四, 03 四月 2025 23:58:51 +0800
Subject: [PATCH] 1

---
 DevApp/Gs.DevApp/DevFrm/User/User.cs |   47 ++++++++++++++++++++++++-----------------------
 1 files changed, 24 insertions(+), 23 deletions(-)

diff --git a/DevApp/Gs.DevApp/DevFrm/User/User.cs b/DevApp/Gs.DevApp/DevFrm/User/User.cs
index a761da1..cb7f4e8 100644
--- a/DevApp/Gs.DevApp/DevFrm/User/User.cs
+++ b/DevApp/Gs.DevApp/DevFrm/User/User.cs
@@ -25,9 +25,7 @@
             toolBarMenu1.btnDelClick += ToolBarMenu1_btnDelClick1;
             toolBarMenu1.btnEscClick += ToolBarMenu1_btnEscClick;
             toolBarMenu1.btnQueryClick += ToolBarMenu1_btnQueryClick;
-            List<DevExpress.XtraGrid.Views.Grid.GridView> gvList = new List<DevExpress.XtraGrid.Views.Grid.GridView>();
-            gvList.Add(gridView1);
-            Gs.DevApp.ToolBox.UtilityHelper.getGridViewConfig(this.GetType().FullName, gvList);
+            this.toolBarMenu1.getXmlConfig();
             Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameter(gridView1, null, null, "", "", (value) =>
             {
                 Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 0);
@@ -44,7 +42,7 @@
         }
         private void GridView1_ColumnFilterChanged(object sender, EventArgs e)
         {
-            Gs.DevApp.ToolBox.UtilityHelper.GetDilter(gridView1.Columns, gridView1);
+            _filterList = Gs.DevApp.ToolBox.UtilityHelper.GetDilter(gridView1.Columns, gridView1);
             Task.Delay(100);
             getPageList(1);
         }
@@ -69,7 +67,7 @@
             gridView1.ColumnFilterChanged -= GridView1_ColumnFilterChanged;
             gridView1.ActiveFilter.Clear();
             gridView1.ColumnFilterChanged += GridView1_ColumnFilterChanged;
-            var frm = new ShowFilter(gridView1.Columns, _filterList);
+            var frm = new ShowFilter(gridView1.Columns, _filterList, this.GetType().FullName);
             frm.UpdateParent += Frm_UpdateParent;
             frm.ShowDialog();
         }
@@ -167,16 +165,22 @@
         /// <param name="e"></param>
         private void ToolBarMenu1_btnEdtClick(object sender, EventArgs e)
         {
-            string rowGuid, rowName;
-            (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1,
-                lbGuid, txt_userName, gridView1);
+            string rowGuid = "", rowName = "";
+            (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, lbGuid, txt_userName, gridView1);
             if (string.IsNullOrEmpty(rowGuid))
             {
-                MsgHelper.Warning("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�");
+                ToolBox.MsgHelper.Warning("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�");
                 return;
             }
             Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 3);
-            UtilityHelper.ChangeEnableByControl(panel1.Controls, true);
+            if (xtraTabControl1.SelectedTabPageIndex == 1)
+            {
+                getModel(rowGuid);
+            }
+            else
+            {
+                UtilityHelper.ChangeEnableByControl(this.layoutMx1.Controls, true);
+            }
         }
 
         /// <summary>
@@ -188,8 +192,8 @@
         {
             lbGuid.Text = "";
             Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 4);
-            UtilityHelper.CleanValueByControl(panel1.Controls, true);
-            txt_password.Visible = lbPwd.Visible = true;
+            UtilityHelper.CleanValueByControl(this.layoutMx1.Controls, true);
+            txt_password.Enabled = true;
             txt_account.Enabled = txt_password.Enabled = true;
         }
 
@@ -246,7 +250,7 @@
                 {
                     lbGuid.Text = _rtn.rtnData;
                     toolBarMenu1.isSetBtn = true;
-                    UtilityHelper.ChangeEnableByControl(panel1.Controls, false);
+                    UtilityHelper.ChangeEnableByControl(this.layoutMx1.Controls, false);
                 }
             }
             catch (Exception ex)
@@ -273,16 +277,16 @@
                 if (dd.rtnCode > 0)
                 {
                     DataTable dt = dd.rtnData.list;
-                    gcMain.BindingContext = new BindingContext();
+                    gcMain1.BindingContext = new BindingContext();
                     gridView1.ColumnFilterChanged -= GridView1_ColumnFilterChanged;
                     if (dt.Rows.Count > 0)
                     {
-                        gcMain.DataSource = dt;
-                        gcMain.ForceInitialize();
-                        gridView1.BestFitColumns();
+                        gcMain1.DataSource = dt;
+                        gcMain1.ForceInitialize();
+                        gridView1.BestFitColumns(); Gs.DevApp.ToolBox.UtilityHelper.SetGridLayout(gridView1);
                     }
                     else
-                        UtilityHelper.SetDefaultTable(gcMain, gridView1);
+                        UtilityHelper.SetDefaultTable(gcMain1, gridView1);
                     gridView1.ColumnFilterChanged += GridView1_ColumnFilterChanged;
                     pageBar1.TotalPages = dd.rtnData.pages;//鎬婚〉
                     pageBar1.CurrentPage = curPage;//褰撳墠椤�
@@ -297,7 +301,6 @@
             {
                 MsgHelper.Warning("鎻愮ず锛�" + ex.Message);
             }
-
         }
 
         private void getModel(string strGuid)
@@ -323,10 +326,8 @@
                 {
                     var dy = _rtn.rtnData;
                     lbGuid.Text = strGuid;
-                    UtilityHelper.SetValueByObj(panel1.Controls, dy, isEdit);
-                    txt_account.Enabled = txt_password.Enabled =
-                        txt_password.Visible =
-                            lbPwd.Visible = tipPwd.Visible = false;
+                    UtilityHelper.SetValueByObj(this.layoutMx1.Controls, dy, isEdit);
+                    txt_account.Enabled = txt_password.Enabled = txt_password.Enabled = false;
                 }
                 else
                 {

--
Gitblit v1.9.3