瀏覽代碼

添加物料资料列表

章政 7 年之前
父節點
當前提交
3761da2e45

+ 69 - 31
UAS-出货标签管理/UAS_出货标签管理.Designer.cs

@@ -57,6 +57,7 @@
             this.pi_cardcode = new System.Windows.Forms.Label();
             this.pi_cardcode_label = new System.Windows.Forms.Label();
             this.Fresh = new System.Windows.Forms.LinkLabel();
+            this.label3 = new System.Windows.Forms.Label();
             this.CleanInputAfterCollect = new System.Windows.Forms.CheckBox();
             this.AllCollected = new System.Windows.Forms.Button();
             this.PowerSetting = new System.Windows.Forms.Button();
@@ -93,8 +94,9 @@
             this.ExportFileDialog = new System.Windows.Forms.FolderBrowserDialog();
             this.AttachInfo = new System.Windows.Forms.Button();
             this.pi_date = new System.Windows.Forms.Label();
-            this.label3 = new System.Windows.Forms.Label();
-            this.PrCodePanel = new System.Windows.Forms.Panel();
+            this.label19 = new System.Windows.Forms.Label();
+            this.GridPrcode = new UAS_LabelMachine.CustomControl.DataGridViewWithSerialNum();
+            this.pd_prodcode = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.groupBoxWithBorder1 = new UAS_LabelMachine.CustomControl.GroupBoxWithBorder.GroupBoxWithBorder();
             this.ExportData = new System.Windows.Forms.Button();
             this.label18 = new System.Windows.Forms.Label();
@@ -122,6 +124,7 @@
             this.Input = new UAS_LabelMachine.CustomControl.EnterTextBox();
             this.griddetno = new UAS_LabelMachine.CustomControl.EnterTextBox();
             this.sg_code = new UAS_LabelMachine.CustomControl.SearchTextBox();
+            this.MessageLog = new UAS_LabelMachine.CustomControl.RichText.RichTextAutoBottom();
             this.LabelInf = new UAS_LabelMachine.CustomControl.DataGridViewWithSerialNum();
             this.Choose = new System.Windows.Forms.DataGridViewCheckBoxColumn();
             this.pib_ifpick = new System.Windows.Forms.DataGridViewCheckBoxColumn();
@@ -184,7 +187,7 @@
             this.OutBoxCombox = new System.Windows.Forms.ComboBox();
             ((System.ComponentModel.ISupportInitialize)(this.Si_ItemDGV)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.MidSource)).BeginInit();
-            this.PrCodePanel.SuspendLayout();
+            ((System.ComponentModel.ISupportInitialize)(this.GridPrcode)).BeginInit();
             this.groupBoxWithBorder1.SuspendLayout();
             this.CollectionProcess.SuspendLayout();
             ((System.ComponentModel.ISupportInitialize)(this.LabelInf)).BeginInit();
@@ -485,6 +488,16 @@
             this.Fresh.Text = "刷新";
             this.Fresh.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.Refresh_LinkClicked);
             // 
+            // label3
+            // 
+            this.label3.AutoSize = true;
+            this.label3.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label3.Location = new System.Drawing.Point(276, 587);
+            this.label3.Name = "label3";
+            this.label3.Size = new System.Drawing.Size(74, 21);
+            this.label3.TabIndex = 29;
+            this.label3.Text = "输出日志";
+            // 
             // CleanInputAfterCollect
             // 
             this.CleanInputAfterCollect.AutoSize = true;
@@ -522,10 +535,6 @@
             this.PowerSetting.Visible = false;
             this.PowerSetting.Click += new System.EventHandler(this.PowerSetting_Click);
             // 
-            // RefreshDBConnect
-            // 
-            this.RefreshDBConnect.Tick += new System.EventHandler(this.RefreshDBConnect_Tick);
-            // 
             // GetGridOnly
             // 
             this.GetGridOnly.AutoSize = true;
@@ -777,24 +786,38 @@
             this.pi_date.TabIndex = 86;
             this.pi_date.Visible = false;
             // 
