浏览代码

限制不能重复不良代码

章政 8 年之前
父节点
当前提交
de88a0839c

+ 122 - 124
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 dataGridViewCellStyle2 = 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();
@@ -111,10 +111,10 @@
             | System.Windows.Forms.AnchorStyles.Right)));
             this.ob_checkno_label.AutoSize = true;
             this.ob_checkno_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ob_checkno_label.Location = new System.Drawing.Point(19, 38);
+            this.ob_checkno_label.Location = new System.Drawing.Point(17, 32);
             this.ob_checkno_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.ob_checkno_label.Name = "ob_checkno_label";
-            this.ob_checkno_label.Size = new System.Drawing.Size(86, 31);
+            this.ob_checkno_label.Size = new System.Drawing.Size(72, 27);
             this.ob_checkno_label.TabIndex = 156;
             this.ob_checkno_label.Text = "抽检批";
             // 
@@ -124,10 +124,10 @@
             | System.Windows.Forms.AnchorStyles.Right)));
             this.obd_outboxcode_label.AutoSize = true;
             this.obd_outboxcode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.obd_outboxcode_label.Location = new System.Drawing.Point(19, 86);
+            this.obd_outboxcode_label.Location = new System.Drawing.Point(17, 72);
             this.obd_outboxcode_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.obd_outboxcode_label.Name = "obd_outboxcode_label";
-            this.obd_outboxcode_label.Size = new System.Drawing.Size(62, 31);
+            this.obd_outboxcode_label.Size = new System.Drawing.Size(52, 27);
             this.obd_outboxcode_label.TabIndex = 154;
             this.obd_outboxcode_label.Text = "箱号";
             // 
@@ -137,10 +137,10 @@
             | System.Windows.Forms.AnchorStyles.Right)));
             this.ms_sncode_label.AutoSize = true;
             this.ms_sncode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ms_sncode_label.Location = new System.Drawing.Point(19, 138);
+            this.ms_sncode_label.Location = new System.Drawing.Point(17, 115);
             this.ms_sncode_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.ms_sncode_label.Name = "ms_sncode_label";
-            this.ms_sncode_label.Size = new System.Drawing.Size(86, 31);
+            this.ms_sncode_label.Size = new System.Drawing.Size(72, 27);
             this.ms_sncode_label.TabIndex = 152;
             this.ms_sncode_label.Text = "序列号";
             // 
@@ -150,10 +150,10 @@
             | System.Windows.Forms.AnchorStyles.Right)));
             this.bc_code_label.AutoSize = true;
             this.bc_code_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.bc_code_label.Location = new System.Drawing.Point(1210, 257);
+            this.bc_code_label.Location = new System.Drawing.Point(1076, 214);
             this.bc_code_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.bc_code_label.Name = "bc_code_label";
-            this.bc_code_label.Size = new System.Drawing.Size(110, 31);
+            this.bc_code_label.Size = new System.Drawing.Size(92, 27);
             this.bc_code_label.TabIndex = 177;
             this.bc_code_label.Text = "不良代码";
             // 
@@ -163,10 +163,10 @@
             | System.Windows.Forms.AnchorStyles.Right)));
             this.label1.AutoSize = true;
             this.label1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label1.Location = new System.Drawing.Point(1210, 61);
+            this.label1.Location = new System.Drawing.Point(1076, 51);
             this.label1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label1.Name = "label1";
-            this.label1.Size = new System.Drawing.Size(86, 31);
+            this.label1.Size = new System.Drawing.Size(72, 27);
             this.label1.TabIndex = 179;
             this.label1.Text = "实批数";
             // 
@@ -176,10 +176,10 @@
             | System.Windows.Forms.AnchorStyles.Right)));
             this.label4.AutoSize = true;
             this.label4.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label4.Location = new System.Drawing.Point(1210, 209);
+            this.label4.Location = new System.Drawing.Point(1076, 174);
             this.label4.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label4.Name = "label4";
-            this.label4.Size = new System.Drawing.Size(110, 31);
+            this.label4.Size = new System.Drawing.Size(92, 27);
             this.label4.TabIndex = 185;
             this.label4.Text = "不合格数";
             // 
@@ -189,10 +189,10 @@
             | System.Windows.Forms.AnchorStyles.Right)));
             this.label5.AutoSize = true;
             this.label5.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label5.Location = new System.Drawing.Point(1210, 157);
+            this.label5.Location = new System.Drawing.Point(1076, 131);
             this.label5.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label5.Name = "label5";
-            this.label5.Size = new System.Drawing.Size(86, 31);
+            this.label5.Size = new System.Drawing.Size(72, 27);
             this.label5.TabIndex = 187;
             this.label5.Text = "合格数";
             // 
