From d70880a3d9ae6c9f99ec380ccd16f5524bb622e6 Mon Sep 17 00:00:00 2001
From: lu <99954486@qq.com>
Date: 星期六, 05 四月 2025 09:06:31 +0800
Subject: [PATCH] 修改按钮状态

---
 DevApp/Gs.DevApp/DevFrm/QC/Jyxm.cs |   24 +++++++++++++++++-------
 1 files changed, 17 insertions(+), 7 deletions(-)

diff --git a/DevApp/Gs.DevApp/DevFrm/QC/Jyxm.cs b/DevApp/Gs.DevApp/DevFrm/QC/Jyxm.cs
index dd8da99..9fcc701 100644
--- a/DevApp/Gs.DevApp/DevFrm/QC/Jyxm.cs
+++ b/DevApp/Gs.DevApp/DevFrm/QC/Jyxm.cs
@@ -24,8 +24,6 @@
         {
             InitializeComponent();
             strType = _strType;
-
-
         }
         protected override void OnCreateControl()
         {
@@ -40,10 +38,15 @@
             toolBarMenu1.btnQueryClick += ToolBarMenu1_btnQueryClick;
             toolBarMenu1.btnChkClick += ToolBarMenu1_btnChkClick;
             toolBarMenu1.btnPiZhunClick += ToolBarMenu1_btnPiZhunClick;
+            //iqc鐨勬牱鍝佹暟閲忛粯璁�5锛屽惁鍒�1
             decimal _dfValue = 1;
             if (strType == "iqc")
                 _dfValue = 5;
-            this.gvMx1.InitNewRow += (s, e) => { this.gvMx1.SetRowCellValue(e.RowHandle, "ypsl", _dfValue); };
+            this.gvMx1.InitNewRow += (s, e) => { 
+                this.gvMx1.SetRowCellValue(e.RowHandle, "ypsl", _dfValue);
+                int newIndex = gvMx1.DataRowCount + 1;
+                this.gvMx1.SetRowCellValue(e.RowHandle, "forder", newIndex);
+            };
             this.toolBarMenu1.getXmlConfig();
             Form parentForm = this.FindForm();
             Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameterMx(gvMx1);
@@ -57,7 +60,7 @@
             }, (value) =>
             {
                 getPageList(this.pageBar1.CurrentPage);
-            });
+            }, lbGuid);
             getPageList(1);
             pageBar1.PagerEvent += PageBar1_PagerEvent;
             _setIno();
@@ -82,13 +85,12 @@
                 frm.ShowDialog();
             };
             btnSave.Click += BtnSave_Click;
-
         }
 
 
         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);
         }
@@ -110,10 +112,16 @@
         /// <param name="e"></param>
         private void ToolBarMenu1_btnQueryClick(object sender, EventArgs e)
         {
+            Form parentForm;
+            if (this.Parent is Form)
+                parentForm = this.Parent as Form;
+            else
+                parentForm = this.Parent.Parent as Form;
+
             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, parentForm.GetType().FullName);
             frm.UpdateParent += Frm_UpdateParent;
             frm.ShowDialog();
         }
@@ -373,6 +381,8 @@
                         gridViews.Add(gvMx1);
                         gridViews.Add(gridView2);
                         UtilityHelper.ChangeEnableByControl(this.layoutMx1.Controls, false, gridViews);
+                        toolBarMenu1.currentAction = "";
+                        Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 6);
                     }
                 }
                 catch (Exception ex)

--
Gitblit v1.9.3