Browse Source

修改抽样计划维护使用实际采集批数量

章政 8 years ago
parent
commit
0343421b46

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

@@ -100,7 +100,7 @@ namespace UAS_MES.OQC
                     //用户勾选的数据才进行操作
                     //用户勾选的数据才进行操作
                     if (CheckTypeDGV.Rows[i].Cells["Choose"].FormattedValue.ToString() == "True")
                     if (CheckTypeDGV.Rows[i].Cells["Choose"].FormattedValue.ToString() == "True")
                     {
                     {
-                        if (!(int.Parse(CheckTypeDGV.Rows[i].Cells["oi_sampleqty"].Value.ToString()) > int.Parse(ob_batchqty.Text == "" ? "0" : ob_batchqty.Text)))
+                        if (!(int.Parse(CheckTypeDGV.Rows[i].Cells["oi_sampleqty"].Value.ToString()) > int.Parse(ob_nowcheckqty.Text == "" ? "0" : ob_nowcheckqty.Text)))
                         {
                         {
                             oi_id.Add(CheckTypeDGV.Rows[i].Cells["oi_id"].Value.ToString());
                             oi_id.Add(CheckTypeDGV.Rows[i].Cells["oi_id"].Value.ToString());
                             ci_kind.Add(CheckTypeDGV.Rows[i].Cells["ci_kind"].Value.ToString());
                             ci_kind.Add(CheckTypeDGV.Rows[i].Cells["ci_kind"].Value.ToString());
@@ -119,7 +119,7 @@ namespace UAS_MES.OQC
                 {
                 {
                     sql.Clear();
                     sql.Clear();
                     sql.Append("insert into OQCItems(oi_id,oi_checkno, oi_projectcode,oi_batchqty ,oi_checkkind,oi_sampleqty,oi_itemcode) select ");
                     sql.Append("insert into OQCItems(oi_id,oi_checkno, oi_projectcode,oi_batchqty ,oi_checkkind,oi_sampleqty,oi_itemcode) select ");
-                    sql.Append("OQCItems_seq.nextval,'" + ob_checkno.Text + "','" + ob_projectcode.Text + "','" + ob_batchqty.Text + "',:ci_kind,");
+                    sql.Append("OQCItems_seq.nextval,'" + ob_checkno.Text + "','" + ob_projectcode.Text + "','" + ob_nowcheckqty.Text + "',:ci_kind,");
                     sql.Append(":oi_sampleqty,ci_code from QUA_PROJECT left join QUA_PROJECTDETAIL on pd_prid=pr_id ");
                     sql.Append(":oi_sampleqty,ci_code from QUA_PROJECT left join QUA_PROJECTDETAIL on pd_prid=pr_id ");
                     sql.Append("LEFT JOIN QUA_CHECKITEM ON PD_CIID=CI_ID  where pr_code='" + ob_projectcode.Text + "' and ci_kind=:ci_kind1");
                     sql.Append("LEFT JOIN QUA_CHECKITEM ON PD_CIID=CI_ID  where pr_code='" + ob_projectcode.Text + "' and ci_kind=:ci_kind1");
                     dh.BatchInsert(sql.GetString(), new string[] { "ci_kind", "oi_sampleqty", "ci_kind1" }, ci_kind.ToArray(), oi_sampleqty.ToArray(), ci_kind.ToArray());
                     dh.BatchInsert(sql.GetString(), new string[] { "ci_kind", "oi_sampleqty", "ci_kind1" }, ci_kind.ToArray(), oi_sampleqty.ToArray(), ci_kind.ToArray());
@@ -201,7 +201,7 @@ namespace UAS_MES.OQC
                 {
                 {
                     for (int i = 0; i < dt.Rows.Count; i++)
                     for (int i = 0; i < dt.Rows.Count; i++)
                     {
                     {
-                        int batchqty = int.Parse(ob_batchqty.Text == "" ? "0" : ob_batchqty.Text);
+                        int batchqty = int.Parse(ob_nowcheckqty.Text == "" ? "0" : ob_nowcheckqty.Text);
                         int minqty = int.Parse(dt.Rows[i]["ad_minqty"].ToString());
                         int minqty = int.Parse(dt.Rows[i]["ad_minqty"].ToString());
                         int maxqty = int.Parse(dt.Rows[i]["ad_maxqty"].ToString());
                         int maxqty = int.Parse(dt.Rows[i]["ad_maxqty"].ToString());
                         if (batchqty > minqty && batchqty <= maxqty)
                         if (batchqty > minqty && batchqty <= maxqty)

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

@@ -61,7 +61,7 @@
             this.ci_kind = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.ci_kind = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.oi_sampleqty = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.oi_sampleqty = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.ob_prodcode = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
             this.ob_prodcode = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
-            this.ob_batchqty = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
+            this.ob_nowcheckqty = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
             this.obd_outboxcode = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
             this.obd_outboxcode = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
             this.ob_checkno = 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.ms_sncode = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
@@ -493,23 +493,23 @@
             this.ob_prodcode.TabIndex = 164;
             this.ob_prodcode.TabIndex = 164;
             this.ob_prodcode.Tag = "NoAuto";
             this.ob_prodcode.Tag = "NoAuto";
             // 
             // 
-            // ob_batchqty
-            // 
-            this.ob_batchqty.AllPower = null;
-            this.ob_batchqty.BackColor = System.Drawing.Color.White;
-            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);
-            this.ob_batchqty.Name = "ob_batchqty";
-            this.ob_batchqty.Power = null;
-            this.ob_batchqty.ReadOnly = true;
-            this.ob_batchqty.Size = new System.Drawing.Size(180, 25);
-            this.ob_batchqty.Str = null;
-            this.ob_batchqty.Str1 = null;
-            this.ob_batchqty.Str2 = null;
-            this.ob_batchqty.TabIndex = 160;
-            this.ob_batchqty.Tag = "NoAuto";
+            // ob_nowcheckqty
+            // 
+            this.ob_nowcheckqty.AllPower = null;
+            this.ob_nowcheckqty.BackColor = System.Drawing.Color.White;
+            this.ob_nowcheckqty.Enabled = false;
+            this.ob_nowcheckqty.ID = null;
+            this.ob_nowcheckqty.Location = new System.Drawing.Point(811, 110);
+            this.ob_nowcheckqty.Margin = new System.Windows.Forms.Padding(4);
+            this.ob_nowcheckqty.Name = "ob_nowcheckqty";
+            this.ob_nowcheckqty.Power = null;
+            this.ob_nowcheckqty.ReadOnly = true;
+            this.ob_nowcheckqty.Size = new System.Drawing.Size(180, 25);
+            this.ob_nowcheckqty.Str = null;
+            this.ob_nowcheckqty.Str1 = null;
+            this.ob_nowcheckqty.Str2 = null;
+            this.ob_nowcheckqty.TabIndex = 160;
+            this.ob_nowcheckqty.Tag = "ob_nowcheckqty";
             // 
             // 
             // obd_outboxcode
             // obd_outboxcode
             // 
             // 
@@ -590,7 +590,7 @@
             this.Controls.Add(this.CheckTypeDGV);
             this.Controls.Add(this.CheckTypeDGV);
             this.Controls.Add(this.ob_prodcode);
             this.Controls.Add(this.ob_prodcode);
             this.Controls.Add(this.ob_prodcode_label);
             this.Controls.Add(this.ob_prodcode_label);
-            this.Controls.Add(this.ob_batchqty);
+            this.Controls.Add(this.ob_nowcheckqty);
             this.Controls.Add(this.ob_batchqty_label);
             this.Controls.Add(this.ob_batchqty_label);
             this.Controls.Add(this.obd_outboxcode);
             this.Controls.Add(this.obd_outboxcode);
             this.Controls.Add(this.obd_outboxcode_label);
             this.Controls.Add(this.obd_outboxcode_label);
@@ -626,7 +626,7 @@
         private System.Windows.Forms.Label label2;
         private System.Windows.Forms.Label label2;
         private CustomControl.TextBoxWithIcon.EnterTextBox obd_outboxcode;
         private CustomControl.TextBoxWithIcon.EnterTextBox obd_outboxcode;
         private System.Windows.Forms.Label obd_outboxcode_label;
         private System.Windows.Forms.Label obd_outboxcode_label;
-        private CustomControl.TextBoxWithIcon.EnterTextBox ob_batchqty;
+        private CustomControl.TextBoxWithIcon.EnterTextBox ob_nowcheckqty;
         private System.Windows.Forms.Label ob_batchqty_label;
         private System.Windows.Forms.Label ob_batchqty_label;
         private CustomControl.TextBoxWithIcon.EnterTextBox ob_prodcode;
         private CustomControl.TextBoxWithIcon.EnterTextBox ob_prodcode;
         private System.Windows.Forms.Label ob_prodcode_label;
         private System.Windows.Forms.Label ob_prodcode_label;

+ 15 - 0
UAS-MES/FunctionCode/OQC/OQC_PlanMaintain.resx

@@ -526,4 +526,19 @@
   <metadata name="oi_sampleqty.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
   <metadata name="oi_sampleqty.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
     <value>True</value>
   </metadata>
   </metadata>
+  <metadata name="Choose.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="oi_id.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="ci_id.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="ci_kind.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="oi_sampleqty.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
 </root>
 </root>