@@ -202,10 +202,10 @@
             | System.Windows.Forms.AnchorStyles.Right)));
             this.label6.AutoSize = true;
             this.label6.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label6.Location = new System.Drawing.Point(1210, 108);
+            this.label6.Location = new System.Drawing.Point(1076, 90);
             this.label6.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label6.Name = "label6";
-            this.label6.Size = new System.Drawing.Size(86, 31);
+            this.label6.Size = new System.Drawing.Size(72, 27);
             this.label6.TabIndex = 189;
             this.label6.Text = "抽检数";
             // 
@@ -213,10 +213,10 @@
             // 
             this.label9.AutoSize = true;
             this.label9.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label9.Location = new System.Drawing.Point(699, 262);
+            this.label9.Location = new System.Drawing.Point(621, 218);
             this.label9.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label9.Name = "label9";
-            this.label9.Size = new System.Drawing.Size(158, 31);
+            this.label9.Size = new System.Drawing.Size(132, 27);
             this.label9.TabIndex = 192;
             this.label9.Text = "待选不良分组";
             // 
@@ -226,10 +226,10 @@
             | System.Windows.Forms.AnchorStyles.Right)));
             this.sncode_label.AutoSize = true;
             this.sncode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.sncode_label.Location = new System.Drawing.Point(19, 797);
+            this.sncode_label.Location = new System.Drawing.Point(17, 664);
             this.sncode_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.sncode_label.Name = "sncode_label";
-            this.sncode_label.Size = new System.Drawing.Size(86, 31);
+            this.sncode_label.Size = new System.Drawing.Size(72, 27);
             this.sncode_label.TabIndex = 200;
             this.sncode_label.Text = "序列号";
             // 
@@ -239,10 +239,10 @@
             | System.Windows.Forms.AnchorStyles.Right)));
             this.ob_remark_label.AutoSize = true;
             this.ob_remark_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ob_remark_label.Location = new System.Drawing.Point(19, 847);
+            this.ob_remark_label.Location = new System.Drawing.Point(17, 706);
             this.ob_remark_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.ob_remark_label.Name = "ob_remark_label";
-            this.ob_remark_label.Size = new System.Drawing.Size(62, 31);
+            this.ob_remark_label.Size = new System.Drawing.Size(52, 27);
             this.ob_remark_label.TabIndex = 202;
             this.ob_remark_label.Text = "备注";
             // 
@@ -252,10 +252,10 @@
             | System.Windows.Forms.AnchorStyles.Right)));
             this.obd_makecode_label.AutoSize = true;
             this.obd_makecode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.obd_makecode_label.Location = new System.Drawing.Point(19, 192);
+            this.obd_makecode_label.Location = new System.Drawing.Point(17, 160);
             this.obd_makecode_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.obd_makecode_label.Name = "obd_makecode_label";
-            this.obd_makecode_label.Size = new System.Drawing.Size(86, 31);
+            this.obd_makecode_label.Size = new System.Drawing.Size(72, 27);
             this.obd_makecode_label.TabIndex = 206;
             this.obd_makecode_label.Text = "工单号";
             // 
@@ -263,20 +263,20 @@
             // 
             this.ob_prodcode_label.AutoSize = true;
             this.ob_prodcode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ob_prodcode_label.Location = new System.Drawing.Point(360, 192);
+            this.ob_prodcode_label.Location = new System.Drawing.Point(320, 160);
             this.ob_prodcode_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.ob_prodcode_label.Name = "ob_prodcode_label";
-            this.ob_prodcode_label.Size = new System.Drawing.Size(110, 31);
+            this.ob_prodcode_label.Size = new System.Drawing.Size(92, 27);
             this.ob_prodcode_label.TabIndex = 208;
             this.ob_prodcode_label.Text = "产品编号";
             // 
             // ob_status
             // 
             this.ob_status.AutoSize = true;
-            this.ob_status.Location = new System.Drawing.Point(22, 13);
+            this.ob_status.Location = new System.Drawing.Point(20, 11);
             this.ob_status.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.ob_status.Name = "ob_status";
-            this.ob_status.Size = new System.Drawing.Size(0, 18);
+            this.ob_status.Size = new System.Drawing.Size(0, 15);
             this.ob_status.TabIndex = 212;
             this.ob_status.Visible = false;
             // 
@@ -286,10 +286,10 @@
             | System.Windows.Forms.AnchorStyles.Right)));
             this.ob_aqlcode_label.AutoSize = true;
             this.ob_aqlcode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ob_aqlcode_label.Location = new System.Drawing.Point(1210, 11);
