callm 6 年 前
コミット
86a8ea2bf2

+ 130 - 130
UAS-出货标签管理(标签复核)/UAS_出货标签管理.Designer.cs

@@ -114,24 +114,24 @@
             this.MessageLog = new UAS_LabelMachine.CustomControl.RichText.RichTextAutoBottom();
             this.LabelInf = new UAS_LabelMachine.CustomControl.DataGridViewWithSerialNum();
             this.pi_inoutno = new UAS_LabelMachine.CustomControl.EnterTextBox();
-            this.Choose = new System.Windows.Forms.DataGridViewCheckBoxColumn();
-            this.pib_ifpick = new System.Windows.Forms.DataGridViewCheckBoxColumn();
-            this.pib_ifprint = new System.Windows.Forms.DataGridViewCheckBoxColumn();
-            this.pib_id1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.pib_pdno = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.pib_prodcode = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.pr_orispeccode = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.pd_custprodcode = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.pd_pocode = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.pd_custprodspec = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.pr_spec = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.pib_brand = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.pib_madein = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.pr_zxbzs = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.pr_unit = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.pib_lotno = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.pib_datecode = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.pib_qty = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.pib_datecode = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.pib_lotno = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.pr_unit = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.pr_zxbzs = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.pib_madein = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.pib_brand = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.pr_spec = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.pd_custprodspec = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.pd_pocode = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.pd_custprodcode = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.pr_orispeccode = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.pib_prodcode = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.pib_pdno = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.pib_id1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.pib_ifprint = new System.Windows.Forms.DataGridViewCheckBoxColumn();
+            this.pib_ifpick = new System.Windows.Forms.DataGridViewCheckBoxColumn();
+            this.Choose = new System.Windows.Forms.DataGridViewCheckBoxColumn();
             ((System.ComponentModel.ISupportInitialize)(this.Si_ItemDGV)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.MidSource)).BeginInit();
             this.CollectionProcess.SuspendLayout();
@@ -666,7 +666,7 @@
             // ChooseAll
             // 
             this.ChooseAll.Location = new System.Drawing.Point(4, 252);
-            this.ChooseAll.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.ChooseAll.Margin = new System.Windows.Forms.Padding(2);
             this.ChooseAll.Name = "ChooseAll";
             this.ChooseAll.Size = new System.Drawing.Size(38, 22);
             this.ChooseAll.TabIndex = 84;
@@ -763,9 +763,9 @@
             this.CollectionProcess.Controls.Add(this.Installed);
             this.CollectionProcess.Controls.Add(this.Process);
             this.CollectionProcess.Location = new System.Drawing.Point(464, 10);
-            this.CollectionProcess.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.CollectionProcess.Margin = new System.Windows.Forms.Padding(2);
             this.CollectionProcess.Name = "CollectionProcess";
-            this.CollectionProcess.Padding = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.CollectionProcess.Padding = new System.Windows.Forms.Padding(2);
             this.CollectionProcess.Size = new System.Drawing.Size(130, 152);
             this.CollectionProcess.TabIndex = 80;
             this.CollectionProcess.TabStop = false;
@@ -983,7 +983,7 @@
             this.LabelInf.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.LabelInf.Name = "LabelInf";
             this.LabelInf.RowTemplate.Height = 23;
-            this.LabelInf.Size = new System.Drawing.Size(1251, 326);
+            this.LabelInf.Size = new System.Drawing.Size(959, 326);
             this.LabelInf.TabIndex = 27;
             this.LabelInf.CellPainting += new System.Windows.Forms.DataGridViewCellPaintingEventHandler(this.LabelInf_CellPainting);
             this.LabelInf.DataError += new System.Windows.Forms.DataGridViewDataErrorEventHandler(this.LabelInf_DataError);
@@ -1001,84 +1001,66 @@
             this.pi_inoutno.TabIndex = 2;
             this.pi_inoutno.KeyDown += new System.Windows.Forms.KeyEventHandler(this.pi_inoutno_KeyDown);
             // 
-            // Choose
-            // 
-            this.Choose.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
-            this.Choose.DataPropertyName = "Choose";
-            this.Choose.HeaderText = "勾选";
-            this.Choose.Name = "Choose";
-            this.Choose.Resizable = System.Windows.Forms.DataGridViewTriState.True;
-            this.Choose.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
-            this.Choose.Width = 55;
-            // 
-            // pib_ifpick
+            // pib_qty
             // 
