From f990a7fbeb2576a5d2e3e97d876fee3a54f376a1 Mon Sep 17 00:00:00 2001
From: lu <99954486@qq.com>
Date: 星期日, 22 十二月 2024 21:59:17 +0800
Subject: [PATCH] 细节

---
 DevApp/Gs.DevApp/DevFrm/QC/Frm_MesSysLookups.cs |   52 +++++++++++++++++++++++-----------------------------
 1 files changed, 23 insertions(+), 29 deletions(-)

diff --git a/DevApp/Gs.DevApp/DevFrm/QC/Frm_MesSysLookups.cs b/DevApp/Gs.DevApp/DevFrm/QC/Frm_MesSysLookups.cs
index 36a57f6..2655c60 100644
--- a/DevApp/Gs.DevApp/DevFrm/QC/Frm_MesSysLookups.cs
+++ b/DevApp/Gs.DevApp/DevFrm/QC/Frm_MesSysLookups.cs
@@ -1,14 +1,11 @@
 using System;
 using System.Collections.Generic;
 using System.Data;
-using System.Drawing;
 using System.Text;
 using System.Threading.Tasks;
 using System.Windows.Forms;
-using DevExpress.RichEdit.Export;
 using DevExpress.XtraEditors;
 using DevExpress.XtraEditors.Controls;
-using DevExpress.XtraGrid.Views.Base.ViewInfo;
 using DevExpress.XtraGrid.Views.Grid;
 using Gs.DevApp.DevFrm.QC.Models;
 using Gs.DevApp.Entity;
@@ -32,11 +29,20 @@
             toolBarMenu1.btnEscClick += ToolBarMenu1_btnEscClick;
             toolBarMenu1.btnChkClick += ToolBarMenu1_btnChkClick;
             toolBarMenu1.btnFChkClick += ToolBarMenu1_btnFChkClick;
-            
-            Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameter(gridView1, picCheckBox, this, "checkStatus", "");
+            Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameterMx(gvMx1);
+            Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameter(gridView1, picCheckBox, this, "checkStatus", "", (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;
-            Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameterMx(gvMx1);
         }
         private void GridView1_ColumnFilterChanged(object sender, EventArgs e)
         {
@@ -44,20 +50,6 @@
             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>
         ///     鍒嗛〉浜嬩欢
         /// </summary>
@@ -94,7 +86,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>
@@ -105,7 +97,7 @@
         private void ToolBarMenu1_btnLoadClick(object sender, EventArgs e)
         {
             if (xtraTabControl1.SelectedTabPageIndex == 1)
-                getModel(lbGuid.Text.Trim(), false, 999);
+                getModel(lbGuid.Text.Trim());
             else
                 getPageList(1);
         }
@@ -125,7 +117,8 @@
                 MsgHelper.Warning("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�");
                 return;
             }
-            getModel(rowGuid, true, 1);
+            Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 3);
+            UtilityHelper.ChangeEnableByControl(panel1.Controls, true);
         }
 
         /// <summary>
@@ -231,15 +224,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 //涓诲缓
@@ -319,7 +313,7 @@
                         JsonConvert.SerializeObject(lst));
                     var _rtn =
                         UtilityHelper.ReturnToDynamic(strJson);
-                    if (_rtn.rtnCode > 0) getModel(lbGuid.Text, true, 1);
+                    if (_rtn.rtnCode > 0) getModel(lbGuid.Text);
 
                     MsgHelper.Warning("鎻愮ず锛�" + _rtn.rtnMsg);
                 }
@@ -371,9 +365,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