+            this.ob_aqlcode_label.Location = new System.Drawing.Point(1076, 9);
             this.ob_aqlcode_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.ob_aqlcode_label.Name = "ob_aqlcode_label";
-            this.ob_aqlcode_label.Size = new System.Drawing.Size(63, 31);
+            this.ob_aqlcode_label.Size = new System.Drawing.Size(52, 27);
             this.ob_aqlcode_label.TabIndex = 214;
             this.ob_aqlcode_label.Text = "AQL";
             // 
@@ -299,10 +299,10 @@
             | System.Windows.Forms.AnchorStyles.Right)));
             this.ob_maxngacceptqty_label.AutoSize = true;
             this.ob_maxngacceptqty_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ob_maxngacceptqty_label.Location = new System.Drawing.Point(962, 11);
+            this.ob_maxngacceptqty_label.Location = new System.Drawing.Point(855, 9);
             this.ob_maxngacceptqty_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.ob_maxngacceptqty_label.Name = "ob_maxngacceptqty_label";
-            this.ob_maxngacceptqty_label.Size = new System.Drawing.Size(206, 31);
+            this.ob_maxngacceptqty_label.Size = new System.Drawing.Size(172, 27);
             this.ob_maxngacceptqty_label.TabIndex = 216;
             this.ob_maxngacceptqty_label.Text = "最大不合格通过数";
             // 
@@ -312,20 +312,19 @@
             | System.Windows.Forms.AnchorStyles.Right)));
             this.ob_projectcode_label.AutoSize = true;
             this.ob_projectcode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ob_projectcode_label.Location = new System.Drawing.Point(962, 108);
+            this.ob_projectcode_label.Location = new System.Drawing.Point(855, 90);
             this.ob_projectcode_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.ob_projectcode_label.Name = "ob_projectcode_label";
-            this.ob_projectcode_label.Size = new System.Drawing.Size(110, 31);
+            this.ob_projectcode_label.Size = new System.Drawing.Size(92, 27);
             this.ob_projectcode_label.TabIndex = 218;
             this.ob_projectcode_label.Text = "检验方案";
             // 
             // BadGroupCode
             // 
             this.BadGroupCode.FormattingEnabled = true;
-            this.BadGroupCode.Location = new System.Drawing.Point(855, 265);
-            this.BadGroupCode.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
+            this.BadGroupCode.Location = new System.Drawing.Point(760, 221);
             this.BadGroupCode.Name = "BadGroupCode";
-            this.BadGroupCode.Size = new System.Drawing.Size(194, 26);
+            this.BadGroupCode.Size = new System.Drawing.Size(173, 23);
             this.BadGroupCode.TabIndex = 219;
             this.BadGroupCode.SelectedIndexChanged += new System.EventHandler(this.BadGroupCode_SelectedIndexChanged);
             // 
@@ -334,11 +333,11 @@
             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(968, 61);
-            this.ob_maxngacceptqty.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
+            this.ob_maxngacceptqty.Location = new System.Drawing.Point(860, 51);
+            this.ob_maxngacceptqty.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.ob_maxngacceptqty.Name = "ob_maxngacceptqty";
             this.ob_maxngacceptqty.Power = null;
-            this.ob_maxngacceptqty.Size = new System.Drawing.Size(217, 28);
+            this.ob_maxngacceptqty.Size = new System.Drawing.Size(193, 25);
             this.ob_maxngacceptqty.Str = null;
             this.ob_maxngacceptqty.Str1 = null;
             this.ob_maxngacceptqty.Str2 = null;
@@ -351,11 +350,11 @@
             this.ob_aqlcode.BackColor = System.Drawing.Color.White;
             this.ob_aqlcode.Enabled = false;
             this.ob_aqlcode.ID = null;
-            this.ob_aqlcode.Location = new System.Drawing.Point(1362, 11);
-            this.ob_aqlcode.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
+            this.ob_aqlcode.Location = new System.Drawing.Point(1211, 9);
+            this.ob_aqlcode.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.ob_aqlcode.Name = "ob_aqlcode";
             this.ob_aqlcode.Power = null;
-            this.ob_aqlcode.Size = new System.Drawing.Size(217, 28);
+            this.ob_aqlcode.Size = new System.Drawing.Size(193, 25);
             this.ob_aqlcode.Str = null;
             this.ob_aqlcode.Str1 = null;
             this.ob_aqlcode.Str2 = null;
@@ -368,11 +367,11 @@
             this.ob_projectcode.BackColor = System.Drawing.Color.White;
             this.ob_projectcode.Enabled = false;
             this.ob_projectcode.ID = null;