-            this.pib_ifpick.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
-            this.pib_ifpick.DataPropertyName = "pib_ifpick";
-            this.pib_ifpick.HeaderText = "已采集";
-            this.pib_ifpick.Name = "pib_ifpick";
-            this.pib_ifpick.Width = 60;
+            this.pib_qty.DataPropertyName = "pib_qty";
+            this.pib_qty.HeaderText = "数量";
+            this.pib_qty.Name = "pib_qty";
+            this.pib_qty.ReadOnly = true;
+            this.pib_qty.Width = 54;
             // 
-            // pib_ifprint
+            // pib_datecode
             // 
-            this.pib_ifprint.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
-            this.pib_ifprint.DataPropertyName = "pib_ifprint";
-            this.pib_ifprint.HeaderText = "已打印";
-            this.pib_ifprint.Name = "pib_ifprint";
-            this.pib_ifprint.Visible = false;
-            this.pib_ifprint.Width = 60;
+            this.pib_datecode.DataPropertyName = "pib_datecode";
+            this.pib_datecode.HeaderText = "DC";
+            this.pib_datecode.Name = "pib_datecode";
+            this.pib_datecode.Width = 42;
             // 
-            // pib_id1
+            // pib_lotno
             // 
-            this.pib_id1.DataPropertyName = "pib_id";
-            this.pib_id1.HeaderText = "pib_id";
-            this.pib_id1.Name = "pib_id1";
-            this.pib_id1.Visible = false;
-            this.pib_id1.Width = 66;
+            this.pib_lotno.DataPropertyName = "pib_lotno";
+            this.pib_lotno.HeaderText = "LotNo";
+            this.pib_lotno.Name = "pib_lotno";
+            this.pib_lotno.Width = 60;
             // 
-            // pib_pdno
+            // pr_unit
             // 
-            this.pib_pdno.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
-            this.pib_pdno.DataPropertyName = "pib_pdno";
-            this.pib_pdno.HeaderText = "明细序号";
-            this.pib_pdno.Name = "pib_pdno";
-            this.pib_pdno.ReadOnly = true;
-            this.pib_pdno.Width = 96;
+            this.pr_unit.DataPropertyName = "pr_unit";
+            this.pr_unit.HeaderText = "单位";
+            this.pr_unit.Name = "pr_unit";
+            this.pr_unit.Visible = false;
+            this.pr_unit.Width = 54;
             // 
-            // pib_prodcode
+            // pr_zxbzs
             // 
-            this.pib_prodcode.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCellsExceptHeader;
-            this.pib_prodcode.DataPropertyName = "pib_prodcode";
-            this.pib_prodcode.HeaderText = "物料编号";
-            this.pib_prodcode.MinimumWidth = 100;
-            this.pib_prodcode.Name = "pib_prodcode";
-            this.pib_prodcode.ReadOnly = true;
+            this.pr_zxbzs.DataPropertyName = "pr_zxbzs";
+            this.pr_zxbzs.HeaderText = "最小包装数";
+            this.pr_zxbzs.Name = "pr_zxbzs";
+            this.pr_zxbzs.Visible = false;
+            this.pr_zxbzs.Width = 90;
             // 
-            // pr_orispeccode
+            // pib_madein
             // 
-            this.pr_orispeccode.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCellsExceptHeader;
-            this.pr_orispeccode.DataPropertyName = "pr_orispeccode";
-            this.pr_orispeccode.HeaderText = "MPN";
-            this.pr_orispeccode.MinimumWidth = 100;
-            this.pr_orispeccode.Name = "pr_orispeccode";
-            this.pr_orispeccode.ReadOnly = true;
+            this.pib_madein.DataPropertyName = "pib_madein";
+            this.pib_madein.HeaderText = "产地";
+            this.pib_madein.Name = "pib_madein";
+            this.pib_madein.Width = 54;
             // 
-            // pd_custprodcode
+            // pib_brand
             // 
