From a0ae5d6e027bd4b1136829210f22c7ba0db565ab Mon Sep 17 00:00:00 2001
From: lu <99954486@qq.com>
Date: 星期五, 01 十一月 2024 13:56:35 +0800
Subject: [PATCH] 小细节修改

---
 DevApp/Gs.DevApp/DevFrm/QC/Frm_MesQmAql1.cs |   91 +++++++++++++++++----------------------------
 1 files changed, 34 insertions(+), 57 deletions(-)

diff --git a/DevApp/Gs.DevApp/DevFrm/QC/Frm_MesQmAql1.cs b/DevApp/Gs.DevApp/DevFrm/QC/Frm_MesQmAql1.cs
index 129ea9d..c57c9f3 100644
--- a/DevApp/Gs.DevApp/DevFrm/QC/Frm_MesQmAql1.cs
+++ b/DevApp/Gs.DevApp/DevFrm/QC/Frm_MesQmAql1.cs
@@ -1,5 +1,4 @@
 using DevExpress.XtraGrid.Views.Grid;
-using DevExpress.XtraGrid.Views.Grid.ViewInfo;
 using Gs.DevApp.DevFrm.QC.Models;
 using Gs.DevApp.Entity;
 using Gs.DevApp.ToolBox;
@@ -26,11 +25,9 @@
             this.toolBarMenu1.btnLoadClick += ToolBarMenu1_btnLoadClick;
             this.toolBarMenu1.btnDelClick += ToolBarMenu1_btnDelClick1;
             this.toolBarMenu1.btnEscClick += ToolBarMenu1_btnEscClick;
-            this.toolBarMenu1.btnQueryClick += ToolBarMenu1_btnQueryClick;
             toolBarMenu1.btnChkClick += ToolBarMenu1_btnChkClick;
             toolBarMenu1.btnFChkClick += ToolBarMenu1_btnFChkClick;
             toolBarMenu1.btnPiZhunClick += ToolBarMenu1_btnPiZhunClick;
-
             gcMain.MouseDoubleClick += GcMain_MouseDoubleClick;
             getPageList(1, UtilityHelper.GetPageSize());
             pageBar1.PagerEvent += PageBar1_PagerEvent;
@@ -49,14 +46,16 @@
                 e.Graphics.DrawString(str, f, Brushes.Gray, r);
             };
         }
-
+        /// <summary>
+        /// 鎵瑰噯
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
         private void ToolBarMenu1_btnPiZhunClick(object sender, EventArgs e)
         {
-            //鎵瑰噯
             string rowGuid, rowName;
             (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1,
                 lbGuid, txt_sampleSizeNo, gridView1);
-
             try
             {
                 string strJson = UtilityHelper.HttpPost("", _webServiceName + "Approval", JsonConvert.SerializeObject(rowGuid));
@@ -72,7 +71,6 @@
             {
                 ToolBox.MsgHelper.Warning("鎻愮ず锛�" + ex.Message);
             }
-
         }
 
         /// <summary>
@@ -125,17 +123,6 @@
             getPageList(curPage, pageSize);
         }
         /// <summary>
-        /// 鏌ヨ浜嬩欢
-        /// </summary>
-        /// <param name="sender"></param>
-        /// <param name="e"></param>
-        private void ToolBarMenu1_btnQueryClick(object sender, EventArgs e)
-        {
-            Gs.DevApp.UserControl.ShowFilter frm = new Gs.DevApp.UserControl.ShowFilter(gridView1.Columns, _filterList);
-            frm.UpdateParent += Frm_UpdateParent;
-            frm.ShowDialog();
-        }
-        /// <summary>
         /// 鏌ヨ鍥炶皟
         /// </summary>
         /// <param name="sender"></param>