-            this.ob_projectcode.Location = new System.Drawing.Point(968, 158);
-            this.ob_projectcode.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
+            this.ob_projectcode.Location = new System.Drawing.Point(860, 132);
+            this.ob_projectcode.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.ob_projectcode.Name = "ob_projectcode";
             this.ob_projectcode.Power = null;
-            this.ob_projectcode.Size = new System.Drawing.Size(217, 28);
+            this.ob_projectcode.Size = new System.Drawing.Size(193, 25);
             this.ob_projectcode.Str = null;
             this.ob_projectcode.Str1 = null;
             this.ob_projectcode.Str2 = null;
@@ -387,13 +386,13 @@
             this.Clean.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.Clean.Image = ((System.Drawing.Image)(resources.GetObject("Clean.Image")));
             this.Clean.IsShowBorder = true;
-            this.Clean.Location = new System.Drawing.Point(1518, 853);
-            this.Clean.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
+            this.Clean.Location = new System.Drawing.Point(1349, 711);
+            this.Clean.Margin = new System.Windows.Forms.Padding(4, 4, 4, 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")));
             this.Clean.Power = null;
-            this.Clean.Size = new System.Drawing.Size(72, 36);
+            this.Clean.Size = new System.Drawing.Size(64, 30);
             this.Clean.TabIndex = 211;
             this.Clean.Tag = "OQC!Inspection";
             this.Clean.Text = "清除";
@@ -403,10 +402,10 @@
             // 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(1030, 706);
-            this.OperateResult.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
+            this.OperateResult.Location = new System.Drawing.Point(916, 588);
+            this.OperateResult.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.OperateResult.Name = "OperateResult";
-            this.OperateResult.Size = new System.Drawing.Size(478, 183);
+            this.OperateResult.Size = new System.Drawing.Size(425, 153);
             this.OperateResult.TabIndex = 210;
             this.OperateResult.Text = "";
             // 
@@ -416,11 +415,11 @@
             this.ob_prodcode.BackColor = System.Drawing.Color.White;
             this.ob_prodcode.Enabled = false;
             this.ob_prodcode.ID = null;
-            this.ob_prodcode.Location = new System.Drawing.Point(518, 197);
-            this.ob_prodcode.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
+            this.ob_prodcode.Location = new System.Drawing.Point(460, 164);
+            this.ob_prodcode.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.ob_prodcode.Name = "ob_prodcode";
             this.ob_prodcode.Power = null;
-            this.ob_prodcode.Size = new System.Drawing.Size(172, 28);
+            this.ob_prodcode.Size = new System.Drawing.Size(153, 25);
             this.ob_prodcode.Str = null;
             this.ob_prodcode.Str1 = null;
             this.ob_prodcode.Str2 = null;
@@ -433,11 +432,11 @@
             this.ob_makecode.BackColor = System.Drawing.Color.White;
             this.ob_makecode.Enabled = false;
             this.ob_makecode.ID = null;
-            this.ob_makecode.Location = new System.Drawing.Point(143, 197);
-            this.ob_makecode.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
+            this.ob_makecode.Location = new System.Drawing.Point(127, 164);
+            this.ob_makecode.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.ob_makecode.Name = "ob_makecode";
             this.ob_makecode.Power = null;
-            this.ob_makecode.Size = new System.Drawing.Size(172, 28);
+            this.ob_makecode.Size = new System.Drawing.Size(153, 25);
             this.ob_makecode.Str = null;
             this.ob_makecode.Str1 = null;
             this.ob_makecode.Str2 = null;
@@ -453,12 +452,12 @@
             this.bg_code1,
             this.bc_code1,
             this.bc_name1});
-            this.ChoosedDGV.Location = new System.Drawing.Point(1215, 306);
-            this.ChoosedDGV.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
+            this.ChoosedDGV.Location = new System.Drawing.Point(1080, 255);
+            this.ChoosedDGV.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.ChoosedDGV.Name = "ChoosedDGV";
             this.ChoosedDGV.RowHeadersWidth = 20;
             this.ChoosedDGV.RowTemplate.Height = 23;
-            this.ChoosedDGV.Size = new System.Drawing.Size(366, 385);
+            this.ChoosedDGV.Size = new System.Drawing.Size(325, 321);
             this.ChoosedDGV.TabIndex = 205;
             // 
             // or_id
@@ -501,12 +500,12 @@
             this.bg_code,
             this.bc_code,
             this.bc_name});
-            this.WaitChooseDGV.Location = new System.Drawing.Point(708, 306);
-            this.WaitChooseDGV.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
+            this.WaitChooseDGV.Location = new System.Drawing.Point(629, 255);
+            this.WaitChooseDGV.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.WaitChooseDGV.Name = "WaitChooseDGV";
             this.WaitChooseDGV.RowHeadersWidth = 20;
             this.WaitChooseDGV.RowTemplate.Height = 23;