-            this.pd_custprodcode.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCellsExceptHeader;
-            this.pd_custprodcode.DataPropertyName = "pd_custprodcode";
-            this.pd_custprodcode.HeaderText = "客户料号";
-            this.pd_custprodcode.MinimumWidth = 100;
-            this.pd_custprodcode.Name = "pd_custprodcode";
-            this.pd_custprodcode.ReadOnly = true;
+            this.pib_brand.DataPropertyName = "pib_brand";
+            this.pib_brand.HeaderText = "品牌";
+            this.pib_brand.Name = "pib_brand";
+            this.pib_brand.ReadOnly = true;
+            this.pib_brand.Width = 54;
             // 
-            // pd_pocode
+            // pr_spec
             // 
-            this.pd_pocode.DataPropertyName = "pd_pocode";
-            this.pd_pocode.HeaderText = "客户PO";
-            this.pd_pocode.Name = "pd_pocode";
-            this.pd_pocode.ReadOnly = true;
-            this.pd_pocode.Width = 66;
+            this.pr_spec.DataPropertyName = "pr_spec";
+            this.pr_spec.HeaderText = "规格";
+            this.pr_spec.Name = "pr_spec";
+            this.pr_spec.Visible = false;
+            this.pr_spec.Width = 54;
             // 
             // pd_custprodspec
             // 
@@ -1088,73 +1070,91 @@
             this.pd_custprodspec.ReadOnly = true;
             this.pd_custprodspec.Width = 78;
             // 
-            // pr_spec
+            // pd_pocode
             // 
-            this.pr_spec.DataPropertyName = "pr_spec";
-            this.pr_spec.HeaderText = "规格";
-            this.pr_spec.Name = "pr_spec";
-            this.pr_spec.Visible = false;
-            this.pr_spec.Width = 54;
+            this.pd_pocode.DataPropertyName = "pd_pocode";
+            this.pd_pocode.HeaderText = "客户PO";
+            this.pd_pocode.Name = "pd_pocode";
+            this.pd_pocode.ReadOnly = true;
+            this.pd_pocode.Width = 66;
             // 
-            // pib_brand
+            // pd_custprodcode
             // 
-            this.pib_brand.DataPropertyName = "pib_brand";
-            this.pib_brand.HeaderText = "品牌";
-            this.pib_brand.Name = "pib_brand";
-            this.pib_brand.ReadOnly = true;
-            this.pib_brand.Width = 54;
+            this.pd_custprodcode.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCellsExceptHeader;
+            this.pd_custprodcode.DataPropertyName = "pd_custprodcode";
+            this.pd_custprodcode.HeaderText = "客户料号";
+            this.pd_custprodcode.MinimumWidth = 100;
+            this.pd_custprodcode.Name = "pd_custprodcode";
+            this.pd_custprodcode.ReadOnly = true;
             // 
-            // pib_madein
+            // pr_orispeccode
             // 
-            this.pib_madein.DataPropertyName = "pib_madein";
-            this.pib_madein.HeaderText = "产地";
-            this.pib_madein.Name = "pib_madein";
-            this.pib_madein.Width = 54;
+            this.pr_orispeccode.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCellsExceptHeader;
+            this.pr_orispeccode.DataPropertyName = "pr_orispeccode";
+            this.pr_orispeccode.HeaderText = "MPN";
+            this.pr_orispeccode.MinimumWidth = 100;
+            this.pr_orispeccode.Name = "pr_orispeccode";
+            this.pr_orispeccode.ReadOnly = true;
             // 
-            // pr_zxbzs
+            // pib_prodcode
             // 
-            this.pr_zxbzs.DataPropertyName = "pr_zxbzs";
-            this.pr_zxbzs.HeaderText = "最小包装数";
-            this.pr_zxbzs.Name = "pr_zxbzs";
-            this.pr_zxbzs.Visible = false;
-            this.pr_zxbzs.Width = 90;
+            this.pib_prodcode.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCellsExceptHeader;
+            this.pib_prodcode.DataPropertyName = "pib_prodcode";
+            this.pib_prodcode.HeaderText = "物料编号";
+            this.pib_prodcode.MinimumWidth = 100;
+            this.pib_prodcode.Name = "pib_prodcode";
+            this.pib_prodcode.ReadOnly = true;
             // 
-            // pr_unit
+            // pib_pdno
             // 