@@ -164,7 +151,7 @@
         private void ToolBarMenu1_btnDelClick1(object sender, EventArgs e)
         {
             string rowGuid = "", rowName = "";
-             (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, lbGuid, txt_sampleSizeNo, gridView1);
+            (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, lbGuid, txt_sampleSizeNo, gridView1);
             if (string.IsNullOrEmpty(rowGuid))
             {
                 ToolBox.MsgHelper.Warning("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�");
@@ -210,7 +197,7 @@
         private void ToolBarMenu1_btnEdtClick(object sender, EventArgs e)
         {
             string rowGuid = "", rowName = "";
-             (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, lbGuid, txt_sampleSizeNo, gridView1);
+            (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, lbGuid, txt_sampleSizeNo, gridView1);
             if (string.IsNullOrEmpty(rowGuid))
             {
                 ToolBox.MsgHelper.Warning("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�");
@@ -227,29 +214,13 @@
         {
             UtilityHelper.JumpToTab(xtraTabControl1, 1);
             lbGuid.Text = "";
-
             List<GridView> gridViews = new List<GridView>();
             gridViews.Add(gvMx1);
+            gridViews.Add(gvMx2);
             UtilityHelper.CleanValueByControl(this.panel1.Controls, true, gridViews);
-            UtilityHelper.SetDefaultTable(gcMx1, gvMx1);
-
+             UtilityHelper.SetDefaultTable(gcMx1, gvMx1);
+            UtilityHelper.SetDefaultTable(gcMx2, gvMx2);
             txt_createDate.Text = DateTime.Now.ToString("G");
-            txt_createDate.Enabled = false;
-
-            txt_ftwoChecked.Text = "False";
-            txt_ftwoChecked.Enabled = false;
-            txt_isenabled.Text = "False";
-            txt_isenabled.Enabled = false;
-            txt_foneChecked.Text = "False";
-            txt_foneChecked.Enabled = false;
-
-            txt_createName.Enabled = false;
-            txt_foneCheckor.Enabled = false;
-            txt_ftwoCheckor.Enabled = false;
-
-            txt_ftwoCheckdate.Enabled = false;
-            txt_foneCheckdate.Enabled = false;
-
             txt_fversion.Text = "1";
         }
         /// <summary>
@@ -273,13 +244,10 @@
                 txt_sampleSizeName.Focus();
                 return;
             }
-
             gvMx1.CloseEditor();
             gvMx1.UpdateCurrentRow();
-
             gvMx2.CloseEditor();
             gvMx2.UpdateCurrentRow();
-
             var qmaql2 = new List<MesQmAql2>();
             for (var i = 0; i < gvMx1.DataRowCount; i++)
             {
@@ -288,19 +256,18 @@
                     qmaql2.Add(new MesQmAql2
                     {
                         Guid = UtilityHelper.ToGuid(row["Guid"].ToString()),
-                        LotFrom =  Convert.ToInt32(row["LotFrom"].ToString()),
-                        LotTo =  Convert.ToInt32(row["LotTo"].ToString()),
-                        FlevelS1 =   row["FlevelS1"].ToString(),
-                        FlevelS2 =  row["FlevelS2"].ToString(),
-                        FlevelS3 =  row["FlevelS3"].ToString(),
-                        FlevelS4 =  row["FlevelS4"].ToString(),
-                        FlevelI =  row["FlevelI"].ToString(),
+                        LotFrom = Convert.ToInt32(row["LotFrom"].ToString()),
+                        LotTo = Convert.ToInt32(row["LotTo"].ToString()),
+                        FlevelS1 = row["FlevelS1"].ToString(),
+                        FlevelS2 = row["FlevelS2"].ToString(),
+                        FlevelS3 = row["FlevelS3"].ToString(),
+                        FlevelS4 = row["FlevelS4"].ToString(),
+                        FlevelI = row["FlevelI"].ToString(),
                         FlevelIi = row["FlevelIi"].ToString(),
                         FlevelIii = row["FlevelIii"].ToString(),
                         Memo = row["Memo"].ToString()
                     });
             }
-
             var qmaql3 = new List<MesQmAql3>();
             for (var i = 0; i < gvMx2.DataRowCount; i++)
             {
@@ -310,7 +277,7 @@
                     {
                         Guid = UtilityHelper.ToGuid(row["Guid"].ToString()),
                         FsampleSizeWord = Convert.ToInt32(row["FsampleSizeWord"].ToString()),
-                        SampleSizeWord =  row["SampleSizeWord"].ToString(),
+                        SampleSizeWord = row["SampleSizeWord"].ToString(),
                         Aql00010 = Convert.ToInt32(row["Aql00010"].ToString()),
                         Aql00015 = Convert.ToInt32(row["Aql00015"].ToString()),
                         Aql00025 = Convert.ToInt32(row["Aql00025"].ToString()),
@@ -330,7 +297,16 @@
                         Memo = row["Memo"].ToString()
                     });
             }
-
+            if (qmaql2.Count <= 0)
+            {
+                Gs.DevApp.ToolBox.MsgHelper.Warning("鏍锋湰閲忓瓙鐮佷笉鑳戒负绌猴紒");
+                return;
+            }
+            if (qmaql3.Count <= 0)
+            {
+                Gs.DevApp.ToolBox.MsgHelper.Warning("鎶芥牱鏂规涓嶈兘涓虹┖锛�");
+                return;
+            }
             var _obj = new MesQmAql1
             {
                 Guid = UtilityHelper.ToGuid(lbGuid.Text.Trim()),
@@ -341,7 +317,7 @@
                 FtwoChecked = false,
                 Isenabled = false,
                 FoneChecked = false,
-                Fversion =  Convert.ToInt32(txt_fversion.Text.Trim()),
+                Fversion = Convert.ToInt32(txt_fversion.Text.Trim()),
                 MesQmAql2s = qmaql2,
                 MesQmAql3s = qmaql3
             };
@@ -354,7 +330,10 @@
                 {
                     lbGuid.Text = _rtn.rtnData;
                     toolBarMenu1.isSetBtn = true;
-                    UtilityHelper.ChangeEnableByControl(this.panel1.Controls, false);
+                    List<GridView> gridViews = new List<GridView>();
+                    gridViews.Add(gvMx1);
+                    gridViews.Add(gvMx2);
+                    UtilityHelper.ChangeEnableByControl(this.panel1.Controls, false, gridViews);
                 }
             }
             catch (Exception ex)
@@ -435,7 +414,6 @@
                     {
                         array.Add(a);
                     }
-
                     DataTable dt = JsonConvert.DeserializeObject<DataTable>(array.ToString());
                     if (dt.Rows.Count > 0)
                     {
@@ -464,8 +442,6 @@
                     {
                         Gs.DevApp.ToolBox.UtilityHelper.SetDefaultTable(gcMx2, gvMx2);
                     }
-
-
                 }
                 else
                     ToolBox.MsgHelper.Warning("鎻愮ず锛�" + _rtn.rtnMsg);
@@ -476,5 +452,6 @@
             }
         }
 
+     
     }
 }
\ No newline at end of file

--
Gitblit v1.9.3