章政 8 år sedan
förälder
incheckning
251d468b63

+ 4 - 2
UAS-MES/FunctionCode/OQC/OQC_PlanMaintain.cs

@@ -61,6 +61,8 @@ namespace UAS_MES.OQC
                 {
                     if (ErrorMessage == "")
                     {
+                        ad_qty.Text = "";
+                        ob_maxngacceptqty.Text = "";
                         BaseUtil.SetFormValue(Controls, dt[0]);
                         BaseUtil.FillDgvWithDataTable(CheckTypeDGV, dt[1]);
                         ob_aqlcode.Text = "";
@@ -147,7 +149,7 @@ namespace UAS_MES.OQC
         //对于最大不合格允通过数的校验
         private bool Checkob_maxngacceptqty()
         {
-            if (int.Parse(ob_maxngacceptqty.Text) < 0)
+            if (int.Parse(ob_maxngacceptqty.Text==""?"0":ob_maxngacceptqty.Text) < 0)
             {
                 OperateResult.AppendText(">>最大不合格允通过数必须大于等于0\n", Color.Red);
                 ob_maxngacceptqty.Text = null;
@@ -236,7 +238,7 @@ namespace UAS_MES.OQC
             sql.Append(" QUA_ProjectDetail on pd_prid=pr_id  left join QUA_CheckItem on pd_ciid=ci_id ");
             sql.Append("left join OQCITEMS on oi_checkno ='" + ob_checkno.Text + "' and oi_projectcode='" + ob_projectcode.Text + "' ");
             sql.Append("and oi_projectcode = pr_code and oi_checkkind = ci_kind where  pr_code='" + ob_projectcode.Text + "'  group by ci_kind");
-            DataTable dt = (DataTable)dh.ExecuteSql(sql.GetString(),"select");
+            DataTable dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
             BaseUtil.FillDgvWithDataTable(CheckTypeDGV, dt);
         }
     }

+ 19 - 12
UAS-MES/FunctionCode/OQC/OQC_PlanMaintain.designer.cs

@@ -45,7 +45,6 @@
             this.ad_qty = new UAS_MES.CustomControl.TextBoxWithIcon.TextBoxNumOnly();
             this.ad_qty_label = new System.Windows.Forms.Label();
             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();
@@ -66,6 +65,7 @@
             this.ob_checkno = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
             this.ms_sncode = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
             this.ChooseAll = new UAS_MES.CustomControl.ButtonUtil.ChooseAllButton();
+            this.ob_maxngacceptqty = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
             this.panel2.SuspendLayout();
             this.panel1.SuspendLayout();
             ((System.ComponentModel.ISupportInitialize)(this.CheckTypeDGV)).BeginInit();
@@ -208,10 +208,10 @@
             // panel1
             // 
             this.panel1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
+            this.panel1.Controls.Add(this.ob_maxngacceptqty);
             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);
@@ -259,15 +259,6 @@
             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);
-            this.ob_maxngacceptqty.Name = "ob_maxngacceptqty";
-            this.ob_maxngacceptqty.Size = new System.Drawing.Size(224, 25);
-            this.ob_maxngacceptqty.TabIndex = 192;
-            this.ob_maxngacceptqty.Text = "0";
-            // 
             // ob_aqlcode
             // 
             this.ob_aqlcode.AllPower = null;
@@ -572,6 +563,22 @@
             this.ChooseAll.Text = "全选";
             this.ChooseAll.UseVisualStyleBackColor = true;
             // 
+            // ob_maxngacceptqty
+            // 
+            this.ob_maxngacceptqty.AllPower = null;
+            this.ob_maxngacceptqty.BackColor = System.Drawing.Color.White;
+            this.ob_maxngacceptqty.ID = null;
+            this.ob_maxngacceptqty.Location = new System.Drawing.Point(585, 22);
+            this.ob_maxngacceptqty.Margin = new System.Windows.Forms.Padding(4);
+            this.ob_maxngacceptqty.Name = "ob_maxngacceptqty";
+            this.ob_maxngacceptqty.Power = null;
+            this.ob_maxngacceptqty.Size = new System.Drawing.Size(224, 25);
+            this.ob_maxngacceptqty.Str = null;
+            this.ob_maxngacceptqty.Str1 = null;
+            this.ob_maxngacceptqty.Str2 = null;
+            this.ob_maxngacceptqty.TabIndex = 195;
+            this.ob_maxngacceptqty.Tag = "NoAuto";
+            // 
             // OQC_PlanMaintain
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
@@ -645,7 +652,6 @@
         private System.Windows.Forms.Label pr_detail_label;
         private CustomControl.TextBoxWithIcon.EnterTextBox pr_detail;
         private CustomControl.TextBoxWithIcon.SearchTextBox ob_aqlcode;
-        private CustomControl.TextBoxWithIcon.TextBoxNumOnly ob_maxngacceptqty;
         private CustomControl.TextBoxWithIcon.EnterTextBox ob_status;
         private System.Windows.Forms.Panel panel1;
         private System.Windows.Forms.Label ad_qty_label;
@@ -656,5 +662,6 @@
         private System.Windows.Forms.DataGridViewTextBoxColumn ci_kind;
         private System.Windows.Forms.DataGridViewTextBoxColumn oi_sampleqty;
         private CustomControl.ButtonUtil.ChooseAllButton ChooseAll;
+        private CustomControl.TextBoxWithIcon.EnterTextBox ob_maxngacceptqty;
     }
 }