-            this.WaitChooseDGV.Size = new System.Drawing.Size(402, 384);
+            this.WaitChooseDGV.Size = new System.Drawing.Size(357, 320);
             this.WaitChooseDGV.TabIndex = 204;
             this.WaitChooseDGV.DataError += new System.Windows.Forms.DataGridViewDataErrorEventHandler(this.WaitChooseDGV_DataError);
             // 
@@ -547,11 +546,11 @@
             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(138, 851);
-            this.ob_remark.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
+            this.ob_remark.Location = new System.Drawing.Point(123, 709);
+            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(547, 28);
+            this.ob_remark.Size = new System.Drawing.Size(487, 25);
             this.ob_remark.Str = null;
             this.ob_remark.Str1 = null;
             this.ob_remark.Str2 = null;
@@ -563,11 +562,11 @@
             this.sncode.AllPower = null;
             this.sncode.BackColor = System.Drawing.Color.White;
             this.sncode.ID = null;
-            this.sncode.Location = new System.Drawing.Point(138, 802);
-            this.sncode.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
+            this.sncode.Location = new System.Drawing.Point(123, 668);
+            this.sncode.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.sncode.Name = "sncode";
             this.sncode.Power = null;
-            this.sncode.Size = new System.Drawing.Size(547, 28);
+            this.sncode.Size = new System.Drawing.Size(487, 25);
             this.sncode.Str = null;
             this.sncode.Str1 = null;
             this.sncode.Str2 = null;
@@ -589,12 +588,12 @@
             this.oi_leveldefect,
             this.ois_remark,
             this.ois_status});
-            this.CheckTypeDGV.Location = new System.Drawing.Point(25, 257);
-            this.CheckTypeDGV.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
+            this.CheckTypeDGV.Location = new System.Drawing.Point(22, 214);
+            this.CheckTypeDGV.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.CheckTypeDGV.Name = "CheckTypeDGV";
             this.CheckTypeDGV.RowHeadersWidth = 20;
             this.CheckTypeDGV.RowTemplate.Height = 23;
-            this.CheckTypeDGV.Size = new System.Drawing.Size(663, 498);
+            this.CheckTypeDGV.Size = new System.Drawing.Size(589, 415);
             this.CheckTypeDGV.TabIndex = 198;
             this.CheckTypeDGV.CellValueChanged += new System.Windows.Forms.DataGridViewCellEventHandler(this.CheckTypeDGV_CellValueChanged);
             this.CheckTypeDGV.DataError += new System.Windows.Forms.DataGridViewDataErrorEventHandler(this.CheckTypeDGV_DataError);
@@ -619,8 +618,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;
+            dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
+            this.ci_name.DefaultCellStyle = dataGridViewCellStyle2;
             this.ci_name.HeaderText = "项目名称";
             this.ci_name.Name = "ci_name";
             this.ci_name.ReadOnly = true;
@@ -641,7 +640,7 @@
             this.oi_checkqty.HeaderText = "已检数";
             this.oi_checkqty.Name = "oi_checkqty";
             this.oi_checkqty.ReadOnly = true;
-            this.oi_checkqty.Width = 98;
+            this.oi_checkqty.Width = 81;
             // 
             // oi_ng
             // 
@@ -678,10 +677,10 @@
             // ChooseedReject
             // 
             this.ChooseedReject.Image = ((System.Drawing.Image)(resources.GetObject("ChooseedReject.Image")));
-            this.ChooseedReject.Location = new System.Drawing.Point(1125, 443);
-            this.ChooseedReject.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
+            this.ChooseedReject.Location = new System.Drawing.Point(1000, 369);
+            this.ChooseedReject.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.ChooseedReject.Name = "ChooseedReject";
-            this.ChooseedReject.Size = new System.Drawing.Size(75, 35);
+            this.ChooseedReject.Size = new System.Drawing.Size(67, 29);
             this.ChooseedReject.TabIndex = 195;
             this.ChooseedReject.UseVisualStyleBackColor = true;
             this.ChooseedReject.Click += new System.EventHandler(this.ChooseedReject_Click);
@@ -689,10 +688,10 @@
             // WaitReject
             // 
             this.WaitReject.Image = ((System.Drawing.Image)(resources.GetObject("WaitReject.Image")));
-            this.WaitReject.Location = new System.Drawing.Point(1125, 530);
-            this.WaitReject.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
+            this.WaitReject.Location = new System.Drawing.Point(1000, 442);
+            this.WaitReject.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.WaitReject.Name = "WaitReject";
-            this.WaitReject.Size = new System.Drawing.Size(75, 35);
+            this.WaitReject.Size = new System.Drawing.Size(67, 29);
             this.WaitReject.TabIndex = 194;
             this.WaitReject.UseVisualStyleBackColor = true;
             this.WaitReject.Click += new System.EventHandler(this.WaitReject_Click);