-            this.pr_unit.DataPropertyName = "pr_unit";
-            this.pr_unit.HeaderText = "单位";
-            this.pr_unit.Name = "pr_unit";
-            this.pr_unit.Visible = false;
-            this.pr_unit.Width = 54;
+            this.pib_pdno.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
+            this.pib_pdno.DataPropertyName = "pib_pdno";
+            this.pib_pdno.HeaderText = "明细序号";
+            this.pib_pdno.Name = "pib_pdno";
+            this.pib_pdno.ReadOnly = true;
+            this.pib_pdno.Width = 96;
             // 
-            // pib_lotno
+            // pib_id1
             // 
-            this.pib_lotno.DataPropertyName = "pib_lotno";
-            this.pib_lotno.HeaderText = "LotNo";
-            this.pib_lotno.Name = "pib_lotno";
-            this.pib_lotno.Width = 60;
+            this.pib_id1.DataPropertyName = "pib_id";
+            this.pib_id1.HeaderText = "pib_id";
+            this.pib_id1.Name = "pib_id1";
+            this.pib_id1.Visible = false;
+            this.pib_id1.Width = 66;
             // 
-            // pib_datecode
+            // pib_ifprint
             // 
-            this.pib_datecode.DataPropertyName = "pib_datecode";
-            this.pib_datecode.HeaderText = "DC";
-            this.pib_datecode.Name = "pib_datecode";
-            this.pib_datecode.Width = 42;
+            this.pib_ifprint.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
+            this.pib_ifprint.DataPropertyName = "pib_ifprint";
+            this.pib_ifprint.HeaderText = "已打印";
+            this.pib_ifprint.Name = "pib_ifprint";
+            this.pib_ifprint.Visible = false;
+            this.pib_ifprint.Width = 60;
             // 
-            // pib_qty
+            // pib_ifpick
             // 
-            this.pib_qty.DataPropertyName = "pib_qty";
-            this.pib_qty.HeaderText = "数量";
-            this.pib_qty.Name = "pib_qty";
-            this.pib_qty.ReadOnly = true;
-            this.pib_qty.Width = 54;
+            this.pib_ifpick.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
+            this.pib_ifpick.DataPropertyName = "pib_ifpick";
+            this.pib_ifpick.HeaderText = "已采集";
+            this.pib_ifpick.Name = "pib_ifpick";
+            this.pib_ifpick.Width = 60;
+            // 
+            // Choose
+            // 
+            this.Choose.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
+            this.Choose.DataPropertyName = "Choose";
+            this.Choose.HeaderText = "勾选";
+            this.Choose.Name = "Choose";
+            this.Choose.Resizable = System.Windows.Forms.DataGridViewTriState.True;
+            this.Choose.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
+            this.Choose.Width = 55;
             // 
             // UAS_出货标签打印
             // 
             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(962, 530);
+            this.ClientSize = new System.Drawing.Size(962, 709);
             this.Controls.Add(this.ExportData);
             this.Controls.Add(this.cu_code);
             this.Controls.Add(this.CleanBarCode);

+ 13 - 7
UAS-出货标签管理(标签复核)/UAS_出货标签管理.cs

@@ -300,6 +300,12 @@ namespace UAS_LabelMachine
                         FindAutoMatch = true;
                         break;
                     }
+                    if (LabelInf.Rows[i].Cells["pd_custprodcode"].Value.ToString() == MatchStr(arr[j].ToString(), "CPN") && LabelInf.Rows[i].Cells["pib_ifpick"].FormattedValue.ToString() != "True")
+                    {
+                        CurrentRowIndex = i;
+                        FindAutoMatch = true;
+                        break;
+                    }
                 }
                 if (FindAutoMatch)
                     break;
@@ -455,8 +461,8 @@ namespace UAS_LabelMachine
                     SetRowIndexToCollectRow();
             }
             //提醒用户需要采集的数据
-            RemindUser();
             MessageLog.AppendText(">>扫描到数据" + Input.Text + "\n", Color.Blue);