-            // label3
-            // 
-            this.label3.AutoSize = true;
-            this.label3.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label3.Location = new System.Drawing.Point(4, 4);
-            this.label3.Name = "label3";
-            this.label3.Size = new System.Drawing.Size(65, 20);
-            this.label3.TabIndex = 87;
-            this.label3.Text = "物料编号";
-            // 
-            // PrCodePanel
-            // 
-            this.PrCodePanel.AutoScroll = true;
-            this.PrCodePanel.Controls.Add(this.label3);
-            this.PrCodePanel.Location = new System.Drawing.Point(7, 587);
-            this.PrCodePanel.Name = "PrCodePanel";
-            this.PrCodePanel.Size = new System.Drawing.Size(1246, 95);
-            this.PrCodePanel.TabIndex = 88;
+            // label19
+            // 
+            this.label19.AutoSize = true;
+            this.label19.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label19.Location = new System.Drawing.Point(4, 584);
+            this.label19.Name = "label19";
+            this.label19.Size = new System.Drawing.Size(74, 21);
+            this.label19.TabIndex = 87;
+            this.label19.Text = "物料资料";
+            // 
+            // GridPrcode
+            // 
+            this.GridPrcode.AllowUserToAddRows = false;
+            this.GridPrcode.BackgroundColor = System.Drawing.SystemColors.Control;
+            this.GridPrcode.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
+            this.GridPrcode.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
+            this.pd_prodcode});
+            this.GridPrcode.GridColor = System.Drawing.SystemColors.Control;
+            this.GridPrcode.Location = new System.Drawing.Point(9, 610);
+            this.GridPrcode.Name = "GridPrcode";
+            this.GridPrcode.ReadOnly = true;
+            this.GridPrcode.RowTemplate.Height = 23;
+            this.GridPrcode.Size = new System.Drawing.Size(263, 97);
+            this.GridPrcode.TabIndex = 88;
+            this.GridPrcode.CellClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.GridPrcode_CellClick);
+            // 
+            // pd_prodcode
+            // 
+            this.pd_prodcode.DataPropertyName = "pib_prodcode";
+            this.pd_prodcode.HeaderText = "物料编号";
+            this.pd_prodcode.Name = "pd_prodcode";
+            this.pd_prodcode.ReadOnly = true;
             // 
             // groupBoxWithBorder1
             // 
@@ -1129,6 +1152,16 @@
             this.sg_code.TextBoxEnable = false;
             this.sg_code.UserControlTextChanged += new UAS_LabelMachine.CustomControl.SearchTextBox.OnTextChange(this.sg_code_UserControlTextChanged);
             // 
+            // MessageLog
+            // 
+            this.MessageLog.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.MessageLog.Location = new System.Drawing.Point(278, 610);
+            this.MessageLog.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+            this.MessageLog.Name = "MessageLog";
+            this.MessageLog.Size = new System.Drawing.Size(975, 97);
+            this.MessageLog.TabIndex = 28;
+            this.MessageLog.Text = "";
+            // 
             // LabelInf
             // 
             this.LabelInf.AllowUserToAddRows = false;
@@ -1790,8 +1823,9 @@
             this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(229)))), ((int)(((byte)(233)))), ((int)(((byte)(206)))));
-            this.ClientSize = new System.Drawing.Size(1257, 686);
-            this.Controls.Add(this.PrCodePanel);
+            this.ClientSize = new System.Drawing.Size(1257, 711);
+            this.Controls.Add(this.GridPrcode);
+            this.Controls.Add(this.label19);
             this.Controls.Add(this.pi_date);
             this.Controls.Add(this.AttachInfo);
             this.Controls.Add(this.groupBoxWithBorder1);
@@ -1825,6 +1859,8 @@
             this.Controls.Add(this.label2);
             this.Controls.Add(this.sg_code);
             this.Controls.Add(this.label1);
+            this.Controls.Add(this.label3);
+            this.Controls.Add(this.MessageLog);
             this.Controls.Add(this.LabelInf);
             this.Controls.Add(this.pi_inoutno_label);
             this.Controls.Add(this.pi_inoutno);
