Просмотр исходного кода

被隐藏的按钮无法调用点击事件,解决此问题

章政 8 лет назад
Родитель
Сommit
213e0544a9

+ 5 - 3
UAS-MES/FunctionCode/OQC/OQC_PlanMaintain.cs

@@ -93,6 +93,7 @@ namespace UAS_MES.OQC
                         if (!(int.Parse(CheckTypeDGV.Rows[i].Cells["oi_sampleqty"].Value.ToString()) > int.Parse(ob_batchqty.Text == "" ? "0" : ob_batchqty.Text)))
                         {
                             //ID不为0的时候进行更新操作,ID为0的时候进行插入操作
+                            Console.WriteLine(CheckTypeDGV.Rows[i].Cells["oi_id"].Value.ToString());
                             if (CheckTypeDGV.Rows[i].Cells["oi_id"].Value.ToString() != "0")
                             {
                                 ci_kind_update.Add(CheckTypeDGV.Rows[i].Cells["ci_kind"].Value.ToString());
@@ -152,7 +153,7 @@ namespace UAS_MES.OQC
         {
             if (ob_aqlcode.Text != "" || ob_maxngacceptqty.Text != "")
             {
-                SaveConfiguration.PerformClick();
+                SaveConfiguration_Click(sender, e);
                 Checkob_maxngacceptqty();
                 GetBatch.PerformClick();
             }
@@ -165,7 +166,7 @@ namespace UAS_MES.OQC
         {
             if (ob_maxngacceptqty.Text == "0" || ob_maxngacceptqty.Text == "" || int.Parse(ob_maxngacceptqty.Text) < 0)
             {
-                OperateResult.AppendText(">>最大不合格允通过数必须大于0或者为空\n", Color.Red);
+                OperateResult.AppendText(">>最大不合格允通过数必须大于0\n", Color.Red);
                 ob_maxngacceptqty.Text = null;
             }
             else
@@ -175,7 +176,8 @@ namespace UAS_MES.OQC
                 {
                     OperateResult.AppendText(">>保存成功\n", Color.Green);
                 }
-                else {
+                else
+                {
                     OperateResult.AppendText(">>保存失败\n", Color.Red);
                 }
             }

+ 94 - 94
UAS-MES/FunctionCode/OQC/OQC_PlanMaintain.designer.cs

@@ -41,13 +41,17 @@
             this.ob_aqlcode_label = new System.Windows.Forms.Label();
             this.label1 = new System.Windows.Forms.Label();
             this.pr_detail_label = new System.Windows.Forms.Label();
+            this.panel1 = new System.Windows.Forms.Panel();
+            this.ad_qty_label = new System.Windows.Forms.Label();
+            this.ad_qty = new UAS_MES.CustomControl.TextBoxWithIcon.TextBoxNumOnly();
+            this.ob_remark = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
             this.ob_maxngacceptqty = new UAS_MES.CustomControl.TextBoxWithIcon.TextBoxNumOnly();
             this.ob_aqlcode = new UAS_MES.CustomControl.TextBoxWithIcon.SearchTextBox();
             this.pr_detail = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
             this.ob_projectcode = new UAS_MES.CustomControl.TextBoxWithIcon.SearchTextBox();
+            this.ob_status = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
             this.OperateResult = new UAS_MES.CustomControl.RichText.RichTextAutoBottom();
             this.Clean = new UAS_MES.CustomControl.ButtonUtil.NormalButton();
-            this.ob_remark = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
             this.GetBatch = new UAS_MES.CustomControl.ButtonUtil.NormalButton();
             this.SaveConfiguration = new UAS_MES.CustomControl.ButtonUtil.NormalButton();
             this.RefreshConfiguration = new UAS_MES.CustomControl.ButtonUtil.NormalButton();
@@ -63,13 +67,9 @@
             this.obd_outboxcode = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
             this.ob_checkno = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
             this.ms_sncode = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
-            this.ob_status = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
-            this.panel1 = new System.Windows.Forms.Panel();
-            this.ad_qty = new UAS_MES.CustomControl.TextBoxWithIcon.TextBoxNumOnly();
-            this.ad_qty_label = new System.Windows.Forms.Label();
             this.panel2.SuspendLayout();
-            ((System.ComponentModel.ISupportInitialize)(this.CheckTypeDGV)).BeginInit();
             this.panel1.SuspendLayout();
+            ((System.ComponentModel.ISupportInitialize)(this.CheckTypeDGV)).BeginInit();
             this.SuspendLayout();
             // 
             // ms_sncode_label
@@ -101,7 +101,7 @@
             this.panel2.Controls.Add(this.label2);
             this.panel2.Dock = System.Windows.Forms.DockStyle.Top;
             this.panel2.Location = new System.Drawing.Point(0, 0);
-            this.panel2.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.panel2.Margin = new System.Windows.Forms.Padding(4);
             this.panel2.Name = "panel2";
             this.panel2.Size = new System.Drawing.Size(1363, 36);
             this.panel2.TabIndex = 156;
@@ -206,10 +206,64 @@
             this.pr_detail_label.TabIndex = 188;
             this.pr_detail_label.Text = "产品名称";
             // 
+            // panel1
+            // 
+            this.panel1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
+            this.panel1.Controls.Add(this.ad_qty);
+            this.panel1.Controls.Add(this.ad_qty_label);
+            this.panel1.Controls.Add(this.ob_remark);
+            this.panel1.Controls.Add(this.ob_maxngacceptqty);
+            this.panel1.Controls.Add(this.ob_remark_label);
+            this.panel1.Controls.Add(this.ob_aqlcode);
+            this.panel1.Controls.Add(this.ob_aqlcode_label);
+            this.panel1.Controls.Add(this.ob_maxacceptqty_label);
+            this.panel1.Location = new System.Drawing.Point(33, 162);
+            this.panel1.Margin = new System.Windows.Forms.Padding(4);
+            this.panel1.Name = "panel1";
+            this.panel1.Size = new System.Drawing.Size(993, 124);
+            this.panel1.TabIndex = 193;
+            // 
+            // ad_qty_label
+            // 
+            this.ad_qty_label.AutoSize = true;
+            this.ad_qty_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.ad_qty_label.Location = new System.Drawing.Point(16, 79);
+            this.ad_qty_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.ad_qty_label.Name = "ad_qty_label";
+            this.ad_qty_label.Size = new System.Drawing.Size(72, 27);
+            this.ad_qty_label.TabIndex = 193;
+            this.ad_qty_label.Text = "样本数";
+            // 
+            // ad_qty
+            // 
+            this.ad_qty.Location = new System.Drawing.Point(100, 79);
+            this.ad_qty.Margin = new System.Windows.Forms.Padding(4);
+            this.ad_qty.Name = "ad_qty";
+            this.ad_qty.Size = new System.Drawing.Size(204, 25);
+            this.ad_qty.TabIndex = 194;
+            this.ad_qty.Text = "0";
+            this.ad_qty.TextChanged += new System.EventHandler(this.ad_qty_TextChanged_1);
+            // 
+            // ob_remark
+            // 
+            this.ob_remark.AllPower = null;
+            this.ob_remark.BackColor = System.Drawing.Color.White;
+            this.ob_remark.ID = null;
+            this.ob_remark.Location = new System.Drawing.Point(585, 79);
+            this.ob_remark.Margin = new System.Windows.Forms.Padding(4);
+            this.ob_remark.Name = "ob_remark";
+            this.ob_remark.Power = null;
+            this.ob_remark.Size = new System.Drawing.Size(224, 25);
+            this.ob_remark.Str = null;
+            this.ob_remark.Str1 = null;
+            this.ob_remark.Str2 = null;
+            this.ob_remark.TabIndex = 173;
+            this.ob_remark.Tag = "NoAuto";
+            // 
             // ob_maxngacceptqty
             // 
             this.ob_maxngacceptqty.Location = new System.Drawing.Point(585, 22);
-            this.ob_maxngacceptqty.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.ob_maxngacceptqty.Margin = new System.Windows.Forms.Padding(4);
             this.ob_maxngacceptqty.Name = "ob_maxngacceptqty";
             this.ob_maxngacceptqty.Size = new System.Drawing.Size(224, 25);
             this.ob_maxngacceptqty.TabIndex = 192;
@@ -272,11 +326,29 @@
             this.ob_projectcode.Tag = "pr_code";
             this.ob_projectcode.TextBoxEnable = false;
             // 
+            // ob_status
+            // 
+            this.ob_status.AllPower = null;
+            this.ob_status.BackColor = System.Drawing.Color.White;
+            this.ob_status.Enabled = false;
+            this.ob_status.ID = null;
+            this.ob_status.Location = new System.Drawing.Point(1167, 159);
+            this.ob_status.Margin = new System.Windows.Forms.Padding(4);
+            this.ob_status.Name = "ob_status";
+            this.ob_status.Power = null;
+            this.ob_status.Size = new System.Drawing.Size(180, 25);
+            this.ob_status.Str = null;
+            this.ob_status.Str1 = null;
+            this.ob_status.Str2 = null;
+            this.ob_status.TabIndex = 179;
+            this.ob_status.Tag = "NoAuto";
+            this.ob_status.Visible = false;
+            // 
             // OperateResult
             // 
             this.OperateResult.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.OperateResult.Location = new System.Drawing.Point(1036, 315);
-            this.OperateResult.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.OperateResult.Margin = new System.Windows.Forms.Padding(4);
             this.OperateResult.Name = "OperateResult";
             this.OperateResult.Size = new System.Drawing.Size(309, 396);
             this.OperateResult.TabIndex = 177;
@@ -291,7 +363,7 @@
             this.Clean.Image = ((System.Drawing.Image)(resources.GetObject("Clean.Image")));
             this.Clean.IsShowBorder = true;
             this.Clean.Location = new System.Drawing.Point(1145, 720);
-            this.Clean.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.Clean.Margin = new System.Windows.Forms.Padding(4);
             this.Clean.MoveImage = ((System.Drawing.Image)(resources.GetObject("Clean.MoveImage")));
             this.Clean.Name = "Clean";
             this.Clean.NormalImage = ((System.Drawing.Image)(resources.GetObject("Clean.NormalImage")));
@@ -303,22 +375,6 @@
             this.Clean.UseVisualStyleBackColor = true;
             this.Clean.Click += new System.EventHandler(this.Clean_Click);
             // 
-            // ob_remark
-            // 
-            this.ob_remark.AllPower = null;
-            this.ob_remark.BackColor = System.Drawing.Color.White;
-            this.ob_remark.ID = null;
-            this.ob_remark.Location = new System.Drawing.Point(585, 79);
-            this.ob_remark.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
-            this.ob_remark.Name = "ob_remark";
-            this.ob_remark.Power = null;
-            this.ob_remark.Size = new System.Drawing.Size(224, 25);
-            this.ob_remark.Str = null;
-            this.ob_remark.Str1 = null;
-            this.ob_remark.Str2 = null;
-            this.ob_remark.TabIndex = 173;
-            this.ob_remark.Tag = "NoAuto";
-            // 
             // GetBatch
             // 
             this.GetBatch.AllPower = "ifall";
@@ -328,7 +384,7 @@
             this.GetBatch.Image = ((System.Drawing.Image)(resources.GetObject("GetBatch.Image")));
             this.GetBatch.IsShowBorder = true;
             this.GetBatch.Location = new System.Drawing.Point(1036, 64);
-            this.GetBatch.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.GetBatch.Margin = new System.Windows.Forms.Padding(4);
             this.GetBatch.MoveImage = ((System.Drawing.Image)(resources.GetObject("GetBatch.MoveImage")));
             this.GetBatch.Name = "GetBatch";
             this.GetBatch.NormalImage = ((System.Drawing.Image)(resources.GetObject("GetBatch.NormalImage")));
@@ -349,7 +405,7 @@
             this.SaveConfiguration.Image = ((System.Drawing.Image)(resources.GetObject("SaveConfiguration.Image")));
             this.SaveConfiguration.IsShowBorder = true;
             this.SaveConfiguration.Location = new System.Drawing.Point(1159, 192);
-            this.SaveConfiguration.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.SaveConfiguration.Margin = new System.Windows.Forms.Padding(4);
             this.SaveConfiguration.MoveImage = ((System.Drawing.Image)(resources.GetObject("SaveConfiguration.MoveImage")));
             this.SaveConfiguration.Name = "SaveConfiguration";
             this.SaveConfiguration.NormalImage = ((System.Drawing.Image)(resources.GetObject("SaveConfiguration.NormalImage")));
@@ -371,7 +427,7 @@
             this.RefreshConfiguration.Image = ((System.Drawing.Image)(resources.GetObject("RefreshConfiguration.Image")));
             this.RefreshConfiguration.IsShowBorder = true;
             this.RefreshConfiguration.Location = new System.Drawing.Point(1257, 192);
-            this.RefreshConfiguration.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.RefreshConfiguration.Margin = new System.Windows.Forms.Padding(4);
             this.RefreshConfiguration.MoveImage = ((System.Drawing.Image)(resources.GetObject("RefreshConfiguration.MoveImage")));
             this.RefreshConfiguration.Name = "RefreshConfiguration";
             this.RefreshConfiguration.NormalImage = ((System.Drawing.Image)(resources.GetObject("RefreshConfiguration.NormalImage")));
@@ -393,7 +449,7 @@
             this.Save.Image = ((System.Drawing.Image)(resources.GetObject("Save.Image")));
             this.Save.IsShowBorder = true;
             this.Save.Location = new System.Drawing.Point(551, 732);
-            this.Save.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.Save.Margin = new System.Windows.Forms.Padding(4);
             this.Save.MoveImage = ((System.Drawing.Image)(resources.GetObject("Save.MoveImage")));
             this.Save.Name = "Save";
             this.Save.NormalImage = ((System.Drawing.Image)(resources.GetObject("Save.NormalImage")));
@@ -416,7 +472,7 @@
             this.ci_kind,
             this.oi_sampleqty});
             this.CheckTypeDGV.Location = new System.Drawing.Point(33, 315);
-            this.CheckTypeDGV.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.CheckTypeDGV.Margin = new System.Windows.Forms.Padding(4);
             this.CheckTypeDGV.Name = "CheckTypeDGV";
             this.CheckTypeDGV.RowTemplate.Height = 23;
             this.CheckTypeDGV.Size = new System.Drawing.Size(993, 398);
@@ -472,7 +528,7 @@
             this.ob_prodcode.Enabled = false;
             this.ob_prodcode.ID = null;
             this.ob_prodcode.Location = new System.Drawing.Point(135, 110);
-            this.ob_prodcode.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.ob_prodcode.Margin = new System.Windows.Forms.Padding(4);
             this.ob_prodcode.Name = "ob_prodcode";
             this.ob_prodcode.Power = null;
             this.ob_prodcode.Size = new System.Drawing.Size(180, 25);
@@ -489,7 +545,7 @@
             this.ob_batchqty.Enabled = false;
             this.ob_batchqty.ID = null;
             this.ob_batchqty.Location = new System.Drawing.Point(811, 110);
-            this.ob_batchqty.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.ob_batchqty.Margin = new System.Windows.Forms.Padding(4);
             this.ob_batchqty.Name = "ob_batchqty";
             this.ob_batchqty.Power = null;
             this.ob_batchqty.ReadOnly = true;
@@ -506,7 +562,7 @@
             this.obd_outboxcode.BackColor = System.Drawing.Color.White;
             this.obd_outboxcode.ID = null;
             this.obd_outboxcode.Location = new System.Drawing.Point(463, 61);
-            this.obd_outboxcode.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.obd_outboxcode.Margin = new System.Windows.Forms.Padding(4);
             this.obd_outboxcode.Name = "obd_outboxcode";
             this.obd_outboxcode.Power = null;
             this.obd_outboxcode.Size = new System.Drawing.Size(180, 25);
@@ -523,7 +579,7 @@
             this.ob_checkno.BackColor = System.Drawing.Color.White;
             this.ob_checkno.ID = null;
             this.ob_checkno.Location = new System.Drawing.Point(135, 59);
-            this.ob_checkno.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.ob_checkno.Margin = new System.Windows.Forms.Padding(4);
             this.ob_checkno.Name = "ob_checkno";
             this.ob_checkno.Power = null;
             this.ob_checkno.Size = new System.Drawing.Size(180, 25);
@@ -540,7 +596,7 @@
             this.ms_sncode.BackColor = System.Drawing.Color.White;
             this.ms_sncode.ID = null;
             this.ms_sncode.Location = new System.Drawing.Point(811, 64);
-            this.ms_sncode.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.ms_sncode.Margin = new System.Windows.Forms.Padding(4);
             this.ms_sncode.Name = "ms_sncode";
             this.ms_sncode.Power = null;
             this.ms_sncode.Size = new System.Drawing.Size(180, 25);
@@ -551,62 +607,6 @@
             this.ms_sncode.Tag = "NoAuto";
             this.ms_sncode.KeyDown += new System.Windows.Forms.KeyEventHandler(this.ms_sncode_KeyDown);
             // 
-            // ob_status
-            // 
-            this.ob_status.AllPower = null;
-            this.ob_status.BackColor = System.Drawing.Color.White;
-            this.ob_status.Enabled = false;
-            this.ob_status.ID = null;
-            this.ob_status.Location = new System.Drawing.Point(1167, 159);
-            this.ob_status.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
-            this.ob_status.Name = "ob_status";
-            this.ob_status.Power = null;
-            this.ob_status.Size = new System.Drawing.Size(180, 25);
-            this.ob_status.Str = null;
-            this.ob_status.Str1 = null;
-            this.ob_status.Str2 = null;
-            this.ob_status.TabIndex = 179;
-            this.ob_status.Tag = "NoAuto";
-            this.ob_status.Visible = false;
-            // 
-            // panel1
-            // 
-            this.panel1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
-            this.panel1.Controls.Add(this.ad_qty);
-            this.panel1.Controls.Add(this.ad_qty_label);
-            this.panel1.Controls.Add(this.ob_remark);
-            this.panel1.Controls.Add(this.ob_maxngacceptqty);
-            this.panel1.Controls.Add(this.ob_remark_label);
-            this.panel1.Controls.Add(this.ob_aqlcode);
-            this.panel1.Controls.Add(this.ob_aqlcode_label);
-            this.panel1.Controls.Add(this.ob_maxacceptqty_label);
-            this.panel1.Location = new System.Drawing.Point(33, 162);
-            this.panel1.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
-            this.panel1.Name = "panel1";
-            this.panel1.Size = new System.Drawing.Size(993, 124);
-            this.panel1.TabIndex = 193;
-            // 
-            // ad_qty
-            // 
-            this.ad_qty.Location = new System.Drawing.Point(100, 79);
-            this.ad_qty.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
-            this.ad_qty.Name = "ad_qty";
-            this.ad_qty.Size = new System.Drawing.Size(204, 25);
-            this.ad_qty.TabIndex = 194;
-            this.ad_qty.Text = "0";
-            this.ad_qty.TextChanged += new System.EventHandler(this.ad_qty_TextChanged_1);
-            // 
-            // ad_qty_label
-            // 
-            this.ad_qty_label.AutoSize = true;
-            this.ad_qty_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ad_qty_label.Location = new System.Drawing.Point(16, 79);
-            this.ad_qty_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
-            this.ad_qty_label.Name = "ad_qty_label";
-            this.ad_qty_label.Size = new System.Drawing.Size(72, 27);
-            this.ad_qty_label.TabIndex = 193;
-            this.ad_qty_label.Text = "样本数";
-            // 
             // OQC_PlanMaintain
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
@@ -637,7 +637,7 @@
             this.Controls.Add(this.ms_sncode);
             this.Controls.Add(this.ms_sncode_label);
             this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
-            this.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.Margin = new System.Windows.Forms.Padding(4);
             this.Name = "OQC_PlanMaintain";
             this.Tag = "OQC!PlanMaintain";
             this.Text = "抽样计划维护";
@@ -645,9 +645,9 @@
             this.SizeChanged += new System.EventHandler(this.抽样计划维护_SizeChanged);
             this.panel2.ResumeLayout(true);
             this.panel2.PerformLayout();
-            ((System.ComponentModel.ISupportInitialize)(this.CheckTypeDGV)).EndInit();
             this.panel1.ResumeLayout(true);
             this.panel1.PerformLayout();
+            ((System.ComponentModel.ISupportInitialize)(this.CheckTypeDGV)).EndInit();
             this.ResumeLayout(true);
             this.PerformLayout();