+            RemindUser();
             //如果所采集的行的物料不一样的话,重新计算箱内容量
             if (CurrentRowIndex - 1 > 0)
             {
@@ -588,22 +594,22 @@ namespace UAS_LabelMachine
                             setdata.Remove("QTY");
                             length--;
                             break;
-                        case "客户料号":
+                        case "CPN":
                             cell = LabelInf.Rows[CurrentRowIndex].Cells["pd_custprodcode"];
-                            Matchstr = MatchStr(data[j], "品牌");
+                            Matchstr = MatchStr(data[j], "CPN");
                             //如果采集的数量不相等的话
                             if (cell.Value.ToString() != Matchstr)
                             {
                                 CollectQTYPass = false;
                                 LabelInf.Refresh();
-                                MessageLog.AppendText(">>品牌不匹配\n", Color.Red);
+                                MessageLog.AppendText(">>CPN不匹配\n", Color.Red);
                             }
                             else
                             {
                                 LabelInf.Refresh();
                                 CollectQTYPass = true;
                             }
-                            setdata.Remove("品牌");
+                            setdata.Remove("CPN");
                             length--;
                             break;
                         default:
@@ -614,7 +620,7 @@ namespace UAS_LabelMachine
                     if (cell.Value.ToString() == "" || cell.Value.ToString() != Matchstr)
                     {
                         string MatchResult = "";
-                        if (kind != "MPN" && kind != "QTY" && kind != "品牌")
+                        if (kind != "MPN" && kind != "QTY" && kind != "CPN")
                         {
                             DataTable dt = (DataTable)MidSource.DataSource;
                             cell.Value = Matchstr;
@@ -815,7 +821,7 @@ namespace UAS_LabelMachine
             sql.Append("pib_lotno,pib_datecode,pib_qty,pr_spec,pr_zxbzs,pr_unit,pib_barcode,pib_outboxcode1,pib_outboxcode2,nvl(pib_ifpick,0)pib_ifpick,nvl(pib_ifprint,0)pib_ifprint");
             sql.Append(" from prodiobarcode left join prodiodetail on pib_piid=pd_piid and pd_pdno=pib_pdno and ");
             sql.Append(" pd_prodcode=pib_prodcode left join product on pr_code=pib_prodcode left join sale on sa_code=pib_ordercode ");
-            sql.Append("where pib_piid='" + PI_ID + "' order by pd_detno");
+            sql.Append("where pib_piid='" + PI_ID + "' order by pd_pdno");
             dt = (DataTable)dh.ExecuteSql(sql.ToString(), "select");
             MidSource.DataSource = dt;
             BaseUtil.FillDgvWithDataTable(LabelInf, (DataTable)MidSource.DataSource);

ファイルの差分が大きいため隠しています
+ 202 - 306
UAS-出货标签管理(标签复核)/采集策略.Designer.cs


+ 4 - 4
UAS-出货标签管理(标签复核)/采集策略.cs

@@ -81,7 +81,7 @@ namespace UAS_LabelMachine
                 sql.Append("sg_separator=:sg_separator where sg_id=" + sg_id.Text);
                 dh.ExecuteSql(sql.ToString(), "update", new string[] { sg_separator.Text });
                 dh.ExecuteSql("delete from scanitem where si_sgid=" + sg_id.Text, "delete");
-                for (int i = 1; i < ItemNum; i++)
+                for (int i = 1; i <= ItemNum; i++)
                 {
                     //保存四条记录,通过si_enable字段来判断是否启用
                     int Enable = 0;
@@ -111,7 +111,7 @@ namespace UAS_LabelMachine
                     sql.Append("'" + pb_name.Text + "',:sg_separator)");
                     dh.ExecuteSql(sql.ToString(), "insert", new string[] { sg_separator.Text });
                     //遍历需要采集的字段
-                    for (int i = 1; i < ItemNum; i++)
+                    for (int i = 1; i <= ItemNum; i++)
                     {
                         //保存四条记录,通过si_enable字段来判断是否启用
                         int Enable = 0;
@@ -172,7 +172,7 @@ namespace UAS_LabelMachine
                 case "MPN":
                     i = 4;
                     break;
-                case "客户料号":
+                case "CPN":
                     i = 5;
                     break;
                 default:
@@ -217,7 +217,7 @@ namespace UAS_LabelMachine
                     //通过匹配采集的字段名称给界面赋值
                     for (int i = 0; i < dt.Rows.Count; i++)
                     {
-                        for (int j = 1; j < ItemNum; j++)
+                        for (int j = 1; j <= ItemNum; j++)
                         {
                             //如果Item和CheckBox的文字相等
                             if (dt.Rows[i]["si_item"].ToString() == Controls["si_type" + j].Text)

この差分においてかなりの量のファイルが変更されているため、一部のファイルを表示していません