@@ -1842,8 +1878,7 @@
             this.SizeChanged += new System.EventHandler(this.贴标机条码打印_SizeChanged);
             ((System.ComponentModel.ISupportInitialize)(this.Si_ItemDGV)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.MidSource)).EndInit();
-            this.PrCodePanel.ResumeLayout(false);
-            this.PrCodePanel.PerformLayout();
+            ((System.ComponentModel.ISupportInitialize)(this.GridPrcode)).EndInit();
             this.groupBoxWithBorder1.ResumeLayout(false);
             this.groupBoxWithBorder1.PerformLayout();
             this.CollectionProcess.ResumeLayout(false);
@@ -1913,6 +1948,7 @@
         private CustomControl.EnterTextBox pi_inoutno;
         private System.Windows.Forms.Label pi_inoutno_label;
         private CustomControl.DataGridViewWithSerialNum LabelInf;
+        private CustomControl.RichText.RichTextAutoBottom MessageLog;
         private System.Windows.Forms.Label label1;
         private System.Windows.Forms.Label label2;
         private System.Windows.Forms.Label label22;
@@ -1949,6 +1985,7 @@
         private System.Windows.Forms.Label pi_cardcode;
         private System.Windows.Forms.Label pi_cardcode_label;
         private System.Windows.Forms.LinkLabel Fresh;
+        private System.Windows.Forms.Label label3;
         private System.Windows.Forms.CheckBox CleanInputAfterCollect;
         private System.Windows.Forms.Button AllCollected;
         private System.Windows.Forms.Button PowerSetting;
@@ -2014,7 +2051,8 @@
         private System.Windows.Forms.DataGridViewTextBoxColumn pr_spec;
         private System.Windows.Forms.DataGridViewTextBoxColumn pib_outboxcode1;
         private System.Windows.Forms.DataGridViewTextBoxColumn pib_outboxcode2;
-        private System.Windows.Forms.Label label3;
-        private System.Windows.Forms.Panel PrCodePanel;
+        private System.Windows.Forms.Label label19;
+        private CustomControl.DataGridViewWithSerialNum GridPrcode;
+        private System.Windows.Forms.DataGridViewTextBoxColumn pd_prodcode;
     }
 }

+ 55 - 56
UAS-出货标签管理/UAS_出货标签管理.cs

@@ -221,7 +221,6 @@ namespace UAS_LabelMachine
             {
                 MessageBox.Show("未安装CodeSoft软件或者版本不正确");
             }
-
             RefreshDBConnect.Interval = 60000;
             RefreshDBConnect.Start();
         }
@@ -232,14 +231,14 @@ namespace UAS_LabelMachine
             BaseUtil.SetFormValue(this.Controls, dt);
         }
 
-        bool AutoSzied = false;
-
+        //只执行一次窗体自适应
+        bool AutoSized = false;
         private void 贴标机条码打印_SizeChanged(object sender, EventArgs e)
         {
-            if (!AutoSzied)
+            if (!AutoSized)
             {
                 asc.controlAutoSize(this);
-                AutoSzied = true;
+                AutoSized = true;
             }
         }
 
@@ -616,6 +615,7 @@ namespace UAS_LabelMachine
             //提醒用户需要采集的数据
             RemindUser();
             RefreshProcessData();
+            MessageLog.AppendText(">>扫描到数据" + Input.Text + "\n", Color.Blue);
             //如果所采集的行的物料不一样的话,重新计算箱内容量
             if (CurrentRowIndex - 1 > 0)
             {
@@ -698,6 +698,18 @@ namespace UAS_LabelMachine
                                 SingleDoc.Variables.FreeVariables.Item(j + 1).Value = LabelInf.Rows[CurrentRowIndex].Cells["pib_cusoutboxcode"].Value.ToString();
                             else
                                 SingleDoc.Variables.FreeVariables.Item(j + 1).Value = dh.GetLabelParam(sql + pib_id).ToString();
+                            if (SingleDoc.Variables.FreeVariables.Item(j + 1).Value == "")
+                            {
+                                try
+                                {
+                                    SingleDoc.Variables.FreeVariables.Item(j + 1).Value = dt.Select("lp_name='" + SingleDoc.Variables.FreeVariables.Item(j + 1).Name + "'")[0]["lp_sql"].ToString();
+
+                                }
+                                catch (Exception)
+                                {
+
+                                }
+                            }
                             LogManager.DoLog("打印参数【" + SingleDoc.Variables.FreeVariables.Item(j + 1).Name + "】赋值," + "取值SQL:" + sql + pib_id + ",取到值" + SingleDoc.Variables.FreeVariables.Item(j + 1).Value);
                         }
                     }