@@ -703,11 +702,11 @@
             this.oi_checkqty1.BackColor = System.Drawing.Color.White;
             this.oi_checkqty1.Enabled = false;
             this.oi_checkqty1.ID = null;
-            this.oi_checkqty1.Location = new System.Drawing.Point(1362, 109);
-            this.oi_checkqty1.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
+            this.oi_checkqty1.Location = new System.Drawing.Point(1211, 91);
+            this.oi_checkqty1.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.oi_checkqty1.Name = "oi_checkqty1";
             this.oi_checkqty1.Power = null;
-            this.oi_checkqty1.Size = new System.Drawing.Size(219, 28);
+            this.oi_checkqty1.Size = new System.Drawing.Size(195, 25);
             this.oi_checkqty1.Str = null;
             this.oi_checkqty1.Str1 = null;
             this.oi_checkqty1.Str2 = null;
@@ -720,11 +719,11 @@
             this.ob_okqty.BackColor = System.Drawing.Color.White;
             this.ob_okqty.Enabled = false;
             this.ob_okqty.ID = null;
-            this.ob_okqty.Location = new System.Drawing.Point(1362, 158);
-            this.ob_okqty.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
+            this.ob_okqty.Location = new System.Drawing.Point(1211, 132);
+            this.ob_okqty.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.ob_okqty.Name = "ob_okqty";
             this.ob_okqty.Power = null;
-            this.ob_okqty.Size = new System.Drawing.Size(219, 28);
+            this.ob_okqty.Size = new System.Drawing.Size(195, 25);
             this.ob_okqty.Str = null;
             this.ob_okqty.Str1 = null;
             this.ob_okqty.Str2 = null;
@@ -737,11 +736,11 @@
             this.ob_ngqty.BackColor = System.Drawing.Color.White;
             this.ob_ngqty.Enabled = false;
             this.ob_ngqty.ID = null;
-            this.ob_ngqty.Location = new System.Drawing.Point(1362, 210);
-            this.ob_ngqty.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
+            this.ob_ngqty.Location = new System.Drawing.Point(1211, 175);
+            this.ob_ngqty.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.ob_ngqty.Name = "ob_ngqty";
             this.ob_ngqty.Power = null;
-            this.ob_ngqty.Size = new System.Drawing.Size(219, 28);
+            this.ob_ngqty.Size = new System.Drawing.Size(195, 25);
             this.ob_ngqty.Str = null;
             this.ob_ngqty.Str1 = null;
             this.ob_ngqty.Str2 = null;
@@ -754,11 +753,11 @@
             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(1362, 62);
-            this.ob_nowcheckqty.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
+            this.ob_nowcheckqty.Location = new System.Drawing.Point(1211, 52);
+            this.ob_nowcheckqty.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.ob_nowcheckqty.Name = "ob_nowcheckqty";
             this.ob_nowcheckqty.Power = null;
-            this.ob_nowcheckqty.Size = new System.Drawing.Size(219, 28);
+            this.ob_nowcheckqty.Size = new System.Drawing.Size(195, 25);
             this.ob_nowcheckqty.Str = null;
             this.ob_nowcheckqty.Str1 = null;
             this.ob_nowcheckqty.Str2 = null;
@@ -770,11 +769,11 @@
             this.bccode.AllPower = null;
             this.bccode.BackColor = System.Drawing.Color.White;
             this.bccode.ID = null;
-            this.bccode.Location = new System.Drawing.Point(1362, 263);
-            this.bccode.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
+            this.bccode.Location = new System.Drawing.Point(1211, 219);
+            this.bccode.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.bccode.Name = "bccode";
             this.bccode.Power = null;
-            this.bccode.Size = new System.Drawing.Size(219, 28);
+            this.bccode.Size = new System.Drawing.Size(195, 25);
             this.bccode.Str = null;
             this.bccode.Str1 = null;
             this.bccode.Str2 = null;
@@ -790,13 +789,13 @@
             this.GetBatch.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.GetBatch.Image = ((System.Drawing.Image)(resources.GetObject("GetBatch.Image")));
             this.GetBatch.IsShowBorder = true;
