Bläddra i källkod

修改不良数据采集BUG

章政 8 år sedan
förälder
incheckning
07511ead96

+ 52 - 42
UAS-MES/FunctionCode/OQC/OQC_SamplingDataCollection.Designer.cs

@@ -30,7 +30,7 @@
         {
             this.components = new System.ComponentModel.Container();
             System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(OQC_SamplingDataCollection));
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
             this.ob_checkno_label = new System.Windows.Forms.Label();
             this.obd_outboxcode_label = new System.Windows.Forms.Label();
             this.ms_sncode_label = new System.Windows.Forms.Label();
@@ -57,10 +57,6 @@
             this.ob_prodcode = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
             this.ob_makecode = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
             this.ChoosedDGV = new UAS_MES.CustomControl.DataGrid_View.DataGridViewExpand();
-            this.or_id = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.bg_code1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.bc_code1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.bc_name1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.WaitChooseDGV = new UAS_MES.CustomControl.DataGrid_View.DataGridViewWithCheckBox();
             this.ChooseAll = new System.Windows.Forms.DataGridViewCheckBoxColumn();
             this.bg_code = new System.Windows.Forms.DataGridViewTextBoxColumn();
@@ -99,6 +95,11 @@
             this.Filter = new UAS_MES.CustomControl.TextBoxWithIcon.TextBoxWithPlaceHolder();
             this.BadInfoSource = new System.Windows.Forms.BindingSource(this.components);
             this.label2 = new System.Windows.Forms.Label();
+            this.choose1 = new System.Windows.Forms.DataGridViewCheckBoxColumn();
+            this.or_id = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.bg_code1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.bc_code1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.bc_name1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
             ((System.ComponentModel.ISupportInitialize)(this.ChoosedDGV)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.WaitChooseDGV)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.CheckTypeDGV)).BeginInit();
@@ -449,6 +450,7 @@
             this.ChoosedDGV.AllowUserToAddRows = false;
             this.ChoosedDGV.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
             this.ChoosedDGV.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
+            this.choose1,
             this.or_id,
             this.bg_code1,
             this.bc_code1,
@@ -461,37 +463,6 @@
             this.ChoosedDGV.Size = new System.Drawing.Size(325, 321);
             this.ChoosedDGV.TabIndex = 205;
             // 
-            // or_id
-            // 
-            this.or_id.DataPropertyName = "or_id";
-            this.or_id.HeaderText = "or_id";
-            this.or_id.Name = "or_id";
-            this.or_id.Visible = false;
-            // 
-            // bg_code1
-            // 
-            this.bg_code1.DataPropertyName = "bg_code";
-            this.bg_code1.HeaderText = "不良组别编号";
-            this.bg_code1.Name = "bg_code1";
-            this.bg_code1.Visible = false;
-            // 
-            // bc_code1
-            // 
-            this.bc_code1.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
-            this.bc_code1.DataPropertyName = "bc_code";
-            this.bc_code1.HeaderText = "不良代码";
-            this.bc_code1.Name = "bc_code1";
-            this.bc_code1.ReadOnly = true;
-            this.bc_code1.Width = 140;
-            // 
-            // bc_name1
-            // 
-            this.bc_name1.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
-            this.bc_name1.DataPropertyName = "bc_name";
-            this.bc_name1.HeaderText = "不良名称 ";
-            this.bc_name1.Name = "bc_name1";
-            this.bc_name1.ReadOnly = true;
-            // 
             // WaitChooseDGV
             // 
             this.WaitChooseDGV.AllowUserToAddRows = false;
@@ -619,8 +590,8 @@
             // 
             this.ci_name.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
             this.ci_name.DataPropertyName = "ci_name";
-            dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
-            this.ci_name.DefaultCellStyle = dataGridViewCellStyle3;
+            dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
+            this.ci_name.DefaultCellStyle = dataGridViewCellStyle1;
             this.ci_name.HeaderText = "项目名称";
             this.ci_name.Name = "ci_name";
             this.ci_name.ReadOnly = true;
@@ -956,6 +927,44 @@
             this.label2.TabIndex = 221;
             this.label2.Text = "搜索";
             // 