@@ -729,6 +741,7 @@ namespace UAS_LabelMachine
                 {
                     Inf += arr[i] + "  ";
                 }
+                MessageLog.AppendText(">>当前采集行" + (CurrentRowIndex + 1) + ",请采集" + Inf + "\n", Color.Green);
             }
         }
 
@@ -777,6 +790,7 @@ namespace UAS_LabelMachine
                                     PaintCell.Remove(cell);
                                 PaintCell.Add(cell, false);
                                 LabelInf.Refresh();
+                                MessageLog.AppendText(">>供应商物料编号不匹配\n", Color.Red);
                             }
                             else
                             {
@@ -801,6 +815,7 @@ namespace UAS_LabelMachine
                                     PaintCell.Remove(cell);
                                 PaintCell.Add(cell, false);
                                 LabelInf.Refresh();
+                                MessageLog.AppendText(">>数量不匹配\n", Color.Red);
                             }
                             else
                             {
@@ -825,6 +840,7 @@ namespace UAS_LabelMachine
                                     PaintCell.Remove(cell);
                                 PaintCell.Add(cell, false);
                                 LabelInf.Refresh();
+                                MessageLog.AppendText(">>品牌不匹配\n", Color.Red);
                             }
                             else
                             {
@@ -1155,13 +1171,13 @@ namespace UAS_LabelMachine
                         //if (int.Parse(outboxcode == "" ? "1" : outboxcode) > MaxOutBoxCode)
                         //    MaxOutBoxCode = int.Parse(outboxcode);
                     }
+                    LoadPrcodeData();
                     thread = new Thread(GetInOutInfAndLabelFile);
                     stw = new SetLoadingWindow(thread, "正在获取打印标签");
                     BaseUtil.SetFormCenter(stw);
                     stw.ShowDialog();
                     //重置采集项次
                     CurrentItemIndex = 0;
-                    PaintRadioCheckBox();
                     LogManager.DoLog("输入单号【" + pi_inoutno.Text + "】");
                 }
                 else
@@ -1300,10 +1316,11 @@ namespace UAS_LabelMachine
                                     try
                                     {
                                         SingleDoc.Variables.FreeVariables.Item(j + 1).Value = dt.Select("lp_name='" + SingleDoc.Variables.FreeVariables.Item(j + 1).Name + "'")[0]["lp_sql"].ToString();
+
                                     }
-                                    catch (Exception ex)
+                                    catch (Exception)
                                     {
-                                        LogManager.DoLog(ex.StackTrace);
+
                                     }
                                 }
                                 ParamLog.AppendLine("pib_id:" + LabelInf.Rows[i].Cells["pib_id1"].Value.ToString() + ",SingleDoc打印参数【" + SingleDoc.Variables.FreeVariables.Item(j + 1).Name + "】赋值," + "取到值" + SingleDoc.Variables.FreeVariables.Item(j + 1).Value);
@@ -1330,7 +1347,7 @@ namespace UAS_LabelMachine
                             //勾选为已打印
                             LabelInf.Rows[i].Cells["pib_ifprint"].Value = true;
                         }
-                        catch (Exception ex) { LogManager.DoLog(ex.StackTrace); }
+                        catch (Exception ex) { LogManager.DoLog(ex.Message); }
                     }
                 }
                 dh.BatchInsert("update prodiobarcode set pib_printdate=sysdate where pib_id=:pib_id", new string[] { "pib_id" }, SingleID.ToArray());
@@ -1672,7 +1689,7 @@ namespace UAS_LabelMachine
                             }
                         }
                     }
-                    catch (Exception ex) { LogManager.DoLog(ex.StackTrace); }
+                    catch { }
                 }
                 else
                 {
@@ -1702,7 +1719,7 @@ namespace UAS_LabelMachine
                     else
                         MessageBox.Show("该出入库单未找到该外箱号!");
                 }