-            this.GetBatch.Location = new System.Drawing.Point(708, 142);
-            this.GetBatch.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
+            this.GetBatch.Location = new System.Drawing.Point(629, 118);
+            this.GetBatch.Margin = new System.Windows.Forms.Padding(4, 4, 4, 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")));
             this.GetBatch.Power = "ifRead";
-            this.GetBatch.Size = new System.Drawing.Size(90, 36);
+            this.GetBatch.Size = new System.Drawing.Size(80, 30);
             this.GetBatch.TabIndex = 175;
             this.GetBatch.Tag = "IFREAD";
             this.GetBatch.Text = "获取批";
@@ -811,13 +810,13 @@
             this.BatchPass.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.BatchPass.Image = ((System.Drawing.Image)(resources.GetObject("BatchPass.Image")));
             this.BatchPass.IsShowBorder = true;
-            this.BatchPass.Location = new System.Drawing.Point(810, 143);
-            this.BatchPass.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
+            this.BatchPass.Location = new System.Drawing.Point(720, 119);
+            this.BatchPass.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.BatchPass.MoveImage = ((System.Drawing.Image)(resources.GetObject("BatchPass.MoveImage")));
             this.BatchPass.Name = "BatchPass";
             this.BatchPass.NormalImage = ((System.Drawing.Image)(resources.GetObject("BatchPass.NormalImage")));
             this.BatchPass.Power = "ifWrite";
-            this.BatchPass.Size = new System.Drawing.Size(90, 36);
+            this.BatchPass.Size = new System.Drawing.Size(80, 30);
             this.BatchPass.TabIndex = 174;
             this.BatchPass.Tag = "OQC!Inspection";
             this.BatchPass.Text = "批判过";
@@ -832,13 +831,13 @@
             this.Confirm.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.Confirm.Image = ((System.Drawing.Image)(resources.GetObject("Confirm.Image")));
             this.Confirm.IsShowBorder = true;
-            this.Confirm.Location = new System.Drawing.Point(708, 851);
-            this.Confirm.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
+            this.Confirm.Location = new System.Drawing.Point(629, 709);
+            this.Confirm.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.Confirm.MoveImage = ((System.Drawing.Image)(resources.GetObject("Confirm.MoveImage")));
             this.Confirm.Name = "Confirm";
             this.Confirm.NormalImage = ((System.Drawing.Image)(resources.GetObject("Confirm.NormalImage")));
             this.Confirm.Power = "ifWrite";
-            this.Confirm.Size = new System.Drawing.Size(90, 36);
+            this.Confirm.Size = new System.Drawing.Size(80, 30);
             this.Confirm.TabIndex = 172;
             this.Confirm.Tag = "ifWrite";
             this.Confirm.Text = "确认";
@@ -850,11 +849,11 @@
             this.ob_checkno.AllPower = "ifall";
             this.ob_checkno.BackColor = System.Drawing.Color.White;
             this.ob_checkno.ID = null;
-            this.ob_checkno.Location = new System.Drawing.Point(143, 43);
-            this.ob_checkno.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
+            this.ob_checkno.Location = new System.Drawing.Point(127, 36);
+            this.ob_checkno.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.ob_checkno.Name = "ob_checkno";
             this.ob_checkno.Power = "ifread";
-            this.ob_checkno.Size = new System.Drawing.Size(547, 28);
+            this.ob_checkno.Size = new System.Drawing.Size(487, 25);
             this.ob_checkno.Str = null;
             this.ob_checkno.Str1 = null;
             this.ob_checkno.Str2 = null;
@@ -867,11 +866,11 @@
             this.obd_outboxcode.AllPower = null;
             this.obd_outboxcode.BackColor = System.Drawing.Color.White;
             this.obd_outboxcode.ID = null;
-            this.obd_outboxcode.Location = new System.Drawing.Point(143, 91);
-            this.obd_outboxcode.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
+            this.obd_outboxcode.Location = new System.Drawing.Point(127, 76);
+            this.obd_outboxcode.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.obd_outboxcode.Name = "obd_outboxcode";
             this.obd_outboxcode.Power = null;
-            this.obd_outboxcode.Size = new System.Drawing.Size(547, 28);
+            this.obd_outboxcode.Size = new System.Drawing.Size(487, 25);
             this.obd_outboxcode.Str = null;
             this.obd_outboxcode.Str1 = null;
             this.obd_outboxcode.Str2 = null;
@@ -883,11 +882,11 @@
             this.ms_sncode.AllPower = "ifall";
             this.ms_sncode.BackColor = System.Drawing.Color.White;
             this.ms_sncode.ID = null;
-            this.ms_sncode.Location = new System.Drawing.Point(143, 143);
-            this.ms_sncode.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
+            this.ms_sncode.Location = new System.Drawing.Point(127, 119);
+            this.ms_sncode.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.ms_sncode.Name = "ms_sncode";
             this.ms_sncode.Power = "ifread";
-            this.ms_sncode.Size = new System.Drawing.Size(547, 28);
+            this.ms_sncode.Size = new System.Drawing.Size(487, 25);
             this.ms_sncode.Str = null;
             this.ms_sncode.Str1 = null;
             this.ms_sncode.Str2 = null;
@@ -934,11 +933,10 @@
             // 
             this.Filter.BackColor = System.Drawing.Color.Transparent;
             this.Filter.Font = new System.Drawing.Font("宋体", 10.8F);
-            this.Filter.Location = new System.Drawing.Point(855, 212);
-            this.Filter.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
+            this.Filter.Location = new System.Drawing.Point(760, 177);
             this.Filter.Name = "Filter";
             this.Filter.PlaceHolder = "不良名称搜索";
-            this.Filter.Size = new System.Drawing.Size(194, 28);
+            this.Filter.Size = new System.Drawing.Size(172, 30);
             this.Filter.TabIndex = 220;
             this.Filter.UserControlTextChanged += new UAS_MES.CustomControl.TextBoxWithIcon.TextBoxWithPlaceHolder.OnTextChange(this.Filter_UserControlTextChanged);
             // 
@@ -948,18 +946,18 @@
             | System.Windows.Forms.AnchorStyles.Right)));
             this.label2.AutoSize = true;
             this.label2.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label2.Location = new System.Drawing.Point(786, 209);