+            // choose1
+            // 
+            this.choose1.HeaderText = "勾选";
+            this.choose1.MinimumWidth = 50;
+            this.choose1.Name = "choose1";
+            this.choose1.Width = 50;
+            // 
+            // or_id
+            // 
+            this.or_id.DataPropertyName = "or_id";
+            this.or_id.HeaderText = "or_id";
+            this.or_id.Name = "or_id";
+            this.or_id.Visible = false;
+            // 
+            // bg_code1
+            // 
+            this.bg_code1.DataPropertyName = "bg_code";
+            this.bg_code1.HeaderText = "不良组别编号";
+            this.bg_code1.Name = "bg_code1";
+            this.bg_code1.Visible = false;
+            // 
+            // bc_code1
+            // 
+            this.bc_code1.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
+            this.bc_code1.DataPropertyName = "bc_code";
+            this.bc_code1.HeaderText = "不良代码";
+            this.bc_code1.Name = "bc_code1";
+            this.bc_code1.ReadOnly = true;
+            this.bc_code1.Width = 140;
+            // 
+            // bc_name1
+            // 
+            this.bc_name1.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
+            this.bc_name1.DataPropertyName = "bc_name";
+            this.bc_name1.HeaderText = "不良名称 ";
+            this.bc_name1.Name = "bc_name1";
+            this.bc_name1.ReadOnly = true;
+            // 
             // OQC_SamplingDataCollection
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
@@ -1018,7 +1027,7 @@
             ((System.ComponentModel.ISupportInitialize)(this.WaitChooseDGV)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.CheckTypeDGV)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.BadInfoSource)).EndInit();
-            this.ResumeLayout(false);
+            this.ResumeLayout(true);
             this.PerformLayout();
 
         }
@@ -1086,12 +1095,13 @@
         private System.Windows.Forms.DataGridViewComboBoxColumn oi_leveldefect;
         private System.Windows.Forms.DataGridViewTextBoxColumn ois_remark;
         private System.Windows.Forms.DataGridViewTextBoxColumn ois_status;
+        private CustomControl.TextBoxWithIcon.TextBoxWithPlaceHolder Filter;
+        private System.Windows.Forms.BindingSource BadInfoSource;
+        private System.Windows.Forms.Label label2;
+        private System.Windows.Forms.DataGridViewCheckBoxColumn choose1;
         private System.Windows.Forms.DataGridViewTextBoxColumn or_id;
         private System.Windows.Forms.DataGridViewTextBoxColumn bg_code1;
         private System.Windows.Forms.DataGridViewTextBoxColumn bc_code1;
         private System.Windows.Forms.DataGridViewTextBoxColumn bc_name1;
-        private CustomControl.TextBoxWithIcon.TextBoxWithPlaceHolder Filter;
-        private System.Windows.Forms.BindingSource BadInfoSource;
-        private System.Windows.Forms.Label label2;
     }
 }

+ 8 - 1
UAS-MES/FunctionCode/OQC/OQC_SamplingDataCollection.cs

@@ -404,7 +404,14 @@ namespace UAS_MES.OQC
 
         private void WaitReject_Click(object sender, EventArgs e)
         {
-            BaseUtil.CleanDGVData(ChoosedDGV);
+            for (int i = ChoosedDGV.Rows.Count - 1; i >= 0; i--)
+            {
+                if (ChoosedDGV.Rows[i].Cells["choose1"].FormattedValue.ToString() == "True")
+                {
+                    ChoosedDGV.Rows.RemoveAt(i);
+                }
+            }
+            (ChoosedDGV.DataSource as DataTable).AcceptChanges();
         }
 
         private void ChooseedReject_Click(object sender, EventArgs e)

+ 1 - 49
UAS-MES/FunctionCode/OQC/OQC_SamplingDataCollection.resx

@@ -249,16 +249,7 @@
         ROJSU3qXjMKwG/vjzEz/skOI3Zqgv7AAAAAASUVORK5CYII=
 </value>
   </data>
-  <metadata name="or_id.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="bg_code1.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="bc_code1.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="bc_name1.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+  <metadata name="choose1.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>
   <metadata name="or_id.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
@@ -285,45 +276,6 @@
   <metadata name="bc_name.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>
-  <metadata name="ChooseAll.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="bg_code.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="bc_code.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="bc_name.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </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_itemcode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="ci_name.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>
-  <metadata name="oi_checkqty.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="oi_ng.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="oi_leveldefect.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="ois_remark.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="ois_status.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
   <metadata name="choose.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>

+ 1 - 0
UAS-MES/PublicMethod/BaseUtil.cs

@@ -603,6 +603,7 @@ namespace UAS_MES.PublicMethod
             {
                 dgv.Rows.RemoveAt(i);
             }
+            (dgv.DataSource as DataTable).AcceptChanges();
         }
 
         public static void CleanForm(Form Form)