-                catch (Exception ex) { LogManager.DoLog(ex.StackTrace); }
+                catch (Exception) { }
             }
             Outboxcode.Clear();
         }
@@ -1771,9 +1788,9 @@ namespace UAS_LabelMachine
                                     {
                                         MidDoc.Variables.FreeVariables.Item(j + 1).Value = dt.Select("lp_name='" + MidDoc.Variables.FreeVariables.Item(j + 1).Name + "'")[0]["lp_sql"].ToString();
                                     }
-                                    catch (Exception ex)
+                                    catch (Exception)
                                     {
-                                        LogManager.DoLog(ex.StackTrace);
+
                                     }
                                 }
                                 LogManager.DoLog("打印参数【" + MidDoc.Variables.FreeVariables.Item(j + 1).Name + "】赋值," + "取值SQL:" + sql + ",取到值" + MidDoc.Variables.FreeVariables.Item(j + 1).Value);
@@ -1857,9 +1874,9 @@ namespace UAS_LabelMachine
                                     {
                                         MidDoc.Variables.FreeVariables.Item(j + 1).Value = dt.Select("lp_name='" + MidDoc.Variables.FreeVariables.Item(j + 1).Name + "'")[0]["lp_sql"].ToString();
                                     }
-                                    catch (Exception ex)
+                                    catch (Exception)
                                     {
-                                        LogManager.DoLog(ex.StackTrace);
+
                                     }
                                 }
                                 LogManager.DoLog("打印参数【" + MidDoc.Variables.FreeVariables.Item(j + 1).Name + "】赋值," + "取值SQL:" + sql + ",取到值" + MidDoc.Variables.FreeVariables.Item(j + 1).Value);
@@ -1941,9 +1958,9 @@ namespace UAS_LabelMachine
                                         {
                                             OutBoxDoc.Variables.FreeVariables.Item(j + 1).Value = dt.Select("lp_name='" + OutBoxDoc.Variables.FreeVariables.Item(j + 1).Name + "'")[0]["lp_sql"].ToString();
                                         }
-                                        catch (Exception ex)
+                                        catch (Exception)
                                         {
-                                            LogManager.DoLog(ex.StackTrace);
+
                                         }
                                     }
                                     LogManager.DoLog("打印参数【" + OutBoxDoc.Variables.FreeVariables.Item(j + 1).Name + "】赋值," + "取值SQL:" + ExeSQL + ",取到值" + OutBoxDoc.Variables.FreeVariables.Item(j + 1).Value);
@@ -1970,7 +1987,7 @@ namespace UAS_LabelMachine
                 OutBoxDoc.PrintDocument();
                 LogManager.DoLog("执行打印外箱,pib_id:" + LabelInf.Rows[rowindex].Cells["pib_id1"].Value.ToString());
             }
-            catch (Exception ex) { LogManager.DoLog(ex.StackTrace); }
+            catch (Exception ex) { MessageBox.Show(ex.Message); }
         }
 
         private void CleanDetail_Click(object sender, EventArgs e)
@@ -2302,7 +2319,7 @@ namespace UAS_LabelMachine
                     else
                         LabelInf.Rows[e.RowIndex].Cells["pib_datecode1"].Value = dt.Year.ToString().Substring(2, 2) + weekOfYear;
                 }
-                catch (Exception ex) { LogManager.DoLog(ex.StackTrace); }
+                catch (Exception) { }
             }
         }
 
@@ -2341,7 +2358,7 @@ namespace UAS_LabelMachine
                 if (dt.Rows.Count > 0)
                 {
                     try { OutboxCapacity.Value = (decimal)dt.Rows[0]["pr_qtyperplace"] / (decimal)dt.Rows[0]["pr_zxbzs"]; }
-                    catch (Exception ex) { LogManager.DoLog(ex.StackTrace); }
+                    catch (Exception) { }
                 }
                 try
                 {
@@ -2358,7 +2375,9 @@ namespace UAS_LabelMachine
                     }
                     GetPackingCode = true;
                 }