+            this.label2.Location = new System.Drawing.Point(699, 174);
             this.label2.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label2.Name = "label2";
-            this.label2.Size = new System.Drawing.Size(62, 31);
+            this.label2.Size = new System.Drawing.Size(52, 27);
             this.label2.TabIndex = 221;
             this.label2.Text = "搜索";
             // 
             // OQC_SamplingDataCollection
             // 
-            this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 18F);
+            this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-            this.ClientSize = new System.Drawing.Size(1598, 914);
+            this.ClientSize = new System.Drawing.Size(1420, 762);
             this.Controls.Add(this.label2);
             this.Controls.Add(this.Filter);
             this.Controls.Add(this.BadGroupCode);
@@ -1006,7 +1004,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, 5, 4, 5);
+            this.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.Name = "OQC_SamplingDataCollection";
             this.Tag = "OQC!SamplingDataCollection";
             this.Text = " ";

+ 12 - 2
UAS-MES/FunctionCode/OQC/OQC_SamplingDataCollection.cs

@@ -17,7 +17,7 @@ namespace UAS_MES.OQC
         DataHelper dh;
         DataTable dt;
         DataTable BadCode;
-        
+
         List<DataGridViewRow> dgvr = new List<DataGridViewRow>();
         LogStringBuilder sql = new LogStringBuilder();
         string[] LevelDefect = new string[] { "A#A", "B#B", "C#C", "D#D" };
@@ -335,7 +335,7 @@ namespace UAS_MES.OQC
                         dh.ExecuteSql("update OQCBATCH set ob_ngqty='" + ngqty + "',ob_actsampleqty='" + checkqty + "',ob_okqty=('" + checkqty + "'-'" + ngqty + "') where ob_checkno ='" + ob_checkno.Text + "'", "update");
                         OperateResult.AppendText(">>序列号 " + sncode.Text + "操作成功\n", Color.Green);
                         LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, "", User.UserLineCode, User.UserSourceCode, "抽样数据采集", "检验项目采集成功", sncode.Text, ob_checkno.Text);
-                        dh.ExecuteSql("update oqcbatchdetail set obd_ifcheck = '-1' where obd_checkno='"+ob_checkno.Text+"' and obd_sncode='"+sncode.Text+"'","update");
+                        dh.ExecuteSql("update oqcbatchdetail set obd_ifcheck = '-1' where obd_checkno='" + ob_checkno.Text + "' and obd_sncode='" + sncode.Text + "'", "update");
                         ChoosedDGV.DataSource = null;
                         BaseUtil.CleanDGVData(CheckTypeDGV);
                         BaseUtil.CleanDGVData(WaitChooseDGV);
@@ -453,8 +453,18 @@ namespace UAS_MES.OQC
                 {
                     try
                     {
+                        for (int i = 0; i < ChoosedDGV.Rows.Count; i++)
+                        {
+                            if (ChoosedDGV.Rows[i].Cells[1].Value.ToString() == dt.Rows[0][0].ToString())
+                            {
+                                OperateResult.AppendText(">>已添加过不良代码" + bccode.Text + "\n", Color.Red);
+                                bccode.Clear();
+                                return;
+                            }
+                        }
                         dt.Merge(ChoosedDGV.DataSource as DataTable);
                         BaseUtil.FillDgvWithDataTable(ChoosedDGV, dt);
+                        bccode.Clear();
                     }
                     catch (Exception) { }
                 }