-                catch (Exception ex) { LogManager.DoLog(ex.StackTrace); }
+                catch (Exception)
+                {
+                }
             }
             else
             {
@@ -2413,7 +2432,7 @@ namespace UAS_LabelMachine
                     }
                 }
             }
-            catch (Exception ex) { LogManager.DoLog(ex.StackTrace); }
+            catch (Exception) { }
         }
 
         /// <summary>
@@ -2436,7 +2455,7 @@ namespace UAS_LabelMachine
                     }
                 }
             }
-            catch (Exception ex) { LogManager.DoLog(ex.StackTrace); }
+            catch (Exception) { }
         }
 
         /// <summary>
@@ -2459,7 +2478,7 @@ namespace UAS_LabelMachine
                     }
                 }
             }
-            catch (Exception ex) { LogManager.DoLog(ex.StackTrace); }
+            catch (Exception) { }
         }
 
         /// <summary>
@@ -2655,44 +2674,24 @@ namespace UAS_LabelMachine
             dh.ExecuteSql("select count(1) from employee", "select");
         }
 
-        private void PaintRadioCheckBox()
+        private void LoadPrcodeData()
         {
-            DataTable dt = (DataTable)dh.ExecuteSql("select distinct pib_prodcode from prodiobarcode where pib_inoutno='" + pi_inoutno.Text + "' order by  pib_prodcode", "select");
-            int RowRadioCount = Width / 100;
-            int RowIndex = 0;
-            Console.WriteLine(RowRadioCount);
-            int Y = 0;
-            for (int i = 0; i < dt.Rows.Count; i++)
-            {
-                RadioButton rb = new RadioButton();
-                //满了一格就换行
-                if (i % RowRadioCount == 0)
-                {
-                    Y = Y + 40;
-                    RowIndex = -1;
-                }
-                RowIndex = RowIndex + 1;
-                rb.Location = new Point(10 + 100 * RowIndex, Y);
-                rb.AutoSize = true;
-                rb.Name = "radioButton1";
-                rb.Size = new Size(100, 16);
-                rb.Text = dt.Rows[i]["pib_prodcode"].ToString();
-                rb.UseVisualStyleBackColor = true;
-                rb.CheckedChanged += Rb_CheckedChanged;
-                PrCodePanel.Controls.Add(rb);
-            }
+            GridPrcode.DataSource = (DataTable)dh.ExecuteSql("select distinct pib_prodcode from prodiobarcode where pib_inoutno='" + pi_inoutno.Text + "' order by pib_prodcode", "select");
         }
 
-        private void Rb_CheckedChanged(object sender, EventArgs e)
+        private void GridPrcode_CellClick(object sender, DataGridViewCellEventArgs e)
         {
-            RadioButton rb = (RadioButton)sender;
-            CurrentItemIndex = 0;
-            for (int i = 0; i < LabelInf.RowCount; i++)
+            //用户在重新勾选后重置采集项目的索引
+            if (e.ColumnIndex >= 0 && e.RowIndex >= 0)
             {
-                if (rb.Text == LabelInf.Rows[i].Cells["pib_prodcode"].Value.ToString() && LabelInf.Rows[i].Cells["pib_ifpick"].FormattedValue.ToString() != "True")
+                CurrentItemIndex = 0;
+                for (int i = 0; i < LabelInf.RowCount; i++)
                 {
-                    CurrentRowIndex = i;
-                    break;
+                    if (GridPrcode.Rows[e.RowIndex].Cells[e.ColumnIndex].Value.ToString() == LabelInf.Rows[i].Cells["pib_prodcode"].Value.ToString() && LabelInf.Rows[i].Cells["pib_ifpick"].FormattedValue.ToString() != "True")
+                    {
+                        CurrentRowIndex = i;
+                        break;
+                    }
                 }
             }
         }

+ 3 - 0
UAS-出货标签管理/UAS_出货标签管理.resx

@@ -150,6 +150,9 @@
   <metadata name="ExportFileDialog.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
     <value>294, 17</value>
   </metadata>
+  <metadata name="pd_prodcode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
   <metadata name="pib_madein.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>