Browse Source

Merge branch 'master' of ssh://10.10.101.21/source/mes-client

Hcsy 8 years ago
parent
commit
9ca00f324a
33 changed files with 981 additions and 737 deletions
  1. 0 4
      UAS-MES/CustomControl/AccordionMenu/AccordionMenu.cs
  2. 3 7
      UAS-MES/CustomControl/TextBoxWithIcon/SearchTextBox.Designer.cs
  3. 0 38
      UAS-MES/CustomControl/TextBoxWithIcon/SearchTextBox.cs
  4. 4 4
      UAS-MES/FunctionCode/Employee/Employee_ChooseUserToGroup.Designer.cs
  5. 17 66
      UAS-MES/FunctionCode/Make/Make_NewMatainInf.Designer.cs
  6. 24 21
      UAS-MES/FunctionCode/Make/Make_NewMatainInf.cs
  7. 96 54
      UAS-MES/FunctionCode/Make/Make_Repair.Designer.cs
  8. 192 37
      UAS-MES/FunctionCode/Make/Make_Repair.cs
  9. 18 0
      UAS-MES/FunctionCode/Make/Make_Repair.resx
  10. 1 1
      UAS-MES/Program.cs
  11. 28 0
      UAS-MES/Settings.cs
  12. 7 1
      UAS-MES/UAS-MES.csproj
  13. BIN
      UAS-MES/U_Icon.ico
  14. 12 7
      UAS-出货标签管理/Login.Designer.cs
  15. 1 1
      UAS-出货标签管理/Login.cs
  16. 3 0
      UAS-出货标签管理/Login.resx
  17. 2 0
      UAS-出货标签管理/PowerSetting.cs
  18. 3 1
      UAS-出货标签管理/Program.cs
  19. 2 2
      UAS-出货标签管理/PublicMethod/BaseUtil.cs
  20. 17 5
      UAS-出货标签管理/PublicMethod/DataHelper.cs
  21. 1 1
      UAS-出货标签管理/PublicMethod/GlobalEventsHandler.cs
  22. 8 5
      UAS-出货标签管理/PublicMethod/ftpOperater.cs
  23. 2 2
      UAS-出货标签管理/UAS-出货标签管理.csproj
  24. 189 184
      UAS-出货标签管理/UAS_出货标签管理.Designer.cs
  25. 30 13
      UAS-出货标签管理/UAS_出货标签管理.cs
  26. 113 104
      UAS-出货标签管理/客户标签维护.Designer.cs
  27. 12 15
      UAS-出货标签管理/客户标签维护.cs
  28. 3 0
      UAS-出货标签管理/客户标签维护.resx
  29. 51 28
      UAS-出货标签管理/生成条码.Designer.cs
  30. 15 12
      UAS-出货标签管理/生成条码.cs
  31. 3 0
      UAS-出货标签管理/生成条码.resx
  32. 122 122
      UAS-出货标签管理/采集策略.Designer.cs
  33. 2 2
      UAS-出货标签管理/采集策略.cs

+ 0 - 4
UAS-MES/CustomControl/AccordionMenu/AccordionMenu.cs

@@ -283,7 +283,6 @@ namespace UAS_MES.CustomControl.AccordionMenu
             OpenForm.Text = item.Text;
             //用Tag保存Caller
             OpenForm.Tag = item.ToolTipText;
-
             TabControl tc = (TabControl)this.Parent.Parent.Controls["MainTabControl"];
             //如果窗体不存在进行打开,item.ToolTip是Caller
             if (!OpenedFormName.ContainsKey(item.ToolTipText))
@@ -302,10 +301,7 @@ namespace UAS_MES.CustomControl.AccordionMenu
             }
             //如果窗体已存在展示该窗体
             else
-                //  tc.SelectedTab = (TabPage)this.Parent.Parent.Controls["MainTabControl"].Controls["UAS_MES." + item.Tag];
                  tc.SelectTab(item.Name);
-
-           
         }
     }
 }

+ 3 - 7
UAS-MES/CustomControl/TextBoxWithIcon/SearchTextBox.Designer.cs

@@ -29,7 +29,7 @@
         private void InitializeComponent()
         {
             this.Search_Icon = new UAS_MES.CustomControl.ClickPicBox.ClickPicBox();
-            this.TextBox = new UAS_MES.CustomControl.TextBoxWithIcon.MaCodeTextBox();
+            this.TextBox = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
             ((System.ComponentModel.ISupportInitialize)(this.Search_Icon)).BeginInit();
             this.SuspendLayout();
             // 
@@ -56,11 +56,7 @@
             this.TextBox.Location = new System.Drawing.Point(0, 0);
             this.TextBox.Name = "TextBox";
             this.TextBox.Power = null;
-
-            this.TextBox.Size = new System.Drawing.Size(247, 28);
-
-            this.TextBox.Size = new System.Drawing.Size(178, 21);
-
+            this.TextBox.Size = new System.Drawing.Size(178, 25);
             this.TextBox.Str = null;
             this.TextBox.Str1 = null;
             this.TextBox.Str2 = null;
@@ -87,6 +83,6 @@
         #endregion
 
         private ClickPicBox.ClickPicBox Search_Icon;
-        private MaCodeTextBox TextBox;
+        private EnterTextBox TextBox;
     }
 }

+ 0 - 38
UAS-MES/CustomControl/TextBoxWithIcon/SearchTextBox.cs

@@ -270,44 +270,6 @@ namespace UAS_MES.CustomControl.TextBoxWithIcon
         public void TextBox_Leave(object sender, EventArgs e)
         {
             TextBox.BackColor = System.Drawing.Color.White;
-            //if (TextBox.Text != "") {
-            //    DataHelper dh = new DataHelper();
-
-            //    List<string> fields = new List<string>();
-            //    //获取查询的字段
-            //    string[] field = selectField.Replace(",", "#").Trim().Split('#');
-            //    for (int i = 0; i < field.Length; i++)
-            //    {
-            //        if (i % 2 == 0)
-            //            fields.Add(field[i]);
-            //    }
-            //    //将查询到的结果返回界面
-            //    string sql = "select " + BaseUtil.AddField(fields.ToArray()) + " from " + tableName + " where " + Tag + "='" + TextBox.Text + "'";
-            //    if (condition != null)
-            //    {
-            //        sql += " and " + condition;
-            //    }
-            //    DataTable dt = (DataTable)dh.ExecuteSql(sql, "select");
-            //    FormCollection fmCollection = Application.OpenForms;
-            //    if (dt.Rows.Count > 0)
-            //    {
-            //        for (int i = 0; i < dt.Columns.Count; i++)
-            //        {
-            //            for (int j = 0; j < SetValueField.Length; j++)
-            //            {
-            //                //利用字段的Tag属性来和列名进行比对
-            //                object tag = fmCollection[FormName].Controls[SetValueField[j]].Tag;
-            //                if (SetValueField[j] == dt.Columns[i].ColumnName.ToLower() || (tag != null && tag == dt.Columns[i].ColumnName.ToLower()))
-            //                {
-            //                    fmCollection[FormName].Controls[SetValueField[j]].Text = dt.Rows[0][dt.Columns[i].ColumnName].ToString();
-            //                }
-            //            }
-            //        }
-            //        LeaveFindData = true;
-            //    }
-            //    else
-            //        LeaveFindData = false;
-            //}
         }
 
         private void SearchTextBox_Load(object sender, EventArgs e)

+ 4 - 4
UAS-MES/FunctionCode/Employee/Employee_ChooseUserToGroup.Designer.cs

@@ -66,7 +66,7 @@
             // 
             this.ug_code_title.AutoSize = true;
             this.ug_code_title.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ug_code_title.Location = new System.Drawing.Point(157, 12);
+            this.ug_code_title.Location = new System.Drawing.Point(155, 12);
             this.ug_code_title.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.ug_code_title.Name = "ug_code_title";
             this.ug_code_title.Size = new System.Drawing.Size(0, 27);
@@ -87,7 +87,7 @@
             // 
             this.ug_name_title.AutoSize = true;
             this.ug_name_title.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ug_name_title.Location = new System.Drawing.Point(157, 52);
+            this.ug_name_title.Location = new System.Drawing.Point(155, 52);
             this.ug_name_title.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.ug_name_title.Name = "ug_name_title";
             this.ug_name_title.Size = new System.Drawing.Size(0, 27);
@@ -383,7 +383,7 @@
             this.em_code3.Power = null;
             this.em_code3.SelectField = null;
             this.em_code3.SetValueField = null;
-            this.em_code3.Size = new System.Drawing.Size(230, 26);
+            this.em_code3.Size = new System.Drawing.Size(223, 25);
             this.em_code3.TabIndex = 258;
             this.em_code3.TableName = null;
             this.em_code3.Tag = "em_code";
@@ -402,7 +402,7 @@
             this.em_code2.Power = null;
             this.em_code2.SelectField = null;
             this.em_code2.SetValueField = null;
-            this.em_code2.Size = new System.Drawing.Size(227, 26);
+            this.em_code2.Size = new System.Drawing.Size(219, 25);
             this.em_code2.TabIndex = 259;
             this.em_code2.TableName = null;
             this.em_code2.Tag = "em_code";

+ 17 - 66
UAS-MES/FunctionCode/Make/Make_NewMatainInf.Designer.cs

@@ -28,34 +28,23 @@
         /// </summary>
         private void InitializeComponent()
         {
-            System.Windows.Forms.ListViewItem listViewItem1 = new System.Windows.Forms.ListViewItem(new string[] {
-            "",
-            "主板"}, -1);
-            System.Windows.Forms.ListViewItem listViewItem2 = new System.Windows.Forms.ListViewItem(new string[] {
-            "",
-            "液晶屏"}, -1);
-            System.Windows.Forms.ListViewItem listViewItem3 = new System.Windows.Forms.ListViewItem(new string[] {
-            "",
-            "电路板"}, -1);
+            System.Windows.Forms.ListViewItem listViewItem1 = new System.Windows.Forms.ListViewItem("主板");
+            System.Windows.Forms.ListViewItem listViewItem2 = new System.Windows.Forms.ListViewItem("液晶屏");
+            System.Windows.Forms.ListViewItem listViewItem3 = new System.Windows.Forms.ListViewItem("电路板");
             System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Make_NewMatainInf));
             this.mbc_component_lsv = new System.Windows.Forms.ListView();
             this.columnHeader1 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
-            this.mbc_component = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
             this.nrg_name_lsv = new System.Windows.Forms.ListView();
-            this.columnHeader3 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
             this.nrg_code = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
             this.nrg_name = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
             this.nr_name_lsv = new System.Windows.Forms.ListView();
-            this.columnHeader9 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
             this.nr_code = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
             this.nr_name = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
             this.nr_groupcode = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
             this.mbr_dutycode_lsv = new System.Windows.Forms.ListView();
-            this.columnHeader5 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
             this.nd_code = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
             this.nd_name = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
             this.mbr_solutioncode_lsv = new System.Windows.Forms.ListView();
-            this.columnHeader7 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
             this.so_code = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
             this.so_name = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
             this.Cancel = new UAS_MES.CustomControl.ButtonUtil.NormalButton();
@@ -71,14 +60,10 @@
             // 
             // mbc_component_lsv
             // 
-            this.mbc_component_lsv.CheckBoxes = true;
             this.mbc_component_lsv.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
-            this.columnHeader1,
-            this.mbc_component});
+            this.columnHeader1});
             this.mbc_component_lsv.Font = new System.Drawing.Font("微软雅黑", 10.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            listViewItem1.StateImageIndex = 0;
-            listViewItem2.StateImageIndex = 0;
-            listViewItem3.StateImageIndex = 0;
+            this.mbc_component_lsv.FullRowSelect = true;
             this.mbc_component_lsv.Items.AddRange(new System.Windows.Forms.ListViewItem[] {
             listViewItem1,
             listViewItem2,
@@ -89,39 +74,28 @@
             this.mbc_component_lsv.TabIndex = 1;
             this.mbc_component_lsv.UseCompatibleStateImageBehavior = false;
             this.mbc_component_lsv.View = System.Windows.Forms.View.Details;
-            this.mbc_component_lsv.ItemChecked += new System.Windows.Forms.ItemCheckedEventHandler(this.OnlyCheckOne_ItemChecked);
+            this.mbc_component_lsv.ItemSelectionChanged += new System.Windows.Forms.ListViewItemSelectionChangedEventHandler(this.ListView_ItemSelectionChanged);
             // 
             // columnHeader1
             // 
-            this.columnHeader1.Text = "";
-            this.columnHeader1.Width = 28;
-            // 
-            // mbc_component
-            // 
-            this.mbc_component.Text = "不良组件";
-            this.mbc_component.Width = 164;
+            this.columnHeader1.Text = "不良组件";
+            this.columnHeader1.Width = 137;
             // 
             // nrg_name_lsv
             // 
-            this.nrg_name_lsv.CheckBoxes = true;
             this.nrg_name_lsv.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
-            this.columnHeader3,
             this.nrg_code,
             this.nrg_name});
             this.nrg_name_lsv.Cursor = System.Windows.Forms.Cursors.Default;
             this.nrg_name_lsv.Font = new System.Drawing.Font("微软雅黑", 10.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.nrg_name_lsv.FullRowSelect = true;
             this.nrg_name_lsv.Location = new System.Drawing.Point(309, 159);
             this.nrg_name_lsv.Name = "nrg_name_lsv";
             this.nrg_name_lsv.Size = new System.Drawing.Size(264, 190);
             this.nrg_name_lsv.TabIndex = 2;
             this.nrg_name_lsv.UseCompatibleStateImageBehavior = false;
             this.nrg_name_lsv.View = System.Windows.Forms.View.Details;
-            this.nrg_name_lsv.ItemChecked += new System.Windows.Forms.ItemCheckedEventHandler(this.OnlyCheckOne_ItemChecked);
-            // 
-            // columnHeader3
-            // 
-            this.columnHeader3.Text = "";
-            this.columnHeader3.Width = 30;
+            this.nrg_name_lsv.ItemSelectionChanged += new System.Windows.Forms.ListViewItemSelectionChangedEventHandler(this.ListView_ItemSelectionChanged);
             // 
             // nrg_code
             // 
@@ -135,25 +109,19 @@
             // 
             // nr_name_lsv
             // 
-            this.nr_name_lsv.CheckBoxes = true;
             this.nr_name_lsv.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
-            this.columnHeader9,
             this.nr_code,
             this.nr_name,
             this.nr_groupcode});
             this.nr_name_lsv.Font = new System.Drawing.Font("微软雅黑", 10.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.nr_name_lsv.FullRowSelect = true;
             this.nr_name_lsv.Location = new System.Drawing.Point(581, 159);
             this.nr_name_lsv.Name = "nr_name_lsv";
             this.nr_name_lsv.Size = new System.Drawing.Size(241, 381);
             this.nr_name_lsv.TabIndex = 3;
             this.nr_name_lsv.UseCompatibleStateImageBehavior = false;
             this.nr_name_lsv.View = System.Windows.Forms.View.Details;
-            this.nr_name_lsv.ItemChecked += new System.Windows.Forms.ItemCheckedEventHandler(this.OnlyCheckOne_ItemChecked);
-            // 
-            // columnHeader9
-            // 
-            this.columnHeader9.Text = "";
-            this.columnHeader9.Width = 30;
+            this.nr_name_lsv.ItemSelectionChanged += new System.Windows.Forms.ListViewItemSelectionChangedEventHandler(this.ListView_ItemSelectionChanged);
             // 
             // nr_code
             // 
@@ -170,24 +138,18 @@
             // 
             // mbr_dutycode_lsv
             // 
-            this.mbr_dutycode_lsv.CheckBoxes = true;
             this.mbr_dutycode_lsv.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
-            this.columnHeader5,
             this.nd_code,
             this.nd_name});
             this.mbr_dutycode_lsv.Font = new System.Drawing.Font("微软雅黑", 10.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.mbr_dutycode_lsv.FullRowSelect = true;
             this.mbr_dutycode_lsv.Location = new System.Drawing.Point(12, 355);
             this.mbr_dutycode_lsv.Name = "mbr_dutycode_lsv";
             this.mbr_dutycode_lsv.Size = new System.Drawing.Size(291, 185);
             this.mbr_dutycode_lsv.TabIndex = 5;
             this.mbr_dutycode_lsv.UseCompatibleStateImageBehavior = false;
             this.mbr_dutycode_lsv.View = System.Windows.Forms.View.Details;
-            this.mbr_dutycode_lsv.ItemChecked += new System.Windows.Forms.ItemCheckedEventHandler(this.OnlyCheckOne_ItemChecked);
-            // 
-            // columnHeader5
-            // 
-            this.columnHeader5.Text = "";
-            this.columnHeader5.Width = 30;
+            this.mbr_dutycode_lsv.ItemSelectionChanged += new System.Windows.Forms.ListViewItemSelectionChangedEventHandler(this.ListView_ItemSelectionChanged);
             // 
             // nd_code
             // 
@@ -201,24 +163,18 @@
             // 
             // mbr_solutioncode_lsv
             // 
-            this.mbr_solutioncode_lsv.CheckBoxes = true;
             this.mbr_solutioncode_lsv.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
-            this.columnHeader7,
             this.so_code,
             this.so_name});
             this.mbr_solutioncode_lsv.Font = new System.Drawing.Font("微软雅黑", 10.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.mbr_solutioncode_lsv.FullRowSelect = true;
             this.mbr_solutioncode_lsv.Location = new System.Drawing.Point(309, 355);
             this.mbr_solutioncode_lsv.Name = "mbr_solutioncode_lsv";
             this.mbr_solutioncode_lsv.Size = new System.Drawing.Size(264, 185);
             this.mbr_solutioncode_lsv.TabIndex = 6;
             this.mbr_solutioncode_lsv.UseCompatibleStateImageBehavior = false;
             this.mbr_solutioncode_lsv.View = System.Windows.Forms.View.Details;
-            this.mbr_solutioncode_lsv.ItemChecked += new System.Windows.Forms.ItemCheckedEventHandler(this.OnlyCheckOne_ItemChecked);
-            // 
-            // columnHeader7
-            // 
-            this.columnHeader7.Text = "";
-            this.columnHeader7.Width = 30;
+            this.mbr_solutioncode_lsv.ItemSelectionChanged += new System.Windows.Forms.ListViewItemSelectionChangedEventHandler(this.ListView_ItemSelectionChanged);
             // 
             // so_code
             // 
@@ -398,20 +354,15 @@
         private System.Windows.Forms.ListView mbr_solutioncode_lsv;
         private CustomControl.ButtonUtil.NormalButton Cancel;
         private CustomControl.ButtonUtil.NormalButton Save;
-        private System.Windows.Forms.ColumnHeader columnHeader1;
-        private System.Windows.Forms.ColumnHeader mbc_component;
-        private System.Windows.Forms.ColumnHeader columnHeader3;
         private System.Windows.Forms.ColumnHeader nrg_name;
-        private System.Windows.Forms.ColumnHeader columnHeader5;
         private System.Windows.Forms.ColumnHeader nd_code;
-        private System.Windows.Forms.ColumnHeader columnHeader7;
         private System.Windows.Forms.ColumnHeader so_code;
-        private System.Windows.Forms.ColumnHeader columnHeader9;
         private System.Windows.Forms.ColumnHeader nr_name;
         private System.Windows.Forms.ColumnHeader nrg_code;
         private System.Windows.Forms.ColumnHeader nr_code;
         private System.Windows.Forms.ColumnHeader nr_groupcode;
         private System.Windows.Forms.ColumnHeader nd_name;
         private System.Windows.Forms.ColumnHeader so_name;
+        private System.Windows.Forms.ColumnHeader columnHeader1;
     }
 }

+ 24 - 21
UAS-MES/FunctionCode/Make/Make_NewMatainInf.cs

@@ -122,38 +122,26 @@ namespace UAS_MES.Make
             Close();
         }
 
-        private void OnlyCheckOne_ItemChecked(object sender, ItemCheckedEventArgs e)
-        {
-            if (e.Item.Checked)
-            {
-                foreach (ListViewItem item in (sender as ListView).CheckedItems)
-                {
-                    if (item != e.Item)
-                        item.Checked = false;
-                }
-            }
-        }
-
         private int GetListViewCheckCount(ListView lsv)
         {
             int CheckedNum = 0;
             //已存在在ListView中的Item是不能添加到其他ListView中的,需要调用其克隆的方法
             for (int i = lsv.Items.Count - 1; i >= 0; i--)
             {
-                if (lsv.Items[i].Checked)
+                if (lsv.Items[i].Selected)
                     CheckedNum++;
             }
             return CheckedNum;
         }
 
-        private string GetListViewCheckItemText(ListView lsv)
+        private string GetListViewSelectedItemText(ListView lsv)
         {
             string Text = "";
             //已存在在ListView中的Item是不能添加到其他ListView中的,需要调用其克隆的方法
             for (int i = lsv.Items.Count - 1; i >= 0; i--)
             {
-                if (lsv.Items[i].Checked)
-                    Text = lsv.Items[i].SubItems[1].Text;
+                if (lsv.Items[i].Selected)
+                    Text = lsv.Items[i].SubItems[0].Text;
             }
             return Text;
         }
@@ -177,11 +165,16 @@ namespace UAS_MES.Make
             if (ErrorMessage == "")
             {
                 ErrorMessage = "";
-                string mbccomponent = GetListViewCheckItemText(mbc_component_lsv);
-                string nrgname = GetListViewCheckItemText(nrg_name_lsv);
-                string nrname = GetListViewCheckItemText(nr_name_lsv);
-                string mbrdutycode = GetListViewCheckItemText(mbr_dutycode_lsv);
-                string mbrsolutioncode = GetListViewCheckItemText(mbr_solutioncode_lsv);
+                string mbccomponent = GetListViewSelectedItemText(mbc_component_lsv);
+                string nrgname = GetListViewSelectedItemText(nrg_name_lsv);
+                string nrname = GetListViewSelectedItemText(nr_name_lsv);
+                string mbrdutycode = GetListViewSelectedItemText(mbr_dutycode_lsv);
+                string mbrsolutioncode = GetListViewSelectedItemText(mbr_solutioncode_lsv);
+                Console.WriteLine(mbccomponent);
+                Console.WriteLine(nrgname);
+                Console.WriteLine(nrname);
+                Console.WriteLine(mbrdutycode);
+                Console.WriteLine(mbrsolutioncode);
                 dt = (DataTable)dh.ExecuteSql("select ms_makecode from makeserial where ms_id='" + msid + "' and ms_sncode='" + sncode + "' and ms_status=3", "select");
                 if (dt.Rows.Count > 0)
                 {
@@ -223,5 +216,15 @@ namespace UAS_MES.Make
             else
                 MessageBox.Show(ErrorMessage + "未勾选");
         }
+
+        private void ListView_ItemSelectionChanged(object sender, ListViewItemSelectionChangedEventArgs e)
+        { 
+            e.Item.BackColor = Color.LightBlue;
+            foreach (ListViewItem item in (sender as ListView).Items)
+            {
+                if (item != e.Item)
+                    item.BackColor = Color.White;
+            }
+        }
     }
 }

+ 96 - 54
UAS-MES/FunctionCode/Make/Make_Repair.Designer.cs

@@ -34,7 +34,7 @@
             this.label1 = new System.Windows.Forms.Label();
             this.ma_craftcode_label = new System.Windows.Forms.Label();
             this.st_rstepcode_label = new System.Windows.Forms.Label();
-            this.ma_prodcode_label = new System.Windows.Forms.Label();
+            this.ms_prodcode_label = new System.Windows.Forms.Label();
             this.pr_detail_label = new System.Windows.Forms.Label();
             this.label14 = new System.Windows.Forms.Label();
             this.bc_name_label = new System.Windows.Forms.Label();
@@ -57,10 +57,14 @@
             this.ComponentSource = new System.Windows.Forms.BindingSource(this.components);
             this.bc_code = new System.Windows.Forms.Label();
             this.bg_code = new System.Windows.Forms.Label();
+            this.nr_code = new System.Windows.Forms.Label();
+            this.prodcode = new UAS_MES.CustomControl.TextBoxWithIcon.SearchTextBox();
             this.mbp_partdgv = new UAS_MES.CustomControl.DataGrid_View.DataGridViewWithCheckBox();
             this.mbp_part1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.mbp_id = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.mbl_locdgv = new UAS_MES.CustomControl.DataGrid_View.DataGridViewWithCheckBox();
             this.mbl_loc1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.mbl_id = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.RefreshTreeView = new UAS_MES.CustomControl.ClickPicBox.ClickPicBox();
             this.GetSNCode = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
             this.NewRepairInf = new UAS_MES.CustomControl.ButtonUtil.NormalButton();
@@ -77,7 +81,7 @@
             this.mb_badremark = new UAS_MES.CustomControl.TextBoxWithIcon.TextBoxWithTextArea();
             this.OperatResult = new UAS_MES.CustomControl.RichText.RichTextAutoBottom();
             this.ms_makecode = new UAS_MES.CustomControl.ValueLabel.ValueLabel();
-            this.ma_prodcode = new UAS_MES.CustomControl.ValueLabel.ValueLabel();
+            this.ms_prodcode = new UAS_MES.CustomControl.ValueLabel.ValueLabel();
             this.pr_detail = new UAS_MES.CustomControl.ValueLabel.ValueLabel();
             this.Clean = new UAS_MES.CustomControl.ButtonUtil.NormalButton();
             this.ms_sncode = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
@@ -87,7 +91,6 @@
             this.SaveBadLocation = new UAS_MES.CustomControl.ButtonUtil.NormalButton();
             this.Scrap = new UAS_MES.CustomControl.ButtonUtil.NormalButton();
             this.RepairComplete = new UAS_MES.CustomControl.ButtonUtil.NormalButton();
-            this.prodcode = new UAS_MES.CustomControl.TextBoxWithIcon.SearchTextBox();
             this.panel2.SuspendLayout();
             ((System.ComponentModel.ISupportInitialize)(this.LocationSource)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.ComponentSource)).BeginInit();
@@ -145,18 +148,18 @@
             this.st_rstepcode_label.TabIndex = 65;
             this.st_rstepcode_label.Text = "回流工序";
             // 
-            // ma_prodcode_label
+            // ms_prodcode_label
             // 
-            this.ma_prodcode_label.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
+            this.ms_prodcode_label.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
             | System.Windows.Forms.AnchorStyles.Left)));
-            this.ma_prodcode_label.AutoSize = true;
-            this.ma_prodcode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ma_prodcode_label.Location = new System.Drawing.Point(622, 51);
-            this.ma_prodcode_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
-            this.ma_prodcode_label.Name = "ma_prodcode_label";
-            this.ma_prodcode_label.Size = new System.Drawing.Size(92, 27);
-            this.ma_prodcode_label.TabIndex = 62;
-            this.ma_prodcode_label.Text = "产品编号";
+            this.ms_prodcode_label.AutoSize = true;
+            this.ms_prodcode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.ms_prodcode_label.Location = new System.Drawing.Point(622, 51);
+            this.ms_prodcode_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.ms_prodcode_label.Name = "ms_prodcode_label";
+            this.ms_prodcode_label.Size = new System.Drawing.Size(92, 27);
+            this.ms_prodcode_label.TabIndex = 62;
+            this.ms_prodcode_label.Text = "产品编号";
             // 
             // pr_detail_label
             // 
@@ -389,12 +392,43 @@
             this.bg_code.TabIndex = 123;
             this.bg_code.Visible = false;
             // 
+            // nr_code
+            // 
+            this.nr_code.AutoSize = true;
+            this.nr_code.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.nr_code.ForeColor = System.Drawing.Color.Black;
+            this.nr_code.Location = new System.Drawing.Point(1235, 93);
+            this.nr_code.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.nr_code.Name = "nr_code";
+            this.nr_code.Size = new System.Drawing.Size(0, 27);
+            this.nr_code.TabIndex = 125;
+            this.nr_code.Visible = false;
+            // 
+            // prodcode
+            // 
+            this.prodcode.AllPower = null;
+            this.prodcode.Caller = null;
+            this.prodcode.Condition = null;
+            this.prodcode.DBTitle = null;
+            this.prodcode.FormName = null;
+            this.prodcode.Location = new System.Drawing.Point(747, 374);
+            this.prodcode.Name = "prodcode";
+            this.prodcode.Power = null;
+            this.prodcode.SelectField = null;
+            this.prodcode.SetValueField = null;
+            this.prodcode.Size = new System.Drawing.Size(209, 25);
+            this.prodcode.TabIndex = 124;
+            this.prodcode.TableName = null;
+            this.prodcode.TextBoxEnable = true;
+            this.prodcode.TextKeyDown += new UAS_MES.CustomControl.TextBoxWithIcon.SearchTextBox.OnTextKeyDown(this.prodcode_TextKeyDown);
+            // 
             // mbp_partdgv
             // 
             this.mbp_partdgv.AllowUserToAddRows = false;
             this.mbp_partdgv.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
             this.mbp_partdgv.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
-            this.mbp_part1});
+            this.mbp_part1,
+            this.mbp_id});
             this.mbp_partdgv.Location = new System.Drawing.Point(647, 419);
             this.mbp_partdgv.Name = "mbp_partdgv";
             this.mbp_partdgv.RowTemplate.Height = 27;
@@ -408,12 +442,20 @@
             this.mbp_part1.HeaderText = "已选择不良零件";
             this.mbp_part1.Name = "mbp_part1";
             // 
+            // mbp_id
+            // 
+            this.mbp_id.DataPropertyName = "mbp_id";
+            this.mbp_id.HeaderText = "mbp_id";
+            this.mbp_id.Name = "mbp_id";
+            this.mbp_id.Visible = false;
+            // 
             // mbl_locdgv
             // 
             this.mbl_locdgv.AllowUserToAddRows = false;
             this.mbl_locdgv.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
             this.mbl_locdgv.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
-            this.mbl_loc1});
+            this.mbl_loc1,
+            this.mbl_id});
             this.mbl_locdgv.Location = new System.Drawing.Point(248, 419);
             this.mbl_locdgv.Name = "mbl_locdgv";
             this.mbl_locdgv.RowTemplate.Height = 27;
@@ -427,6 +469,13 @@
             this.mbl_loc1.HeaderText = "已选择不良位置";
             this.mbl_loc1.Name = "mbl_loc1";
             // 
+            // mbl_id
+            // 
+            this.mbl_id.DataPropertyName = "mbl_id";
+            this.mbl_id.HeaderText = "mbl_id";
+            this.mbl_id.Name = "mbl_id";
+            this.mbl_id.Visible = false;
+            // 
             // RefreshTreeView
             // 
             this.RefreshTreeView.AllPower = null;
@@ -466,7 +515,7 @@
             this.NewRepairInf.DownImage = ((System.Drawing.Image)(resources.GetObject("NewRepairInf.DownImage")));
             this.NewRepairInf.Image = ((System.Drawing.Image)(resources.GetObject("NewRepairInf.Image")));
             this.NewRepairInf.IsShowBorder = true;
-            this.NewRepairInf.Location = new System.Drawing.Point(391, 631);
+            this.NewRepairInf.Location = new System.Drawing.Point(395, 631);
             this.NewRepairInf.Margin = new System.Windows.Forms.Padding(4);
             this.NewRepairInf.MoveImage = ((System.Drawing.Image)(resources.GetObject("NewRepairInf.MoveImage")));
             this.NewRepairInf.Name = "NewRepairInf";
@@ -486,7 +535,7 @@
             this.SaveRepairInf.DownImage = ((System.Drawing.Image)(resources.GetObject("SaveRepairInf.DownImage")));
             this.SaveRepairInf.Image = ((System.Drawing.Image)(resources.GetObject("SaveRepairInf.Image")));
             this.SaveRepairInf.IsShowBorder = true;
-            this.SaveRepairInf.Location = new System.Drawing.Point(535, 631);
+            this.SaveRepairInf.Location = new System.Drawing.Point(548, 631);
             this.SaveRepairInf.Margin = new System.Windows.Forms.Padding(4);
             this.SaveRepairInf.MoveImage = ((System.Drawing.Image)(resources.GetObject("SaveRepairInf.MoveImage")));
             this.SaveRepairInf.Name = "SaveRepairInf";
@@ -545,6 +594,7 @@
             this.mbr_solutioncode.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
             | System.Windows.Forms.AnchorStyles.Left)));
             this.mbr_solutioncode.BackColor = System.Drawing.Color.White;
+            this.mbr_solutioncode.Enabled = false;
             this.mbr_solutioncode.ID = null;
             this.mbr_solutioncode.Location = new System.Drawing.Point(747, 299);
             this.mbr_solutioncode.Margin = new System.Windows.Forms.Padding(4);
@@ -563,6 +613,7 @@
             this.mbc_component.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
             | System.Windows.Forms.AnchorStyles.Left)));
             this.mbc_component.BackColor = System.Drawing.Color.White;
+            this.mbc_component.Enabled = false;
             this.mbc_component.ID = null;
             this.mbc_component.Location = new System.Drawing.Point(354, 299);
             this.mbc_component.Margin = new System.Windows.Forms.Padding(4);
@@ -581,6 +632,7 @@
             this.mbr_dutycode.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
             | System.Windows.Forms.AnchorStyles.Left)));
             this.mbr_dutycode.BackColor = System.Drawing.Color.White;
+            this.mbr_dutycode.Enabled = false;
             this.mbr_dutycode.ID = null;
             this.mbr_dutycode.Location = new System.Drawing.Point(1094, 248);
             this.mbr_dutycode.Margin = new System.Windows.Forms.Padding(4);
@@ -599,6 +651,7 @@
             this.nr_name.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
             | System.Windows.Forms.AnchorStyles.Left)));
             this.nr_name.BackColor = System.Drawing.Color.White;
+            this.nr_name.Enabled = false;
             this.nr_name.ID = null;
             this.nr_name.Location = new System.Drawing.Point(747, 245);
             this.nr_name.Margin = new System.Windows.Forms.Padding(4);
@@ -610,6 +663,7 @@
             this.nr_name.Str2 = null;
             this.nr_name.TabIndex = 96;
             this.nr_name.Tag = "Read";
+            this.nr_name.TextChanged += new System.EventHandler(this.nr_name_TextChanged);
             // 
             // nrg_name
             // 
@@ -617,6 +671,7 @@
             this.nrg_name.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
             | System.Windows.Forms.AnchorStyles.Left)));
             this.nrg_name.BackColor = System.Drawing.Color.White;
+            this.nrg_name.Enabled = false;
             this.nrg_name.ID = null;
             this.nrg_name.Location = new System.Drawing.Point(354, 248);
             this.nrg_name.Margin = new System.Windows.Forms.Padding(4);
@@ -698,17 +753,17 @@
             this.ms_makecode.Size = new System.Drawing.Size(0, 27);
             this.ms_makecode.TabIndex = 85;
             // 
-            // ma_prodcode
+            // ms_prodcode
             // 
-            this.ma_prodcode.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
+            this.ms_prodcode.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
             | System.Windows.Forms.AnchorStyles.Left)));
-            this.ma_prodcode.AutoSize = true;
-            this.ma_prodcode.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ma_prodcode.Location = new System.Drawing.Point(750, 51);
-            this.ma_prodcode.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
-            this.ma_prodcode.Name = "ma_prodcode";
-            this.ma_prodcode.Size = new System.Drawing.Size(0, 27);
-            this.ma_prodcode.TabIndex = 83;
+            this.ms_prodcode.AutoSize = true;
+            this.ms_prodcode.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.ms_prodcode.Location = new System.Drawing.Point(750, 51);
+            this.ms_prodcode.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.ms_prodcode.Name = "ms_prodcode";
+            this.ms_prodcode.Size = new System.Drawing.Size(0, 27);
+            this.ms_prodcode.TabIndex = 83;
             // 
             // pr_detail
             // 
@@ -777,7 +832,7 @@
             this.cd_stepcode.Size = new System.Drawing.Size(256, 25);
             this.cd_stepcode.TabIndex = 68;
             this.cd_stepcode.TableName = null;
-            this.cd_stepcode.Tag = "Read";
+            this.cd_stepcode.Tag = "ms_stepcode";
             this.cd_stepcode.TextBoxEnable = true;
             // 
             // cr_code
@@ -789,7 +844,7 @@
             this.cr_code.Condition = null;
             this.cr_code.DBTitle = "回流工艺";
             this.cr_code.FormName = null;
-            this.cr_code.Location = new System.Drawing.Point(123, 95);
+            this.cr_code.Location = new System.Drawing.Point(123, 99);
             this.cr_code.Margin = new System.Windows.Forms.Padding(4);
             this.cr_code.Name = "cr_code";
             this.cr_code.Power = null;
@@ -798,8 +853,9 @@
             this.cr_code.Size = new System.Drawing.Size(255, 25);
             this.cr_code.TabIndex = 67;
             this.cr_code.TableName = null;
-            this.cr_code.Tag = "Read";
+            this.cr_code.Tag = "ms_craftcode";
             this.cr_code.TextBoxEnable = true;
+            this.cr_code.UserControlTextChanged += new UAS_MES.CustomControl.TextBoxWithIcon.SearchTextBox.OnTextChange(this.cr_code_UserControlTextChanged);
             // 
             // NewBadCode
             // 
@@ -826,6 +882,7 @@
             this.SaveBadLocation.AllPower = "ifall";
             this.SaveBadLocation.BackColor = System.Drawing.Color.Transparent;
             this.SaveBadLocation.DownImage = ((System.Drawing.Image)(resources.GetObject("SaveBadLocation.DownImage")));
+            this.SaveBadLocation.Enabled = false;
             this.SaveBadLocation.Image = ((System.Drawing.Image)(resources.GetObject("SaveBadLocation.Image")));
             this.SaveBadLocation.IsShowBorder = true;
             this.SaveBadLocation.Location = new System.Drawing.Point(549, 372);
@@ -846,7 +903,6 @@
             this.Scrap.AllPower = "ifall";
             this.Scrap.BackColor = System.Drawing.Color.Transparent;
             this.Scrap.DownImage = ((System.Drawing.Image)(resources.GetObject("Scrap.DownImage")));
-            this.Scrap.Enabled = false;
             this.Scrap.Image = ((System.Drawing.Image)(resources.GetObject("Scrap.Image")));
             this.Scrap.IsShowBorder = true;
             this.Scrap.Location = new System.Drawing.Point(964, 95);
@@ -867,7 +923,6 @@
             this.RepairComplete.AllPower = "ifall";
             this.RepairComplete.BackColor = System.Drawing.Color.Transparent;
             this.RepairComplete.DownImage = ((System.Drawing.Image)(resources.GetObject("RepairComplete.DownImage")));
-            this.RepairComplete.Enabled = false;
             this.RepairComplete.Image = ((System.Drawing.Image)(resources.GetObject("RepairComplete.Image")));
             this.RepairComplete.IsShowBorder = true;
             this.RepairComplete.Location = new System.Drawing.Point(838, 95);
@@ -883,28 +938,12 @@
             this.RepairComplete.UseVisualStyleBackColor = true;
             this.RepairComplete.Click += new System.EventHandler(this.RepairComplete_Click);
             // 
-            // prodcode
-            // 
-            this.prodcode.AllPower = null;
-            this.prodcode.Caller = null;
-            this.prodcode.Condition = null;
-            this.prodcode.DBTitle = null;
-            this.prodcode.FormName = null;
-            this.prodcode.Location = new System.Drawing.Point(747, 374);
-            this.prodcode.Name = "prodcode";
-            this.prodcode.Power = null;
-            this.prodcode.SelectField = null;
-            this.prodcode.SetValueField = null;
-            this.prodcode.Size = new System.Drawing.Size(209, 25);
-            this.prodcode.TabIndex = 124;
-            this.prodcode.TableName = null;
-            this.prodcode.TextBoxEnable = false;
-            // 
             // Make_Repair
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.ClientSize = new System.Drawing.Size(1327, 735);
+            this.Controls.Add(this.nr_code);
             this.Controls.Add(this.prodcode);
             this.Controls.Add(this.bg_code);
             this.Controls.Add(this.bc_code);
@@ -938,9 +977,9 @@
             this.Controls.Add(this.mb_badremark);
             this.Controls.Add(this.OperatResult);
             this.Controls.Add(this.ms_makecode);
-            this.Controls.Add(this.ma_prodcode);
+            this.Controls.Add(this.ms_prodcode);
             this.Controls.Add(this.pr_detail);
-            this.Controls.Add(this.ma_prodcode_label);
+            this.Controls.Add(this.ms_prodcode_label);
             this.Controls.Add(this.pr_detail_label);
             this.Controls.Add(this.Clean);
             this.Controls.Add(this.ms_sncode);
@@ -988,7 +1027,7 @@
         private System.Windows.Forms.Label label1;
         private System.Windows.Forms.Label ma_craftcode_label;
         private System.Windows.Forms.Label st_rstepcode_label;
-        private System.Windows.Forms.Label ma_prodcode_label;
+        private System.Windows.Forms.Label ms_prodcode_label;
         private System.Windows.Forms.Label pr_detail_label;
         private System.Windows.Forms.Label label14;
         private System.Windows.Forms.Label bc_name_label;
@@ -998,7 +1037,7 @@
         private CustomControl.TextBoxWithIcon.EnterTextBox ms_sncode;
         private CustomControl.ButtonUtil.NormalButton Clean;
         private CustomControl.ValueLabel.ValueLabel pr_detail;
-        private CustomControl.ValueLabel.ValueLabel ma_prodcode;
+        private CustomControl.ValueLabel.ValueLabel ms_prodcode;
         private CustomControl.ValueLabel.ValueLabel ms_makecode;
         private CustomControl.RichText.RichTextAutoBottom OperatResult;
         private CustomControl.TextBoxWithIcon.TextBoxWithTextArea mb_badremark;
@@ -1031,10 +1070,13 @@
         private CustomControl.DataGrid_View.DataGridViewWithCheckBox mbp_partdgv;
         private System.Windows.Forms.BindingSource LocationSource;
         private System.Windows.Forms.BindingSource ComponentSource;
-        private System.Windows.Forms.DataGridViewTextBoxColumn mbp_part1;
-        private System.Windows.Forms.DataGridViewTextBoxColumn mbl_loc1;
         private System.Windows.Forms.Label bc_code;
         private System.Windows.Forms.Label bg_code;
         private CustomControl.TextBoxWithIcon.SearchTextBox prodcode;
+        private System.Windows.Forms.Label nr_code;
+        private System.Windows.Forms.DataGridViewTextBoxColumn mbp_part1;
+        private System.Windows.Forms.DataGridViewTextBoxColumn mbp_id;
+        private System.Windows.Forms.DataGridViewTextBoxColumn mbl_loc1;
+        private System.Windows.Forms.DataGridViewTextBoxColumn mbl_id;
     }
 }

+ 192 - 37
UAS-MES/FunctionCode/Make/Make_Repair.cs

@@ -1,4 +1,5 @@
 using System;
+using System.Collections;
 using System.Collections.Generic;
 using System.Data;
 using System.Drawing;
@@ -31,6 +32,8 @@ namespace UAS_MES.Make
         bool GetSelectData = false;
 
         string mb_id = "";
+
+        string mbr_id = "";
         /// <summary>
         /// 存放父节点信息
         /// </summary>
@@ -50,7 +53,7 @@ namespace UAS_MES.Make
 
         AutoSizeFormClass asc = new AutoSizeFormClass();
 
-        string macode;   
+        string macode;
 
         string msid = "";
 
@@ -76,7 +79,7 @@ namespace UAS_MES.Make
             cd_stepcode.TableName = "craftdetail left join step on st_code=cd_stepcode left join craft on cd_crid=cr_id";
             cd_stepcode.SetValueField = new string[] { "cd_stepcode" };
             cd_stepcode.SelectField = "cd_stepname # 工序名称 ,cd_stepcode # 工序编号,cd_stepno # 执行顺序";
-            cd_stepcode.Condition = "ST_STATUSCODE='AUDITED' and cr_code='" + cr_code.Text + "'";
+
 
             prodcode.FormName = Name;
             prodcode.TableName = dbtable1.Replace(":macode", macode).Replace(":sncode", GetSNCode.Text);
@@ -100,22 +103,30 @@ namespace UAS_MES.Make
                 //验证工序是否正确
                 if (LogicHandler.CheckStepAttribute(Tag.ToString(), User.UserSourceCode, out ErrorMessage))
                 {
+
                     BadInf_1.Clear();
                     if (LogicHandler.GetMakeInfo(GetSNCode.Text, out macode, out ErrorMessage))
                     {
-                        //验证makeserial或者ms_firstsn表序列号是否存在
-                        sql.Clear();
-                        sql.Append("select max(ms_id) ms_id from makeserial where ms_makecode ='" + macode + "' and(ms_sncode");
-                        sql.Append("='" + GetSNCode.Text + "' or ms_firstsn in (select firstsn from makesnrelation ");
-                        sql.Append("where sn='" + GetSNCode.Text + "'))");
-                        dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
-                        if (dt.Rows.Count > 0)
+                        if (LogicHandler.CheckStepSNAndMacode(macode, User.UserSourceCode, GetSNCode.Text, User.UserCode, out macode, out msid, out ErrorMessage))
                         {
-                            msid = dt.Rows[0]["ms_id"].ToString();
-                            LoadBadInfTree(sender, e);
+                            //验证makeserial或者ms_firstsn表序列号是否存在
+                            sql.Clear();
+                            sql.Append("select max(ms_id) ms_id,ms_makecode,ms_prodcode,ms_sncode,pr_detail ");
+                            sql.Append("ms_stepcode,ms_craftcode from makeserial left join product on pr_code=ms_prodcode where ms_makecode ='" + macode + "' and(ms_sncode");
+                            sql.Append("='" + GetSNCode.Text + "' or ms_firstsn in (select firstsn from makesnrelation ");
+                            sql.Append("where sn='" + GetSNCode.Text + "')) group by ms_makecode,ms_prodcode,ms_sncode,pr_detail,ms_stepcode,ms_craftcode");
+                            dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
+                            if (dt.Rows.Count > 0)
+                            {
+                                msid = dt.Rows[0]["ms_id"].ToString();
+                                BaseUtil.SetFormValue(this.Controls, dt);
+                                LoadBadInfTree(sender, e);
+                            }
+                            else
+                                OperatResult.AppendText(">>序列号" + GetSNCode.Text + "不存在\n", Color.Red);
                         }
                         else
-                            OperatResult.AppendText(">>序列号" + GetSNCode.Text + "不存在\n", Color.Red);
+                            OperatResult.AppendText(">>" + ErrorMessage + "\n", Color.Red);
                     }
                     else
                         OperatResult.AppendText(">>" + ErrorMessage + "\n", Color.Red);
@@ -143,17 +154,16 @@ namespace UAS_MES.Make
             }
             if (e.Node.Level == 1)
             {
-                string mbr_id = e.Node.Tag.ToString();
+                mbr_id = e.Node.Tag.ToString();
                 nrg_name.Text = BadInf_2[mbr_id]["nrg_name"];
                 nr_name.Text = BadInf_2[mbr_id]["nr_name"];
+                nr_code.Text = BadInf_2[mbr_id]["nr_code"];
                 mbr_solutioncode.Text = BadInf_2[mbr_id]["mbr_solutioncode"];
                 mbr_dutycode.Text = BadInf_2[mbr_id]["mbr_dutycode"];
                 mbc_component.Text = dh.getFieldDataByCondition("makebadrscom", "mbc_component", "mbc_mbrid=" + mbr_id).ToString();
                 //加载两个Grid的数据源
-                ComponentSource.DataSource = (DataTable)dh.ExecuteSql("select mbp_part from makebadrspart where mbp_mbrid=" + mbr_id, "select");
-                LocationSource.DataSource = (DataTable)dh.ExecuteSql("select mbl_loc from makebadrsloc where mbl_mbrid=" + mbr_id, "select");
-                mbl_locdgv.DataSource = LocationSource;
-                mbp_partdgv.DataSource = ComponentSource;
+                mbp_partdgv.DataSource = (DataTable)dh.ExecuteSql("select mbp_id,mbp_part from makebadrspart where mbp_mbrid=" + mbr_id, "select");
+                mbl_locdgv.DataSource = (DataTable)dh.ExecuteSql("select mbl_id,mbl_loc from makebadrsloc where mbl_mbrid=" + mbr_id, "select");
             }
         }
 
@@ -188,7 +198,7 @@ namespace UAS_MES.Make
                 //添加子节点
                 sql.Clear();
                 sql.Append("select mbr_id,mbr_brcode,mbr_brgcode,mbr_solutioncode,so_name,mbr_dutycode,nd_name,");
-                sql.Append("nrg_name,nr_name from makebadreason left join QUA_NGReason left join QUA_NGREASONGROUP on ");
+                sql.Append("nrg_name,nr_name,nr_code from makebadreason left join QUA_NGReason left join QUA_NGREASONGROUP on ");
                 sql.Append("nrg_code=nr_group on nr_code=mbr_brcode left join solution ");
                 sql.Append("on so_code=mbr_solutioncode left join ngduty on nd_code=mbr_dutycode where mbr_mbid=" + mb_id);
                 DataTable dt1 = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
@@ -208,6 +218,7 @@ namespace UAS_MES.Make
                     dic1.Add("so_name", dt1.Rows[j]["so_name"].ToString());
                     dic1.Add("nrg_name", dt1.Rows[j]["nrg_name"].ToString());
                     dic1.Add("nr_name", dt1.Rows[j]["nr_name"].ToString());
+                    dic1.Add("nr_code", dt1.Rows[j]["nr_code"].ToString());
                     tnode_1.Text = dt1.Rows[j]["mbr_brgcode"].ToString();
                     if (!BadInf_2.ContainsKey(mbr_id))
                         BadInf_2.Add(mbr_id, dic1);
@@ -227,12 +238,58 @@ namespace UAS_MES.Make
 
         private void RepairComplete_Click(object sender, EventArgs e)
         {
-
+            int RejectNum = int.Parse(dh.getFieldDataByCondition("makebad", "count(0) cn", "mb_sncode='" + GetSNCode.Text + "' and mb_status not in (1,-1)").ToString());
+            if (RejectNum > 0)
+            {
+                OperatResult.AppendText(">>维修结果必须为已维修或无不良\n", Color.Red);
+            }
+            else
+            {
+                dt = (DataTable)dh.ExecuteSql("select cr_id from craft where cr_statuscode='AUDITED' and cr_code='" + cr_code.Text + "'", "select");
+                if (dt.Rows.Count == 0)
+                {
+                    OperatResult.AppendText(">>回流工序不存在\n", Color.Red);
+                }
+                else
+                {
+                    string cr_id = dt.Rows[0]["cr_id"].ToString();
+                    dt = (DataTable)dh.ExecuteSql("select cd_ifinput from craftdetail left join step on st_code=cd_stepcode where cd_crid='" + cr_id + "' and cd_stepcode='" + cd_stepcode.Text + "' and st_statuscode='AUDITED'", "select");
+                    if (dt.Rows.Count == 0)
+                    {
+                        OperatResult.AppendText(">>回流工序不在回流工艺中\n", Color.Red);
+                    }
+                    else
+                    {
+                        dh.UpdateByCondition("makeserial", "ms_nextstepcode='" + cd_stepcode.Text + "',ms_craftcode='" + cr_code.Text + "',ms_stepcode='" + User.CurrentStepCode + "',ms_status=1", "ms_sncode='" + ms_sncode.Text + "'");
+                        dh.ExecuteSql(insert_makeprocess.Replace("#", "完成维修"), "insert", ms_sncode.Text, User.CurrentStepCode);
+                        OperatResult.AppendText(">>序列号" + ms_sncode.Text + "回流成功\n", Color.Green);
+                        GetSNCode.Clear();
+                    }
+                }
+            }
         }
 
         private void Scrap_Click(object sender, EventArgs e)
         {
-
+            //判断是否有无法维修的记录
+            int ScrapNum = int.Parse(dh.getFieldDataByCondition("makebad", "count(0) cn", "mb_sncode='" + ms_sncode.Text + "'").ToString());
+            if (ScrapNum == 0)
+            {
+                OperatResult.AppendText(">>存在无法维修的记录才允许报废\n", Color.Red);
+            }
+            else
+            {
+                string confirm = MessageBox.Show(this.ParentForm, "此操作不可撤销,是否确认报废", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Asterisk).ToString();
+                if (confirm == "Yes")
+                {
+                    dh.UpdateByCondition("makeserial", "ms_status=4,ms_nextstepcode='',ms_stepcode='" + User.CurrentStepCode + "'", "ms_sncode='" + ms_sncode.Text + "' and ms_makecode='" + macode + "'");
+                    dh.UpdateByCondition("make", "MA_NGMADEQTY=nvl(MA_NGMADEQTY,0)+1", "ma_code='" + macode + "'");
+                    OperatResult.AppendText(">>报废成功\n", Color.Green);
+                    GetSNCode.Clear();
+                    BaseUtil.CleanForm(this);
+                    BadCodeTree.Nodes.Clear();
+                }
+            }
         }
 
         private void NewBadCode_Click(object sender, EventArgs e)
@@ -253,42 +310,140 @@ namespace UAS_MES.Make
 
         private void SaveRepairInf_Click(object sender, EventArgs e)
         {
-
+            //保存不良零件
+            DataTable dt = (DataTable)mbp_partdgv.DataSource;
+            List<string> prodcode = new List<string>();
+            for (int i = 0; i < dt.Rows.Count; i++)
+            {
+                if (dt.Rows[i]["mbp_id"].ToString() == "")
+                    prodcode.Add(dt.Rows[i]["mbp_part"].ToString());
+            }
+            sql.Clear();
+            sql.Append("insert into makebadrspart(mbp_id,mbp_mbrid,mbp_part,mbp_badcode,");
+            sql.Append("mbp_brcode,mbp_sncode,mbp_makecode,mbp_indate,mbp_inman)");
+            sql.Append("select makebadrspart_seq.nextval," + mbr_id + ",:prodcode,");
+            sql.Append("'" + bc_code.Text + "','" + nr_code.Text + "','" + GetSNCode.Text + "','" + macode + "',");
+            sql.Append("sysdate,'" + User.UserCode + "' from dual");
+            dh.BatchInsert(sql.GetString(), new string[] { "prodcode" }, prodcode.ToArray());
+            //保存不良位置
+            dt = (DataTable)mbl_locdgv.DataSource;
+            List<string> location = new List<string>();
+            for (int i = 0; i < dt.Rows.Count; i++)
+            {
+                if (dt.Rows[i]["mbl_id"].ToString() == "")
+                    location.Add(dt.Rows[i]["mbl_loc"].ToString());
+            }
+            sql.Clear();
+            sql.Append("insert into makebadrsloc(mbl_id,mbl_mbrid,mbl_loc,mbl_badcode,mbl_brcode,");
+            sql.Append("mbl_sncode,mbl_makecode,mbl_indate ,mbl_inman) select makebadrsloc_seq.nextval," + mbr_id);
+            sql.Append(",:location,'" + bc_code.Text + "','" + nr_code.Text + "','" + GetSNCode.Text + "','" + macode + "',");
+            sql.Append("sysdate,'" + User.UserCode + "' from dual");
+            dh.BatchInsert(sql.GetString(), new string[] { "location" }, location.ToArray());
+            MessageBox.Show("保存成功");
         }
 
         private void DeleteRepairInf_Click(object sender, EventArgs e)
         {
+            DataTable dt = (DataTable)dh.ExecuteSql("select ms_makecode from makeserial where ms_id='" + msid + "' and ms_sncode='" + GetSNCode.Text + "' and ms_status=3", "select");
+            if (dt.Rows.Count > 0)
+            {
+                if (mbr_id != "")
+                {
+                    string delete1 = "delete from  makebadrsloc where mbl_mbrid=" + mbr_id;
+                    string delete2 = "delete from makebadrspart where mbp_mbrid=" + mbr_id;
+                    string delete3 = "delete from makebadrscom where mbc_mbrid=" + mbr_id;
+                    string delete4 = "delete from makebadreason where mbr_id" + mbr_id;
+                    dh.ExecuteSQLTran(delete1, delete2, delete3, delete4);
+                    MessageBox.Show("删除成功");
+                }
+                else MessageBox.Show("必须选择不了原因");
+            }
+            else
+                MessageBox.Show("序列号错误,不存在或者不处于维修状态");
+        }
 
+        private void SaveBadLocation_Click(object sender, EventArgs e)
+        {
+            DataTable dt = (DataTable)dh.ExecuteSql("select ms_makecode from makeserial where ms_id='" + msid + "' and ms_sncode='" + GetSNCode.Text + "' and ms_status=3", "select");
+            if (dt.Rows.Count > 0)
+            {
+                if (mbl_loc.Text != "")
+                {
+                    if (mbr_id != "")
+                    {
+                        dt = (DataTable)mbl_locdgv.DataSource;
+                        DataRow dr = dt.NewRow();
+                        dr["mbl_loc"] = mbl_loc.Text;
+                        dt.Rows.Add(dr);
+                    }
+                    else MessageBox.Show("请先选择不良原因");
+                }
+            }
+            else
+                MessageBox.Show("序列号错误,不存在或者不处于维修状态");
         }
 
-        private void mbl_loc_KeyDown(object sender, KeyEventArgs e)
+        private void mbl_loc_TextChanged(object sender, EventArgs e)
         {
-            if (e.KeyCode == Keys.Enter)
+            if (mbl_loc.Text != "")
             {
-                sql.Clear();
-                sql.Append("select prodcode,pr_detail from (select distinct nvl(dsl_prodcode,msl_prodcode)");
-                sql.Append("prodcode from ReduceStepRecord left join devsmtlocation on dsl_linecode=rsd_linecode ");
-                sql.Append("and dsl_makecode=rsd_macode left join makesmtlocation on msl_linecode=rsd_linecode  ");
-                sql.Append("and msl_makecode=rsd_macode where rsd_macode='" + macode + "'  and rsd_sncode='" + GetSNCode.Text + "'");
-                sql.Append("and ((dsl_location='" + mbl_loc.Text + "' and dsl_validtime<sysdate and sysdate<dsl_invalidtime) ) or ");
-                sql.Append("(msl_location='" + mbl_loc.Text + "' and msl_validtime<sysdate and sysdate<msl_invalidtime)) left join ");
-                sql.Append("product on pr_code=prodcode");
-                DataTable dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
+                prodcode.TableName = dbtable2.Replace(":macode", macode).Replace(":sncode", GetSNCode.Text).Replace(":msl_location", mbl_loc.Text);
             }
         }
 
-        private void SaveBadLocation_Click(object sender, EventArgs e)
+        /// <summary>
+        /// 加载不良零件Grid
+        /// </summary>
+        private void LoadBadPart()
+        {
+        }
+
+        /// <summary>
+        /// 加载不良位置信息
+        /// </summary>
+        private void LoadBadLocation()
         {
 
         }
 
-        private void mbl_loc_TextChanged(object sender, EventArgs e)
+        private void nr_name_TextChanged(object sender, EventArgs e)
         {
-            if (mbl_loc.Text != "")
+            if (nr_name.Text == "")
+                SaveBadLocation.Enabled = false;
+            else
+                SaveBadLocation.Enabled = true;
+        }
+
+
+        private void mbl_loc_KeyDown(object sender, KeyEventArgs e)
+        {
+            if (e.KeyCode == Keys.Enter)
             {
-                Console.WriteLine("TextChange");
-                prodcode.TableName = dbtable2.Replace(":macode", macode).Replace(":sncode", GetSNCode.Text).Replace(":msl_location", mbl_loc.Text);
+                SaveBadLocation_Click(sender, e);
             }
         }
+
+        private void prodcode_TextKeyDown(object sender, KeyEventArgs e)
+        {
+            if (e.KeyCode == Keys.Enter)
+            {
+                if (prodcode.Text != "")
+                {
+                    if (mbr_id != "")
+                    {
+                        DataTable dt = (DataTable)mbp_partdgv.DataSource;
+                        DataRow dr = dt.NewRow();
+                        dr["mbp_part"] = prodcode.Text;
+                        dt.Rows.Add(dr);
+                    }
+                    else MessageBox.Show("请先选择不良原因");
+                }
+            }
+        }
+
+        private void cr_code_UserControlTextChanged(object sender, EventArgs e)
+        {
+            cd_stepcode.Condition = "ST_STATUSCODE='AUDITED' and cr_code='" + cr_code.Text + "'";
+        }
     }
 }

+ 18 - 0
UAS-MES/FunctionCode/Make/Make_Repair.resx

@@ -126,9 +126,27 @@
   <metadata name="mbp_part1.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>
+  <metadata name="mbp_id.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="mbp_part1.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="mbp_id.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
   <metadata name="mbl_loc1.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>
+  <metadata name="mbl_id.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="mbl_loc1.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="mbl_id.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
   <assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
   <data name="NewRepairInf.DownImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>

+ 1 - 1
UAS-MES/Program.cs

@@ -91,7 +91,7 @@ namespace UAS_MES
             if (ex != null)
             {
                 sb.AppendLine(ex.Message);
-                //sb.AppendLine("【异常方法】:" + ex.TargetSite);
+                sb.AppendLine("【异常方法】:" + ex.StackTrace);
             }
             //else { sb.AppendLine("【未处理异常】:" + backStr); }
             return sb.ToString();

+ 28 - 0
UAS-MES/Settings.cs

@@ -0,0 +1,28 @@
+namespace UAS_MES.Properties {
+    
+    
+    // 通过此类可以处理设置类的特定事件: 
+    //  在更改某个设置的值之前将引发 SettingChanging 事件。
+    //  在更改某个设置的值之后将引发 PropertyChanged 事件。
+    //  在加载设置值之后将引发 SettingsLoaded 事件。
+    //  在保存设置值之前将引发 SettingsSaving 事件。
+    internal sealed partial class Settings {
+        
+        public Settings() {
+            // // 若要为保存和更改设置添加事件处理程序,请取消注释下列行: 
+            //
+            // this.SettingChanging += this.SettingChangingEventHandler;
+            //
+            // this.SettingsSaving += this.SettingsSavingEventHandler;
+            //
+        }
+        
+        private void SettingChangingEventHandler(object sender, System.Configuration.SettingChangingEventArgs e) {
+            // 在此处添加用于处理 SettingChangingEvent 事件的代码。
+        }
+        
+        private void SettingsSavingEventHandler(object sender, System.ComponentModel.CancelEventArgs e) {
+            // 在此处添加用于处理 SettingsSaving 事件的代码。
+        }
+    }
+}

+ 7 - 1
UAS-MES/UAS-MES.csproj

@@ -91,7 +91,7 @@
     <SignAssembly>false</SignAssembly>
   </PropertyGroup>
   <PropertyGroup>
-    <ApplicationIcon>Resources\U_Icon.ico</ApplicationIcon>
+    <ApplicationIcon>U_Icon.ico</ApplicationIcon>
   </PropertyGroup>
   <PropertyGroup />
   <PropertyGroup>
@@ -104,6 +104,10 @@
   <PropertyGroup />
   <PropertyGroup />
   <PropertyGroup />
+  <PropertyGroup />
+  <PropertyGroup />
+  <PropertyGroup />
+  <PropertyGroup />
   <PropertyGroup>
     <NoWin32Manifest>true</NoWin32Manifest>
   </PropertyGroup>
@@ -772,6 +776,7 @@
     <Compile Include="FunctionCode\SystemSetting\SystemSetting_ScaleTest.Designer.cs">
       <DependentUpon>SystemSetting_ScaleTest.cs</DependentUpon>
     </Compile>
+    <Compile Include="Settings.cs" />
     <EmbeddedResource Include="CustomControl\AccordionMenu\AccordionMenu.resx">
       <DependentUpon>AccordionMenu.cs</DependentUpon>
     </EmbeddedResource>
@@ -1048,6 +1053,7 @@
     <None Include="Resources\mailattachment.zip" />
   </ItemGroup>
   <ItemGroup>
+    <Content Include="U_Icon.ico" />
     <None Include="Resources\timg.jpg" />
     <None Include="Resources\matte_white_square_icon_business_tool_hammer_128px_571061_easyicon.net.ico" />
     <None Include="Resources\Image1.bmp" />

BIN
UAS-MES/U_Icon.ico


+ 12 - 7
UAS-出货标签管理/Login.Designer.cs

@@ -28,6 +28,7 @@
         /// </summary>
         private void InitializeComponent()
         {
+            this.components = new System.ComponentModel.Container();
             this.pictureBox1 = new System.Windows.Forms.PictureBox();
             this.label1 = new System.Windows.Forms.Label();
             this.UserName = new System.Windows.Forms.TextBox();
@@ -39,8 +40,10 @@
             this.Master = new System.Windows.Forms.Label();
             this.label4 = new System.Windows.Forms.Label();
             this.IP = new System.Windows.Forms.TextBox();
+            this.ComData = new System.Windows.Forms.BindingSource(this.components);
             ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.LoginIcon)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.ComData)).BeginInit();
             this.SuspendLayout();
             // 
             // pictureBox1
@@ -48,7 +51,7 @@
             this.pictureBox1.BackColor = System.Drawing.Color.Transparent;
             this.pictureBox1.Image = global::UAS_LabelMachine.Properties.Resources.users_user_72px_523311_easyicon_net;
             this.pictureBox1.Location = new System.Drawing.Point(312, 226);
-            this.pictureBox1.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.pictureBox1.Margin = new System.Windows.Forms.Padding(4);
             this.pictureBox1.Name = "pictureBox1";
             this.pictureBox1.Size = new System.Drawing.Size(96, 90);
             this.pictureBox1.TabIndex = 0;
@@ -71,7 +74,7 @@
             // 
             this.UserName.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.UserName.Location = new System.Drawing.Point(492, 210);
-            this.UserName.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.UserName.Margin = new System.Windows.Forms.Padding(4);
             this.UserName.Name = "UserName";
             this.UserName.Size = new System.Drawing.Size(260, 34);
             this.UserName.TabIndex = 2;
@@ -80,7 +83,7 @@
             // 
             this.PassWord.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.PassWord.Location = new System.Drawing.Point(492, 258);
-            this.PassWord.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.PassWord.Margin = new System.Windows.Forms.Padding(4);
             this.PassWord.Name = "PassWord";
             this.PassWord.PasswordChar = '*';
             this.PassWord.Size = new System.Drawing.Size(260, 34);
@@ -93,7 +96,7 @@
             this.LoginIcon.Cursor = System.Windows.Forms.Cursors.Hand;
             this.LoginIcon.Image = global::UAS_LabelMachine.Properties.Resources.Login_Icon;
             this.LoginIcon.Location = new System.Drawing.Point(564, 404);
-            this.LoginIcon.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.LoginIcon.Margin = new System.Windows.Forms.Padding(4);
             this.LoginIcon.Name = "LoginIcon";
             this.LoginIcon.Size = new System.Drawing.Size(96, 32);
             this.LoginIcon.TabIndex = 4;
@@ -130,7 +133,7 @@
             this.MasterCombox.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.MasterCombox.FormattingEnabled = true;
             this.MasterCombox.Location = new System.Drawing.Point(492, 309);
-            this.MasterCombox.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.MasterCombox.Margin = new System.Windows.Forms.Padding(4);
             this.MasterCombox.Name = "MasterCombox";
             this.MasterCombox.Size = new System.Drawing.Size(260, 35);
             this.MasterCombox.TabIndex = 7;
@@ -163,7 +166,7 @@
             // 
             this.IP.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.IP.Location = new System.Drawing.Point(492, 356);
-            this.IP.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.IP.Margin = new System.Windows.Forms.Padding(4);
             this.IP.Name = "IP";
             this.IP.Size = new System.Drawing.Size(260, 34);
             this.IP.TabIndex = 9;
@@ -187,7 +190,7 @@
             this.Controls.Add(this.label1);
             this.Controls.Add(this.pictureBox1);
             this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
-            this.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.Margin = new System.Windows.Forms.Padding(4);
             this.Name = "Login";
             this.Text = "出货标签管理系统";
             this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.Login_FormClosing);
@@ -195,6 +198,7 @@
             this.Paint += new System.Windows.Forms.PaintEventHandler(this.Login_Paint);
             ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.LoginIcon)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.ComData)).EndInit();
             this.ResumeLayout(false);
             this.PerformLayout();
 
@@ -213,5 +217,6 @@
         private System.Windows.Forms.Label Master;
         private System.Windows.Forms.Label label4;
         private System.Windows.Forms.TextBox IP;
+        private System.Windows.Forms.BindingSource ComData;
     }
 }

+ 1 - 1
UAS-出货标签管理/Login.cs

@@ -30,9 +30,9 @@ namespace UAS_LabelMachine
             dh = new DataHelper();
             //获取账套信息
             dt = (DataTable)dh.ExecuteSql("select ma_function,ms_pwd,ma_user from master where ma_enable<>0", "select");
-            MasterCombox.DataSource = dt;
             MasterCombox.DisplayMember = "ma_function";
             MasterCombox.ValueMember = "ma_user";
+            MasterCombox.DataSource = dt;
             //读取上次登陆时的用户名和选择的账套
             UserName.Text = Properties.Settings.Default.LastLoginUser;
             MasterCombox.Text = Properties.Settings.Default.LastLoginMaster;

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

@@ -117,4 +117,7 @@
   <resheader name="writer">
     <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   </resheader>
+  <metadata name="ComData.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>17, 17</value>
+  </metadata>
 </root>

+ 2 - 0
UAS-出货标签管理/PowerSetting.cs

@@ -2,6 +2,7 @@
 using System.Collections.Generic;
 using System.Data;
 using System.Windows.Forms;
+using UAS_LabelMachine.Entity;
 
 namespace UAS_LabelMachine
 {
@@ -38,6 +39,7 @@ namespace UAS_LabelMachine
             sql += "LPP_ALLCOLLECT) values(labelprintpower_seq.nextval,:lpp_emcode,:LPP_CLEANDETAIL,:LPP_GENCODE,:LPP_LABELMATAIN,:LPP_SAVEDETAIL,";
             sql += ":LPP_COLLECTSTRATEGY,:LPP_ALLCOLLECT)";
             dh.UpDateTableByCondition(dt.GetChanges(), "labelprintpower", "lpp_id", sql.ToLower());
+            dh.ExecuteSql("insert into MessageLog (ml_id,ml_date,ml_man,ml_content,code) select MessageLog_seq.nextval,sysdate,'"+User.UserName+"','修改打印权限','LabelPrint' from dual", "insert");
             LoadData();
         }
 

+ 3 - 1
UAS-出货标签管理/Program.cs

@@ -83,7 +83,9 @@ namespace UAS_LabelMachine
             if (ex != null)
             {
                 sb.AppendLine(ex.Message);
-                sb.AppendLine(ex.StackTrace);
+                LogManager.DoLog(ex.StackTrace);
+                LogManager.DoLog(ex.TargetSite.ToString());
+                //sb.AppendLine(ex.StackTrace);
                 //sb.AppendLine("【异常方法】:" + ex.TargetSite);
             }
             LogManager.DoLog(sb.ToString());

+ 2 - 2
UAS-出货标签管理/PublicMethod/BaseUtil.cs

@@ -187,13 +187,13 @@ namespace UAS_LabelMachine
         /// <param name="URL"></param>
         /// <param name="LabelName"></param>
         /// <returns></returns>
-        public static string GetLabelUrl(string URL, string LabelName)
+        public static string GetLabelUrl(string URL, string LabelName,DateTime time)
         {
             //如果是传入的数据是从FTP取的文件
             if (URL.Contains("ftp:"))
             {
                 ftpOperater ftp = new ftpOperater();
-                return ftp.Download(LabelName);
+                return ftp.Download(LabelName,time);
             }
             else {
                 return URL;

+ 17 - 5
UAS-出货标签管理/PublicMethod/DataHelper.cs

@@ -21,7 +21,7 @@ namespace UAS_LabelMachine
         //富为外网地址
         //private readonly string ConnectionStrings = "Data Source=richwellgroup.com.cn/orcl;User ID=DATACENTER;PassWord=select!#%*(";
         //怡海能达外网地址
-        private readonly string ConnectionStrings = "Password=select!#%*(;User ID=DATACENTER;Pooling=false;Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=sz.hi-mantech.com)(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)));";
+        private readonly string ConnectionStrings = "Data Source=sz.hi-mantech.com/orcl;User ID=DATACENTER;PassWord=select!#%*(";
         //怡海能达内网地址
         //private readonly string ConnectionStrings = "Data Source=192.168.1.200/orcl;User ID=DATACENTER;PassWord=select!#%*(";
         //用户选择的数据库的连接字符串
@@ -95,6 +95,7 @@ namespace UAS_LabelMachine
         {
             DataTable dt = new DataTable();
             string sql = "select " + Field + " from " + TableName + " where " + Condition;
+            Console.WriteLine(sql);
             command = new OracleCommand(sql, connection);
             OracleDataAdapter ad = new OracleDataAdapter();
             ad.SelectCommand = command;
@@ -729,7 +730,7 @@ namespace UAS_LabelMachine
                 return false;
             }
         }
-
+        int count = 0;
         /// <summary>
         /// 直接执行SQL,同时传入SQL的类型
         /// </summary>
@@ -738,6 +739,7 @@ namespace UAS_LabelMachine
         /// <returns></returns>
         public object ExecuteSql(string SQL, string Type, params object[] names)
         {
+            Console.WriteLine(SQL);
             object result = null;
             command = new OracleCommand(SQL, connection);
             //用来拼接参数的
@@ -768,13 +770,22 @@ namespace UAS_LabelMachine
                     command.Parameters.Add(new OracleParameter(addpar[i].ToString(), OracleDbType.Varchar2, names[i], ParameterDirection.Input));
                 }
             }
+
             switch (Type.ToUpper())
             {
                 case "SELECT":
                     result = new DataTable();
-                    OracleDataAdapter ad = new OracleDataAdapter(command);
-                    ad.Fill((DataTable)result);
-                    ad.Dispose();
+                    try
+                    {
+                        OracleDataAdapter ad = new OracleDataAdapter(command);
+                        ad.Fill((DataTable)result);
+                        ad.Dispose();
+                    }
+                    catch (Exception)
+                    {
+                        connection = new OracleConnection(DBConnectionString);
+                        result = ExecuteSql(SQL, Type, names);
+                    }
                     break;
                 case "DELETE":
                     result = command.ExecuteNonQuery();
@@ -786,6 +797,7 @@ namespace UAS_LabelMachine
                     command.ExecuteNonQuery();
                     break;
             }
+
             command.Dispose();
             return result;
         }

+ 1 - 1
UAS-出货标签管理/PublicMethod/GlobalEventsHandler.cs

@@ -88,7 +88,7 @@ namespace UAS_Labeling.PublicMethod
                                 }
                                 break;
                             case "全部已采":
-                                if (dt.Rows[0]["LPP_CLEANDETAIL"].ToString() != "1")
+                                if (dt.Rows[0]["LPP_ALLCOLLECT"].ToString() != "1")
                                 {
                                     MessageBox.Show("没有" + c.Text + "的权限");
                                     return true;

+ 8 - 5
UAS-出货标签管理/PublicMethod/ftpOperater.cs

@@ -1,4 +1,5 @@
 using System;
+using System.ComponentModel;
 using System.Diagnostics;
 using System.IO;
 using System.Net;
@@ -11,7 +12,7 @@ namespace UAS_LabelMachine
     {
         public static string FTPAddress = Properties.Settings.Default.FTPAddress.Split('|')[0];
 
-        public static  string DownLoadTo = Environment.GetEnvironmentVariable("windir").Substring(0, 1) + @":\" + @"打印标签\";
+        public static string DownLoadTo = Environment.GetEnvironmentVariable("windir").Substring(0, 1) + @":\" + @"打印标签\";
 
         private string ftpServerIP;
         private string ftpUser;
@@ -19,7 +20,7 @@ namespace UAS_LabelMachine
 
         public ftpOperater()
         {
-           string[] FTPInf = Properties.Settings.Default.FTPAddress.Split('|');
+            string[] FTPInf = Properties.Settings.Default.FTPAddress.Split('|');
             this.ftpServerIP = FTPInf[0];
             this.ftpUser = FTPInf[1];
             this.ftpPwd = FTPInf[2];
@@ -124,7 +125,6 @@ namespace UAS_LabelMachine
                 FtpWebResponse response = (FtpWebResponse)reqFTP.GetResponse();
                 Stream ftpStream = response.GetResponseStream();
                 fileSize = response.ContentLength;
-
                 ftpStream.Close();
                 response.Close();
             }
@@ -139,7 +139,7 @@ namespace UAS_LabelMachine
         /// 实现ftp下载操作
         /// </summary>
         /// <param name="fileName">远程文件名</param>
-        public string Download(string fileName)
+        public string Download(string fileName,DateTime time)
         {
             FtpWebRequest reqFTP;
             try
@@ -152,7 +152,7 @@ namespace UAS_LabelMachine
                 FtpWebResponse response = (FtpWebResponse)reqFTP.GetResponse();
                 Stream ftpStream = response.GetResponseStream();
                 long cl = response.ContentLength;
-                int bufferSize = 2048;
+                int bufferSize = 4096;
                 int readCount;
                 byte[] buffer = new byte[bufferSize];
                 readCount = ftpStream.Read(buffer, 0, bufferSize);
@@ -164,6 +164,9 @@ namespace UAS_LabelMachine
                 ftpStream.Close();
                 outputStream.Close();
                 response.Close();
+                //设置最后修改文件时间为服务器时间
+                FileInfo f = new FileInfo(DownLoadTo + @"\" + fileName);
+                f.LastWriteTime = time;
                 return DownLoadTo + @"\" + fileName;
             }
             catch (Exception ex)

+ 2 - 2
UAS-出货标签管理/UAS-出货标签管理.csproj

@@ -30,13 +30,13 @@
     <UpdateInterval>7</UpdateInterval>
     <UpdateIntervalUnits>Days</UpdateIntervalUnits>
     <UpdatePeriodically>false</UpdatePeriodically>
-    <UpdateRequired>true</UpdateRequired>
+    <UpdateRequired>false</UpdateRequired>
     <MapFileExtensions>true</MapFileExtensions>
     <InstallUrl>http://218.17.158.219:8888/publish.htm/</InstallUrl>
     <ProductName>UAS-出货标签管理</ProductName>
     <PublisherName>深圳市优软科技有限公司</PublisherName>
     <SuiteName>UAS-出货标签管理</SuiteName>
-    <MinimumRequiredVersion>1.0.0.190</MinimumRequiredVersion>
+    <MinimumRequiredVersion>1.0.0.0</MinimumRequiredVersion>
     <CreateWebPageOnPublish>true</CreateWebPageOnPublish>
     <WebPage>publish.htm</WebPage>
     <ApplicationRevision>0</ApplicationRevision>

File diff suppressed because it is too large
+ 189 - 184
UAS-出货标签管理/UAS_出货标签管理.Designer.cs


+ 30 - 13
UAS-出货标签管理/UAS_出货标签管理.cs

@@ -15,7 +15,7 @@ using System.Globalization;
 using UAS_LabelMachine.CustomControl.GroupBoxWithBorder;
 using UAS_LabelMachine.PublicForm;
 using System.Threading;
-
+using System.IO;
 
 namespace UAS_LabelMachine
 {
@@ -129,7 +129,6 @@ namespace UAS_LabelMachine
 
         private void 贴标机条码打印_Load(object sender, EventArgs e)
         {
-            LogManager.DoLog("界面加载");
             //杀死之前全部未关闭的进程
             Process[] processes = System.Diagnostics.Process.GetProcessesByName("lppa");
             for (int i = 0; i < processes.Length; i++)
@@ -963,7 +962,7 @@ namespace UAS_LabelMachine
         private void GetInOutInfAndLabelFile()
         {
             sql.Clear();
-            sql.Append("select cl_labelname,cl_isdefault,la_id||'#'||cl_labelurl la_id,cl_custcode from customerlabel left join prodinout on pi_cardcode=cl_custcode ");
+            sql.Append("select to_char(nvl(cl_date,sysdate),'YYYY-MM-DD HH24:Mi:SS') cl_date,cl_labelname,cl_isdefault,la_id||'#'||cl_labelurl||'#'||to_char(cl_date,'YYYY-MM-DD HH24:Mi:SS')  la_id,cl_custcode from customerlabel left join prodinout on pi_cardcode=cl_custcode ");
             sql.Append("left join customer on cu_code=cl_custcode left join label on la_code=CL_LABELCODE where ((pi_cardcode='" + pi_cardcode.Text + "' ");
             sql.Append("and  pi_inoutno='" + pi_inoutno.Text + "') or( cl_custcode is null)) and cl_labeltype='单盘' order by cl_custcode");
             dt = (DataTable)dh.ExecuteSql(sql.ToString(), "select");
@@ -977,12 +976,15 @@ namespace UAS_LabelMachine
                 {
                     string LabelUrl = dt.Rows[i]["la_id"].ToString().Split('#')[1];
                     string LabelName = dt.Rows[i]["cl_labelname"].ToString();
-                    BaseUtil.GetLabelUrl(LabelUrl, LabelName);
+                    System.DateTime time = Convert.ToDateTime(dt.Rows[i]["cl_date"].ToString());
+                    FileInfo file = new FileInfo(ftpOperater.DownLoadTo + LabelName);
+                    if (time.ToString() != file.LastWriteTime.ToString())
+                        BaseUtil.GetLabelUrl(LabelUrl, LabelName, time);
                 }
             if (SingleLabelCombox.Text != "")
                 SingleDoc = lbl.Documents.Open(ftpOperater.DownLoadTo + SingleLabelCombox.Text);
             sql.Clear();
-            sql.Append("select cl_labelname,cl_isdefault,la_id||'#'||cl_labelurl la_id,cl_custcode from customerlabel left join prodinout on pi_cardcode=cl_custcode ");
+            sql.Append("select to_char(nvl(cl_date,sysdate),'YYYY-MM-DD HH24:Mi:SS') cl_date,cl_labelname,cl_isdefault,la_id||'#'||cl_labelurl||'#'||to_char(cl_date,'YYYY-MM-DD HH24:Mi:SS')  la_id,cl_custcode from customerlabel left join prodinout on pi_cardcode=cl_custcode ");
             sql.Append("left join customer on cu_code=cl_custcode left join label on la_code=CL_LABELCODE where ((pi_cardcode='" + pi_cardcode.Text + "' ");
             sql.Append("and  pi_inoutno='" + pi_inoutno.Text + "') or( cl_custcode is null)) and cl_labeltype='中盒' order by cl_custcode");
             dt = (DataTable)dh.ExecuteSql(sql.ToString(), "select");
@@ -996,7 +998,10 @@ namespace UAS_LabelMachine
                 {
                     string LabelUrl = dt.Rows[i]["la_id"].ToString().Split('#')[1];
                     string LabelName = dt.Rows[i]["cl_labelname"].ToString();
-                    BaseUtil.GetLabelUrl(LabelUrl, LabelName);
+                    System.DateTime time = Convert.ToDateTime(dt.Rows[i]["cl_date"].ToString());
+                    FileInfo file = new FileInfo(ftpOperater.DownLoadTo + LabelName);
+                    if (time.ToString() != file.LastWriteTime.ToString())
+                        BaseUtil.GetLabelUrl(LabelUrl, LabelName, time);
                 }
             if (MidLabelCombox.Text != "")
             {
@@ -1005,7 +1010,7 @@ namespace UAS_LabelMachine
                 MidDoc = lbl.Documents.Open(ftpOperater.DownLoadTo + MidLabelCombox.Text);
             }
             sql.Clear();
-            sql.Append("select cl_labelname,cl_isdefault,la_id||'#'||cl_labelurl la_id,cl_custcode from customerlabel left join prodinout on pi_cardcode=cl_custcode ");
+            sql.Append("select to_char(nvl(cl_date,sysdate),'YYYY-MM-DD HH24:Mi:SS') cl_date,cl_labelname,cl_isdefault,la_id||'#'||cl_labelurl||'#'||to_char(cl_date,'YYYY-MM-DD HH24:Mi:SS')  la_id,cl_custcode from customerlabel left join prodinout on pi_cardcode=cl_custcode ");
             sql.Append("left join customer on cu_code=cl_custcode left join label on la_code=CL_LABELCODE where ((pi_cardcode='" + pi_cardcode.Text + "' ");
             sql.Append("and  pi_inoutno='" + pi_inoutno.Text + "') or( cl_custcode is null)) and cl_labeltype='外箱' order by cl_custcode");
             dt = (DataTable)dh.ExecuteSql(sql.ToString(), "select");
@@ -1019,7 +1024,10 @@ namespace UAS_LabelMachine
                 {
                     string LabelUrl = dt.Rows[i]["la_id"].ToString().Split('#')[1];
                     string LabelName = dt.Rows[i]["cl_labelname"].ToString();
-                    BaseUtil.GetLabelUrl(LabelUrl, LabelName);
+                    System.DateTime time = Convert.ToDateTime(dt.Rows[i]["cl_date"].ToString());
+                    FileInfo file = new FileInfo(ftpOperater.DownLoadTo + LabelName);
+                    if (time.ToString() != file.LastWriteTime.ToString())
+                        BaseUtil.GetLabelUrl(LabelUrl, LabelName, time);
                 }
             if (OutBoxCombox.Text != "")
             {
@@ -1195,7 +1203,7 @@ namespace UAS_LabelMachine
                 }
                 if (CheckedRowCount == 0)
                     MessageBox.Show("未勾选打印明细!");
-                else
+                else if (CurrentRowIndex + 1 < LabelInf.Rows.Count)
                     CurrentRowIndex = CurrentRowIndex + 1;
                 outboxcode1.Clear();
             }
@@ -1586,7 +1594,7 @@ namespace UAS_LabelMachine
                 sql.Append("pib_lotno,pib_datecode,pib_qty,pib_barcode,pib_outboxcode1,pib_outboxcode2,pib_ifpick,pib_ifprint");
                 sql.Append(",sa_pocode 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 pd_piid='" + PI_ID + "' order by to_number(pib_outboxcode1),pib_id,pr_spec,pd_prodcode");
+                sql.Append("where pib_piid='" + PI_ID + "' order by to_number(pib_outboxcode1),pib_id,pd_prodcode");
             }
             dt = (DataTable)dh.ExecuteSql(sql.ToString(), "select");
             MidSource.DataSource = dt;
@@ -1888,7 +1896,10 @@ namespace UAS_LabelMachine
                 if (SingleDoc != null)
                     SingleDoc.Close();
                 if (SingleLabelCombox.Text != "" && SingleLabelCombox.SelectedValue != null && !GetGridOnly.Checked)
-                    SingleDoc = lbl.Documents.Open(BaseUtil.GetLabelUrl(SingleLabelCombox.SelectedValue.ToString().Split('#')[1], SingleLabelCombox.Text));
+                {
+                    System.DateTime time = Convert.ToDateTime(SingleLabelCombox.SelectedValue.ToString().Split('#')[2]);
+                    SingleDoc = lbl.Documents.Open(BaseUtil.GetLabelUrl(SingleLabelCombox.SelectedValue.ToString().Split('#')[1], SingleLabelCombox.Text, time));
+                }
             }
             catch (Exception) { }
         }
@@ -1905,7 +1916,10 @@ namespace UAS_LabelMachine
                 if (MidDoc != null)
                     MidDoc.Close();
                 if (MidLabelCombox.Text != "" && MidLabelCombox.SelectedValue != null && !GetGridOnly.Checked)
-                    MidDoc = lbl.Documents.Open(BaseUtil.GetLabelUrl(MidLabelCombox.SelectedValue.ToString().Split('#')[1], MidLabelCombox.Text));
+                {
+                    System.DateTime time = Convert.ToDateTime(MidLabelCombox.SelectedValue.ToString().Split('#')[2]);
+                    MidDoc = lbl.Documents.Open(BaseUtil.GetLabelUrl(MidLabelCombox.SelectedValue.ToString().Split('#')[1], MidLabelCombox.Text, time));
+                }
             }
             catch (Exception) { }
         }
@@ -1922,7 +1936,10 @@ namespace UAS_LabelMachine
                 if (OutBoxDoc != null)
                     OutBoxDoc.Close();
                 if (OutBoxCombox.Text != "" && OutBoxCombox.SelectedValue != null && !GetGridOnly.Checked)
-                    OutBoxDoc = lbl.Documents.Open(BaseUtil.GetLabelUrl(OutBoxCombox.SelectedValue.ToString().Split('#')[1], OutBoxCombox.Text));
+                {
+                    System.DateTime time = Convert.ToDateTime(OutBoxCombox.SelectedValue.ToString().Split('#')[2]);
+                    OutBoxDoc = lbl.Documents.Open(BaseUtil.GetLabelUrl(OutBoxCombox.SelectedValue.ToString().Split('#')[1], OutBoxCombox.Text, time));
+                }
             }
             catch (Exception) { }
         }

+ 113 - 104
UAS-出货标签管理/客户标签维护.Designer.cs

@@ -33,8 +33,8 @@ namespace UAS_LabelMachine
         private void InitializeComponent()
         {
             System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(客户标签维护));
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
             this.cl_code_label = new System.Windows.Forms.Label();
             this.cu_name_label = new System.Windows.Forms.Label();
             this.openFileDialog1 = new System.Windows.Forms.OpenFileDialog();
@@ -65,6 +65,12 @@ namespace UAS_LabelMachine
             this.ChooseAll = new UAS_LabelMachine.CustomControl.ChooseAllButton();
             this.PrinterList = new UAS_LabelMachine.CustomControl.PrinterCombox();
             this.LabelDataGridView = new UAS_LabelMachine.CustomControl.DataGridViewWithSerialNum();
+            this.PrintTest = new UAS_LabelMachine.CustomControl.NormalButton();
+            this.客户编号 = new UAS_LabelMachine.CustomControl.SearchTextBox();
+            this.cu_code = new UAS_LabelMachine.CustomControl.SearchTextBox();
+            this.UpdateGrid = new UAS_LabelMachine.CustomControl.NormalButton();
+            this.Screen = new UAS_LabelMachine.CustomControl.NormalButton();
+            this.cu_name = new UAS_LabelMachine.CustomControl.EnterTextBox();
             this.Choose = new System.Windows.Forms.DataGridViewCheckBoxColumn();
             this.la_id = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.cu_name1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
@@ -74,16 +80,11 @@ namespace UAS_LabelMachine
             this.cl_labelcode = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.cl_labelurl = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.cl_labelname = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.cl_date = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.cl_isdefault = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.cl_detno = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.cl_labelsoft = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.cl_status = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.PrintTest = new UAS_LabelMachine.CustomControl.NormalButton();
-            this.客户编号 = new UAS_LabelMachine.CustomControl.SearchTextBox();
-            this.cu_code = new UAS_LabelMachine.CustomControl.SearchTextBox();
-            this.UpdateGrid = new UAS_LabelMachine.CustomControl.NormalButton();
-            this.Screen = new UAS_LabelMachine.CustomControl.NormalButton();
-            this.cu_name = new UAS_LabelMachine.CustomControl.EnterTextBox();
             ((System.ComponentModel.ISupportInitialize)(this.LabelDataGridView)).BeginInit();
             this.SuspendLayout();
             // 
@@ -265,7 +266,7 @@ namespace UAS_LabelMachine
             // 
             // la_name
             // 
-            this.la_name.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
+            this.la_name.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
             | System.Windows.Forms.AnchorStyles.Right)));
             this.la_name.Location = new System.Drawing.Point(155, 616);
             this.la_name.Margin = new System.Windows.Forms.Padding(4);
@@ -410,6 +411,7 @@ namespace UAS_LabelMachine
             this.cl_labelcode,
             this.cl_labelurl,
             this.cl_labelname,
+            this.cl_date,
             this.cl_isdefault,
             this.cl_detno,
             this.cl_labelsoft,
@@ -417,16 +419,16 @@ namespace UAS_LabelMachine
             this.LabelDataGridView.Location = new System.Drawing.Point(23, 112);
             this.LabelDataGridView.Margin = new System.Windows.Forms.Padding(4);
             this.LabelDataGridView.Name = "LabelDataGridView";
-            dataGridViewCellStyle5.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
-            dataGridViewCellStyle5.BackColor = System.Drawing.Color.Blue;
-            dataGridViewCellStyle5.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            dataGridViewCellStyle5.ForeColor = System.Drawing.SystemColors.WindowText;
-            dataGridViewCellStyle5.SelectionBackColor = System.Drawing.SystemColors.Highlight;
-            dataGridViewCellStyle5.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(128)))));
-            dataGridViewCellStyle5.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
-            this.LabelDataGridView.RowHeadersDefaultCellStyle = dataGridViewCellStyle5;
-            dataGridViewCellStyle6.BackColor = System.Drawing.Color.White;
-            this.LabelDataGridView.RowsDefaultCellStyle = dataGridViewCellStyle6;
+            dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
+            dataGridViewCellStyle1.BackColor = System.Drawing.Color.Blue;
+            dataGridViewCellStyle1.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            dataGridViewCellStyle1.ForeColor = System.Drawing.SystemColors.WindowText;
+            dataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight;
+            dataGridViewCellStyle1.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(128)))));
+            dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
+            this.LabelDataGridView.RowHeadersDefaultCellStyle = dataGridViewCellStyle1;
+            dataGridViewCellStyle2.BackColor = System.Drawing.Color.White;
+            this.LabelDataGridView.RowsDefaultCellStyle = dataGridViewCellStyle2;
             this.LabelDataGridView.RowTemplate.Height = 23;
             this.LabelDataGridView.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
             this.LabelDataGridView.Size = new System.Drawing.Size(1186, 435);
@@ -435,6 +437,88 @@ namespace UAS_LabelMachine
             this.LabelDataGridView.CellFormatting += new System.Windows.Forms.DataGridViewCellFormattingEventHandler(this.LabelDataGridView_CellFormatting);
             this.LabelDataGridView.DataError += new System.Windows.Forms.DataGridViewDataErrorEventHandler(this.LabelDataGridView_DataError);
             // 
+            // PrintTest
+            // 
+            this.PrintTest.Image = ((System.Drawing.Image)(resources.GetObject("PrintTest.Image")));
+            this.PrintTest.Location = new System.Drawing.Point(1354, 569);
+            this.PrintTest.Margin = new System.Windows.Forms.Padding(4);
+            this.PrintTest.Name = "PrintTest";
+            this.PrintTest.Size = new System.Drawing.Size(81, 30);
+            this.PrintTest.TabIndex = 166;
+            this.PrintTest.Tag = "Print";
+            this.PrintTest.Text = "打印测试";
+            this.PrintTest.UseVisualStyleBackColor = true;
+            this.PrintTest.Click += new System.EventHandler(this.PrintTest_Click);
+            // 
+            // 客户编号
+            // 
+            this.客户编号.Caller = null;
+            this.客户编号.Condition = null;
+            this.客户编号.FormName = null;
+            this.客户编号.Location = new System.Drawing.Point(155, 566);
+            this.客户编号.Margin = new System.Windows.Forms.Padding(4);
+            this.客户编号.Name = "客户编号";
+            this.客户编号.SelectField = null;
+            this.客户编号.SetValueField = null;
+            this.客户编号.Size = new System.Drawing.Size(181, 26);
+            this.客户编号.TabIndex = 168;
+            this.客户编号.TableName = null;
+            this.客户编号.Tag = "cu_code";
+            // 
+            // cu_code
+            // 
+            this.cu_code.Caller = null;
+            this.cu_code.Condition = null;
+            this.cu_code.FormName = null;
+            this.cu_code.Location = new System.Drawing.Point(169, 20);
+            this.cu_code.Margin = new System.Windows.Forms.Padding(4);
+            this.cu_code.Name = "cu_code";
+            this.cu_code.SelectField = null;
+            this.cu_code.SetValueField = null;
+            this.cu_code.Size = new System.Drawing.Size(200, 26);
+            this.cu_code.TabIndex = 159;
+            this.cu_code.TableName = null;
+            this.cu_code.Tag = "cl_custcode";
+            // 
+            // UpdateGrid
+            // 
+            this.UpdateGrid.Image = ((System.Drawing.Image)(resources.GetObject("UpdateGrid.Image")));
+            this.UpdateGrid.Location = new System.Drawing.Point(927, 61);
+            this.UpdateGrid.Margin = new System.Windows.Forms.Padding(4);
+            this.UpdateGrid.Name = "UpdateGrid";
+            this.UpdateGrid.Size = new System.Drawing.Size(81, 30);
+            this.UpdateGrid.TabIndex = 154;
+            this.UpdateGrid.Tag = "IfWrite";
+            this.UpdateGrid.Text = "更新";
+            this.UpdateGrid.UseVisualStyleBackColor = true;
+            this.UpdateGrid.Click += new System.EventHandler(this.Update_Click);
+            // 
+            // Screen
+            // 
+            this.Screen.Image = ((System.Drawing.Image)(resources.GetObject("Screen.Image")));
+            this.Screen.Location = new System.Drawing.Point(776, 61);
+            this.Screen.Margin = new System.Windows.Forms.Padding(4);
+            this.Screen.Name = "Screen";
+            this.Screen.Size = new System.Drawing.Size(81, 30);
+            this.Screen.TabIndex = 153;
+            this.Screen.Tag = "IfRead";
+            this.Screen.Text = "筛选";
+            this.Screen.UseVisualStyleBackColor = true;
+            this.Screen.Click += new System.EventHandler(this.Screen_Click);
+            // 
+            // cu_name
+            // 
+            this.cu_name.ID = null;
+            this.cu_name.Location = new System.Drawing.Point(559, 20);
+            this.cu_name.Margin = new System.Windows.Forms.Padding(4);
+            this.cu_name.Name = "cu_name";
+            this.cu_name.Size = new System.Drawing.Size(199, 25);
+            this.cu_name.Str = null;
+            this.cu_name.Str1 = null;
+            this.cu_name.Str2 = null;
+            this.cu_name.TabIndex = 147;
+            this.cu_name.Tag = "cu_name";
+            // 
             // Choose
             // 
             this.Choose.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
@@ -496,6 +580,12 @@ namespace UAS_LabelMachine
             this.cl_labelname.HeaderText = "模板名称";
             this.cl_labelname.Name = "cl_labelname";
             // 
+            // cl_date
+            // 
+            this.cl_date.DataPropertyName = "cl_date";
+            this.cl_date.HeaderText = "最后修改时间";
+            this.cl_date.Name = "cl_date";
+            // 
             // cl_isdefault
             // 
             this.cl_isdefault.DataPropertyName = "cl_isdefault";
@@ -521,88 +611,6 @@ namespace UAS_LabelMachine
             this.cl_status.Name = "cl_status";
             this.cl_status.ReadOnly = true;
             // 
-            // PrintTest
-            // 
-            this.PrintTest.Image = ((System.Drawing.Image)(resources.GetObject("PrintTest.Image")));
-            this.PrintTest.Location = new System.Drawing.Point(1354, 569);
-            this.PrintTest.Margin = new System.Windows.Forms.Padding(4);
-            this.PrintTest.Name = "PrintTest";
-            this.PrintTest.Size = new System.Drawing.Size(81, 30);
-            this.PrintTest.TabIndex = 166;
-            this.PrintTest.Tag = "Print";
-            this.PrintTest.Text = "打印测试";
-            this.PrintTest.UseVisualStyleBackColor = true;
-            this.PrintTest.Click += new System.EventHandler(this.PrintTest_Click);
-            // 
-            // 客户编号
-            // 
-            this.客户编号.Caller = null;
-            this.客户编号.Condition = null;
-            this.客户编号.FormName = null;
-            this.客户编号.Location = new System.Drawing.Point(155, 566);
-            this.客户编号.Margin = new System.Windows.Forms.Padding(4);
-            this.客户编号.Name = "客户编号";
-            this.客户编号.SelectField = null;
-            this.客户编号.SetValueField = null;
-            this.客户编号.Size = new System.Drawing.Size(181, 26);
-            this.客户编号.TabIndex = 168;
-            this.客户编号.TableName = null;
-            this.客户编号.Tag = "cu_code";
-            // 
-            // cu_code
-            // 
-            this.cu_code.Caller = null;
-            this.cu_code.Condition = null;
-            this.cu_code.FormName = null;
-            this.cu_code.Location = new System.Drawing.Point(169, 20);
-            this.cu_code.Margin = new System.Windows.Forms.Padding(4);
-            this.cu_code.Name = "cu_code";
-            this.cu_code.SelectField = null;
-            this.cu_code.SetValueField = null;
-            this.cu_code.Size = new System.Drawing.Size(200, 26);
-            this.cu_code.TabIndex = 159;
-            this.cu_code.TableName = null;
-            this.cu_code.Tag = "cl_custcode";
-            // 
-            // UpdateGrid
-            // 
-            this.UpdateGrid.Image = ((System.Drawing.Image)(resources.GetObject("UpdateGrid.Image")));
-            this.UpdateGrid.Location = new System.Drawing.Point(927, 61);
-            this.UpdateGrid.Margin = new System.Windows.Forms.Padding(4);
-            this.UpdateGrid.Name = "UpdateGrid";
-            this.UpdateGrid.Size = new System.Drawing.Size(81, 30);
-            this.UpdateGrid.TabIndex = 154;
-            this.UpdateGrid.Tag = "IfWrite";
-            this.UpdateGrid.Text = "更新";
-            this.UpdateGrid.UseVisualStyleBackColor = true;
-            this.UpdateGrid.Click += new System.EventHandler(this.Update_Click);
-            // 
-            // Screen
-            // 
-            this.Screen.Image = ((System.Drawing.Image)(resources.GetObject("Screen.Image")));
-            this.Screen.Location = new System.Drawing.Point(776, 61);
-            this.Screen.Margin = new System.Windows.Forms.Padding(4);
-            this.Screen.Name = "Screen";
-            this.Screen.Size = new System.Drawing.Size(81, 30);
-            this.Screen.TabIndex = 153;
-            this.Screen.Tag = "IfRead";
-            this.Screen.Text = "筛选";
-            this.Screen.UseVisualStyleBackColor = true;
-            this.Screen.Click += new System.EventHandler(this.Screen_Click);
-            // 
-            // cu_name
-            // 
-            this.cu_name.ID = null;
-            this.cu_name.Location = new System.Drawing.Point(559, 20);
-            this.cu_name.Margin = new System.Windows.Forms.Padding(4);
-            this.cu_name.Name = "cu_name";
-            this.cu_name.Size = new System.Drawing.Size(199, 25);
-            this.cu_name.Str = null;
-            this.cu_name.Str1 = null;
-            this.cu_name.Str2 = null;
-            this.cu_name.TabIndex = 147;
-            this.cu_name.Tag = "cu_name";
-            // 
             // 客户标签维护
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
@@ -692,6 +700,9 @@ namespace UAS_LabelMachine
         private TextBox la_name;
         private Label la_name_label;
         private CheckBox FTPShare;
+        private NormalButton NewLabel;
+        private Pagination pagination1;
+        private RadioButton CodeSoft;
         private DataGridViewCheckBoxColumn Choose;
         private DataGridViewTextBoxColumn la_id;
         private DataGridViewTextBoxColumn cu_name1;
@@ -701,12 +712,10 @@ namespace UAS_LabelMachine
         private DataGridViewTextBoxColumn cl_labelcode;
         private DataGridViewTextBoxColumn cl_labelurl;
         private DataGridViewTextBoxColumn cl_labelname;
+        private DataGridViewTextBoxColumn cl_date;
         private DataGridViewTextBoxColumn cl_isdefault;
         private DataGridViewTextBoxColumn cl_detno;
         private DataGridViewTextBoxColumn cl_labelsoft;
         private DataGridViewTextBoxColumn cl_status;
-        private NormalButton NewLabel;
-        private Pagination pagination1;
-        private RadioButton CodeSoft;
     }
 }

+ 12 - 15
UAS-出货标签管理/客户标签维护.cs

@@ -96,7 +96,6 @@ namespace UAS_LabelMachine
             }
             dh = new DataHelper();
             condition.Append("");
-
             ChooseAll.ChooseAll(LabelDataGridView);
             BaseUtil.SetComboxData(la_type, "display", "value", labeltype);
             //加载下拉框的静态值
@@ -120,14 +119,11 @@ namespace UAS_LabelMachine
                 LabelCode = LabelDataGridView.Rows[e.RowIndex].Cells["cl_labelcode"].Value.ToString();
                 CL_ID1 = LabelDataGridView.Rows[e.RowIndex].Cells["cl_id"].Value.ToString();
                 La_id1 = LabelDataGridView.Rows[e.RowIndex].Cells["la_id"].Value.ToString();
+                System.DateTime time = Convert.ToDateTime(LabelDataGridView.Rows[e.RowIndex].Cells["cl_date"].Value.ToString());
                 if (CodeSoft.Checked)
                 {
                     string LabelName = LabelDataGridView.Rows[e.RowIndex].Cells["cl_labelname"].Value.ToString();
-                    doc = lbl.Documents.Open(BaseUtil.GetLabelUrl(LabelPath, LabelName));
-                    if (doc == null)
-                    {
-                        Console.WriteLine("doc is null");
-                    }
+                    doc = lbl.Documents.Open(BaseUtil.GetLabelUrl(LabelPath, LabelName,time));
                     ParamNum = doc.Variables.FreeVariables.Count;
                     //去除之前添加的控件
                     for (int i = 0; i < (ParamName == null ? 0 : ParamName.Length); i++)
@@ -182,7 +178,8 @@ namespace UAS_LabelMachine
                     CL_ID2 = LabelDataGridView.Rows[e.RowIndex].Cells["cl_id"].Value.ToString();
                     LabelPath = LabelDataGridView.Rows[e.RowIndex].Cells["cl_labelurl"].Value.ToString();
                     string LabelName = LabelDataGridView.Rows[e.RowIndex].Cells["cl_labelname"].Value.ToString();
-                    BaseUtil.GetLabelUrl(LabelPath, LabelName);
+                    System.DateTime time = Convert.ToDateTime(LabelDataGridView.Rows[e.RowIndex].Cells["cl_date"].Value.ToString());
+                    BaseUtil.GetLabelUrl(LabelPath, LabelName, time);
                     System.Diagnostics.Process.Start(ftpOperater.DownLoadTo + LabelName);
                     客户编号.Text = LabelDataGridView.Rows[e.RowIndex].Cells["CL_CUSTCODE2"].Value.ToString();
                     la_type1.Text = LabelDataGridView.Rows[e.RowIndex].Cells["cl_labeltype"].Value.ToString();
@@ -205,7 +202,7 @@ namespace UAS_LabelMachine
             }
             else
             {
-                sql.Append("select cu_name,cl_labelurl,cl_labeltype,cl_isdefault,cl_custcode,cl_labelname,cl_id,cl_labelcode,cl_detno,cl_labelsoft,la_id from customerlabel left join customer on cl_custcode=cu_code left join label on la_code=cl_custcode order by cl_custcode ");
+                sql.Append("select to_char(nvl(cl_date,sysdate),'YYYY-MM-DD HH24:Mi:SS') cl_date,cu_name,cl_labelurl,cl_labeltype,cl_isdefault,cl_custcode,cl_labelname,cl_id,cl_labelcode,cl_detno,cl_labelsoft,la_id from customerlabel left join customer on cl_custcode=cu_code left join label on la_code=cl_custcode order by cl_custcode ");
                 //设置筛选的条件
                 condition.Append(BaseUtil.GetScreenSqlCondition(cu_code, la_type));
                 //最终刷选条件拼接成的sql
@@ -233,7 +230,7 @@ namespace UAS_LabelMachine
                         LabelDataGridView.Rows[i].Cells["cl_labelsoft"].Value = LabelSoft;
                     }
                 }
-                string sql = "Insert into customerlabel (cl_ID,cl_custCODE,cl_LABELTYPE,cl_LABELCODE,cl_LABELURL,cl_DETNO,cl_LABELSOFT,cl_ISDEFAULT) values( customerlabel_seq.nextval,'" + cu_code.Text + "',:cl_LABELTYPE,:cl_LABELCODE,:cl_LABELURL,:cl_DETNO,:cl_LABELSOFT,:cl_ISDEFAULT )";
+                string sql = "Insert into customerlabel (cl_ID,cl_custCODE,cl_LABELTYPE,cl_LABELCODE,cl_LABELURL,cl_DETNO,cl_LABELSOFT,cl_ISDEFAULT, cl_date) values( customerlabel_seq.nextval,'" + cu_code.Text + "',:cl_LABELTYPE,:cl_LABELCODE,:cl_LABELURL,:cl_DETNO,:cl_LABELSOFT,:cl_ISDEFAULT,sysdate )";
                 dh.UpDateTableByCondition(dt.GetChanges(), "customerlabel", "cl_id", sql.ToLower());
                 LoadData();
             }
@@ -309,7 +306,7 @@ namespace UAS_LabelMachine
                 //如果没有任何筛选条件直接选取customerlabel的数据
                 if (sql.Length == 0)
                 {
-                    dt = (DataTable)dh.ExecuteSql("select cu_name,cl_labelurl,cl_labeltype,cl_isdefault,cl_labelname,cl_custcode,cl_id,cl_labelcode,cl_detno,cl_labelsoft,la_id from customerlabel left join customer on cl_custcode=cu_code left join label on la_code=CL_LABELCODE order by cl_custcode", "select");
+                    dt = (DataTable)dh.ExecuteSql("select to_char(nvl(cl_date,sysdate),'YYYY-MM-DD HH24:Mi:SS') cl_date,cu_name,cl_labelurl,cl_labeltype,cl_isdefault,cl_labelname,cl_custcode,cl_id,cl_labelcode,cl_detno,cl_labelsoft,la_id from customerlabel left join customer on cl_custcode=cu_code left join label on la_code=CL_LABELCODE order by cl_custcode", "select");
                 }
                 else
                 {
@@ -387,13 +384,13 @@ namespace UAS_LabelMachine
                     {
                         sql.Clear();
                         sql.Append("update customerlabel set cl_labelcode='" + la_code.Text + "',cl_custcode='" + 客户编号.Text + "',");
-                        sql.Append("cl_labeltype='" + la_type1.Text + "',cl_labelname='" + la_name.Text + "' where cl_id=" + CL_ID2);
+                        sql.Append("cl_labeltype='" + la_type1.Text + "',cl_labelname='" + la_name.Text + "',cl_date=sysdate where cl_id=" + CL_ID2);
                     }
                     else
                     {
                         sql.Clear();
-                        sql.Append("insert into customerlabel (cl_id,cl_labelcode,cl_custcode,cl_labeltype,cl_labelurl,cl_labelname,cl_labelsoft) values( customerlabel_seq.nextval, ");
-                        sql.Append("'" + la_code.Text + "','" + (客户编号.Text == "" ? "" : 客户编号.Text) + "','" + la_type1.Text + "','" + ftpOperater.FTPAddress + "','" + la_name.Text + "','" + SoftWare + "')");
+                        sql.Append("insert into customerlabel (cl_id,cl_labelcode,cl_custcode,cl_labeltype,cl_labelurl,cl_labelname,cl_labelsoft,cl_date) values( customerlabel_seq.nextval, ");
+                        sql.Append("'" + la_code.Text + "','" + (客户编号.Text == "" ? "" : 客户编号.Text) + "','" + la_type1.Text + "','" + ftpOperater.FTPAddress + "','" + la_name.Text + "','" + SoftWare + "',sysdate)");
                     }
                     dh.ExecuteSql(sql.ToString(), "insert");
                     sql.Clear();
@@ -425,8 +422,8 @@ namespace UAS_LabelMachine
                         File.Copy(sourceFile, destFile, true);
                         string SoftWare = "CodeSoft";
                         sql.Clear();
-                        sql.Append("insert into customerlabel (cl_id,cl_labelcode,cl_custcode,cl_labeltype,cl_labelurl,cl_labelname,cl_labelsoft) values( customerlabel_seq.nextval, ");
-                        sql.Append("'" + la_code.Text + "','" + (客户编号.Text == "" ? "共用" : 客户编号.Text) + "','" + la_type1.Text + "','" + destFile + "','" + la_name.Text + "','" + SoftWare + "')");
+                        sql.Append("insert into customerlabel (cl_id,cl_labelcode,cl_custcode,cl_labeltype,cl_labelurl,cl_labelname,cl_labelsoft,cl_date) values( customerlabel_seq.nextval, ");
+                        sql.Append("'" + la_code.Text + "','" + (客户编号.Text == "" ? "共用" : 客户编号.Text) + "','" + la_type1.Text + "','" + destFile + "','" + la_name.Text + "','" + SoftWare + "',sysdate)");
                         dh.ExecuteSql(sql.ToString(), "insert");
                         sql.Clear();
                     }

+ 3 - 0
UAS-出货标签管理/客户标签维护.resx

@@ -175,6 +175,9 @@
   <metadata name="cl_labelname.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>
+  <metadata name="cl_date.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
   <metadata name="cl_isdefault.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>

+ 51 - 28
UAS-出货标签管理/生成条码.Designer.cs

@@ -43,6 +43,7 @@
             this.ProdIoInfDGV = new UAS_LabelMachine.CustomControl.DataGridViewWithSerialNum();
             this.pi_inoutno = new UAS_LabelMachine.CustomControl.EnterTextBox();
             this.Choose = new System.Windows.Forms.DataGridViewCheckBoxColumn();
+            this.pd_orderdetno = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.pd_pdno = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.pr_id = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.pd_id = new System.Windows.Forms.DataGridViewTextBoxColumn();
@@ -65,9 +66,10 @@
             // 
             this.pi_inoutno_label.AutoSize = true;
             this.pi_inoutno_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pi_inoutno_label.Location = new System.Drawing.Point(25, 29);
+            this.pi_inoutno_label.Location = new System.Drawing.Point(33, 36);
+            this.pi_inoutno_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.pi_inoutno_label.Name = "pi_inoutno_label";
-            this.pi_inoutno_label.Size = new System.Drawing.Size(90, 21);
+            this.pi_inoutno_label.Size = new System.Drawing.Size(112, 27);
             this.pi_inoutno_label.TabIndex = 148;
             this.pi_inoutno_label.Text = "出入库单号";
             // 
@@ -75,9 +77,10 @@
             // 
             this.pi_class_label.AutoSize = true;
             this.pi_class_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pi_class_label.Location = new System.Drawing.Point(266, 29);
+            this.pi_class_label.Location = new System.Drawing.Point(355, 36);
+            this.pi_class_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.pi_class_label.Name = "pi_class_label";
-            this.pi_class_label.Size = new System.Drawing.Size(74, 21);
+            this.pi_class_label.Size = new System.Drawing.Size(92, 27);
             this.pi_class_label.TabIndex = 150;
             this.pi_class_label.Text = "单据类型";
             // 
@@ -85,18 +88,20 @@
             // 
             this.pi_class.AutoSize = true;
             this.pi_class.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pi_class.Location = new System.Drawing.Point(355, 29);
+            this.pi_class.Location = new System.Drawing.Point(473, 36);
+            this.pi_class.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.pi_class.Name = "pi_class";
-            this.pi_class.Size = new System.Drawing.Size(0, 21);
+            this.pi_class.Size = new System.Drawing.Size(0, 27);
             this.pi_class.TabIndex = 152;
             // 
             // pr_kind_label
             // 
             this.pr_kind_label.AutoSize = true;
             this.pr_kind_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pr_kind_label.Location = new System.Drawing.Point(476, 29);
+            this.pr_kind_label.Location = new System.Drawing.Point(635, 36);
+            this.pr_kind_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.pr_kind_label.Name = "pr_kind_label";
-            this.pr_kind_label.Size = new System.Drawing.Size(74, 21);
+            this.pr_kind_label.Size = new System.Drawing.Size(92, 27);
             this.pr_kind_label.TabIndex = 156;
             this.pr_kind_label.Text = "物料类型";
             // 
@@ -108,27 +113,30 @@
             "单件管控",
             "批管控",
             "全部"});
-            this.pr_kind.Location = new System.Drawing.Point(563, 30);
+            this.pr_kind.Location = new System.Drawing.Point(751, 38);
+            this.pr_kind.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.pr_kind.Name = "pr_kind";
-            this.pr_kind.Size = new System.Drawing.Size(121, 20);
+            this.pr_kind.Size = new System.Drawing.Size(160, 23);
             this.pr_kind.TabIndex = 157;
             // 
             // MidCapacity_label
             // 
             this.MidCapacity_label.AutoSize = true;
             this.MidCapacity_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.MidCapacity_label.Location = new System.Drawing.Point(703, 29);
+            this.MidCapacity_label.Location = new System.Drawing.Point(937, 36);
+            this.MidCapacity_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.MidCapacity_label.Name = "MidCapacity_label";
-            this.MidCapacity_label.Size = new System.Drawing.Size(74, 21);
+            this.MidCapacity_label.Size = new System.Drawing.Size(92, 27);
             this.MidCapacity_label.TabIndex = 158;
             this.MidCapacity_label.Text = "中盘容量";
             // 
             // SetMidCapacity
             // 
             this.SetMidCapacity.Image = ((System.Drawing.Image)(resources.GetObject("SetMidCapacity.Image")));
-            this.SetMidCapacity.Location = new System.Drawing.Point(911, 28);
+            this.SetMidCapacity.Location = new System.Drawing.Point(1215, 35);
+            this.SetMidCapacity.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.SetMidCapacity.Name = "SetMidCapacity";
-            this.SetMidCapacity.Size = new System.Drawing.Size(50, 23);
+            this.SetMidCapacity.Size = new System.Drawing.Size(67, 29);
             this.SetMidCapacity.TabIndex = 160;
             this.SetMidCapacity.Text = "刷新";
             this.SetMidCapacity.UseVisualStyleBackColor = true;
@@ -136,17 +144,19 @@
             // 
             // MidCapacity
             // 
-            this.MidCapacity.Location = new System.Drawing.Point(787, 29);
+            this.MidCapacity.Location = new System.Drawing.Point(1049, 36);
+            this.MidCapacity.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.MidCapacity.Name = "MidCapacity";
             this.MidCapacity.Negative = false;
-            this.MidCapacity.Size = new System.Drawing.Size(121, 21);
+            this.MidCapacity.Size = new System.Drawing.Size(160, 25);
             this.MidCapacity.TabIndex = 159;
             // 
             // ChooseAll
             // 
-            this.ChooseAll.Location = new System.Drawing.Point(1, 102);
+            this.ChooseAll.Location = new System.Drawing.Point(1, 128);
+            this.ChooseAll.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.ChooseAll.Name = "ChooseAll";
-            this.ChooseAll.Size = new System.Drawing.Size(46, 23);
+            this.ChooseAll.Size = new System.Drawing.Size(61, 29);
             this.ChooseAll.TabIndex = 155;
             this.ChooseAll.Text = "全选";
             this.ChooseAll.UseVisualStyleBackColor = true;
@@ -154,9 +164,10 @@
             // GenerateBarCode
             // 
             this.GenerateBarCode.Image = ((System.Drawing.Image)(resources.GetObject("GenerateBarCode.Image")));
-            this.GenerateBarCode.Location = new System.Drawing.Point(494, 78);
+            this.GenerateBarCode.Location = new System.Drawing.Point(659, 98);
+            this.GenerateBarCode.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.GenerateBarCode.Name = "GenerateBarCode";
-            this.GenerateBarCode.Size = new System.Drawing.Size(64, 24);
+            this.GenerateBarCode.Size = new System.Drawing.Size(85, 30);
             this.GenerateBarCode.TabIndex = 154;
             this.GenerateBarCode.Text = "生成条码";
             this.GenerateBarCode.UseVisualStyleBackColor = true;
@@ -165,9 +176,10 @@
             // Screen
             // 
             this.Screen.Image = ((System.Drawing.Image)(resources.GetObject("Screen.Image")));
-            this.Screen.Location = new System.Drawing.Point(406, 78);
+            this.Screen.Location = new System.Drawing.Point(541, 98);
+            this.Screen.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.Screen.Name = "Screen";
-            this.Screen.Size = new System.Drawing.Size(64, 24);
+            this.Screen.Size = new System.Drawing.Size(85, 30);
             this.Screen.TabIndex = 153;
             this.Screen.Text = "筛选";
             this.Screen.UseVisualStyleBackColor = true;
@@ -183,6 +195,7 @@
             this.ProdIoInfDGV.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
             this.ProdIoInfDGV.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
             this.Choose,
+            this.pd_orderdetno,
             this.pd_pdno,
             this.pr_id,
             this.pd_id,
@@ -199,10 +212,11 @@
             this.mid_num,
             this.mid_remain});
             this.ProdIoInfDGV.GridColor = System.Drawing.SystemColors.ButtonFace;
-            this.ProdIoInfDGV.Location = new System.Drawing.Point(0, 125);
+            this.ProdIoInfDGV.Location = new System.Drawing.Point(0, 156);
+            this.ProdIoInfDGV.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.ProdIoInfDGV.Name = "ProdIoInfDGV";
             this.ProdIoInfDGV.RowTemplate.Height = 23;
-            this.ProdIoInfDGV.Size = new System.Drawing.Size(964, 350);
+            this.ProdIoInfDGV.Size = new System.Drawing.Size(1285, 438);
             this.ProdIoInfDGV.TabIndex = 151;
             this.ProdIoInfDGV.CellEndEdit += new System.Windows.Forms.DataGridViewCellEventHandler(this.ProdIoInfDGV_CellEndEdit);
             this.ProdIoInfDGV.CellPainting += new System.Windows.Forms.DataGridViewCellPaintingEventHandler(this.ProdIoInfDGV_CellPainting);
@@ -210,9 +224,10 @@
             // pi_inoutno
             // 
             this.pi_inoutno.ID = null;
-            this.pi_inoutno.Location = new System.Drawing.Point(128, 29);
+            this.pi_inoutno.Location = new System.Drawing.Point(171, 36);
+            this.pi_inoutno.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.pi_inoutno.Name = "pi_inoutno";
-            this.pi_inoutno.Size = new System.Drawing.Size(121, 21);
+            this.pi_inoutno.Size = new System.Drawing.Size(160, 25);
             this.pi_inoutno.Str = null;
             this.pi_inoutno.Str1 = null;
             this.pi_inoutno.Str2 = null;
@@ -227,6 +242,12 @@
             this.Choose.Name = "Choose";
             this.Choose.Width = 60;
             // 
+            // pd_orderdetno
+            // 
+            this.pd_orderdetno.DataPropertyName = "pd_orderdetno";
+            this.pd_orderdetno.HeaderText = "订单序号";
+            this.pd_orderdetno.Name = "pd_orderdetno";
+            // 
             // pd_pdno
             // 
             this.pd_pdno.DataPropertyName = "pd_pdno";
@@ -332,9 +353,9 @@
             // 
             // 生成条码
             // 
-            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
+            this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-            this.ClientSize = new System.Drawing.Size(965, 477);
+            this.ClientSize = new System.Drawing.Size(1287, 596);
             this.Controls.Add(this.SetMidCapacity);
             this.Controls.Add(this.MidCapacity);
             this.Controls.Add(this.MidCapacity_label);
@@ -348,6 +369,7 @@
             this.Controls.Add(this.pi_class_label);
             this.Controls.Add(this.pi_inoutno);
             this.Controls.Add(this.pi_inoutno_label);
+            this.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.Name = "生成条码";
             this.Text = "生成条码";
             this.Load += new System.EventHandler(this.生成条码_Load);
@@ -374,6 +396,7 @@
         private CustomControl.NumOnlyTextBox MidCapacity;
         private CustomControl.NormalButton SetMidCapacity;
         private System.Windows.Forms.DataGridViewCheckBoxColumn Choose;
+        private System.Windows.Forms.DataGridViewTextBoxColumn pd_orderdetno;
         private System.Windows.Forms.DataGridViewTextBoxColumn pd_pdno;
         private System.Windows.Forms.DataGridViewTextBoxColumn pr_id;
         private System.Windows.Forms.DataGridViewTextBoxColumn pd_id;

+ 15 - 12
UAS-出货标签管理/生成条码.cs

@@ -109,6 +109,7 @@ namespace UAS_LabelMachine
                     string pr_id = ProdIoInfDGV.Rows[i].Cells["pr_id"].FormattedValue.ToString();
                     string pd_ordercode = ProdIoInfDGV.Rows[i].Cells["pd_ordercode"].FormattedValue.ToString();
                     string pd_pdno = ProdIoInfDGV.Rows[i].Cells["pd_pdno"].FormattedValue.ToString();
+                    string pd_orderdetno = ProdIoInfDGV.Rows[i].Cells["pd_orderdetno"].FormattedValue.ToString();
                     //总数
                     int pd_totalqty = int.Parse(ProdIoInfDGV.Rows[i].Cells["pd_totalqty"].FormattedValue.ToString());
                     //本次数量
@@ -142,16 +143,16 @@ namespace UAS_LabelMachine
                     //    CheckedRowCount--;
                     //    continue;
                     //}
-                    string pib_barcode = dh.getFieldDataByCondition("prodiobarcode", "max(pib_barcode)", "pib_pdid=" + pd_id).ToString();
+                    string pib_barcode = dh.getFieldDataByCondition("prodiobarcode", "max(pib_barcode)", "PIB_INOUTNO='" + pi_inoutno.Text + "'").ToString();
                     //中盒数量*中盒容量=需要打印的单盘标签
-                    ArrayList<string> midcode = new ArrayList<string>();
+                    ArrayList <string> midcode = new ArrayList<string>();
                     ArrayList<string> barcode = new ArrayList<string>();
-                    //循环中盒号的个数,取当前出入库单最大的中盒号+1
+                    //循环中盒号的个数,取当前出入库单最大 的中盒号+1
                     for (int j = 0; j < mid_num; j++)
                     {
                         //获取中盘的编号
-                        string mid_code = dh.getFieldDataByCondition("PRODIOBARCODE", "nvl(max(PIB_OUTBOXCODE1),0)+" + (j + 1), "PIB_INOUTNO='" + pi_inoutno.Text + "'").ToString();
-                        //如果尾数不为0,并且已经遍历到了最后一箱(未装满的箱)
+                        string mid_code = dh.getFieldDataByCondition("PRODIOBARCODE", "nvl(max(to_number(PIB_OUTBOXCODE1)),0)+" + (j + 1), "PIB_INOUTNO='" + pi_inoutno.Text + "'").ToString();
+                        //如果尾数不为0,并且已经遍历到了最后一箱(未装满的箱)
                         int count = 0;
                         if (mid_remain != 0 && j + 1 == mid_num)
                         {
@@ -173,9 +174,9 @@ namespace UAS_LabelMachine
                     }
                     sql.Clear();
                     sql.Append("insert into prodiobarcode (PIB_ID,PIB_PRODCODE,PIB_INDATE,PIB_INOUTNO,PIB_PIID,PIB_BARCODE,PIB_PDNO,");
-                    sql.Append("PIB_PDID,PIB_PICLASS,PIB_QTY,PIB_PRODID,PIB_OUTBOXCODE1,PIB_IFPRINT,PIB_IFPICK,PIB_ORDERCODE,PIB_CUSTPO)");
+                    sql.Append("PIB_PDID,PIB_PICLASS,PIB_QTY,PIB_PRODID,PIB_OUTBOXCODE1,PIB_IFPRINT,PIB_IFPICK,PIB_ORDERCODE,PIB_CUSTPO,pib_orderdetno)");
                     sql.Append(" values (prodiobarcode_seq.nextval,'" + pd_prodcode + "',sysdate,'" + pi_inoutno.Text + "'," + pi_id + ",:barcode,'" + pd_pdno + "','" + pd_id + "',");
-                    sql.Append("'" + pi_class.Text + "',:pib_inqty,'" + pr_id + "',:midcode,0,0,'" + pd_ordercode + "','')");
+                    sql.Append("'" + pi_class.Text + "',:pib_inqty,'" + pr_id + "',:midcode,0,0,'" + pd_ordercode + "','','"+pd_orderdetno+"')");
                     dh.BatchInsert(sql.ToString(), new string[] { "barcode", "pib_inqty", "midcode" }, barcode.ToArray(), pib_inqty.ToArray(), midcode.ToArray());
                 }
             }
@@ -390,11 +391,13 @@ namespace UAS_LabelMachine
                     pd_barcodeioqty = "pd_barcodeoutqty";
                 }
                 sql.Clear();
-                sql.Append("select pd_piid,pd_id,pd_pdno,pd_prodcode," + pd_inoroutqty + " as pd_totalqty,pr_zxbzs,pr_brand,pr_id,");
-                sql.Append(pd_inoroutqty + "-nvl((select sum(nvl(pib_qty,0)) from PRODIOBARCODE where PIB_PIID='" + pi_id + "' and pib_pdid=pd_id ");
-                sql.Append("and pib_prodcode=pd_prodcode),0) as pd_qty,pr_detail,pr_spec,pd_ordercode,pr_unit from prodiodetail ");
-                sql.Append("left join product on pr_code=pd_prodcode where pd_piid=" + pi_id + Condition + " and ");
-                sql.Append(pd_inoroutqty + "-nvl(" + pd_barcodeioqty + ",0)>0 ");
+                sql.Append("select pd_piid,pd_id,pr_id,pr_brand,pr_unit,pr_detail,pr_spec,pr_zxbzs,outqty pd_totalqty,pd_ordercode,pd_orderdetno,pd_prodcode,pd_piclass,pd_qty from (select ");
+                sql.Append("pd_piid,pd_id,pr_id,pr_brand,pr_unit,pr_detail,pr_spec,pr_zxbzs,outqty,pd_ordercode,pd_orderdetno,pd_prodcode,pd_piclass,");
+                sql.Append("outqty-nvl((select sum(nvl(pib_qty,0)) from PRODIOBARCODE where PIB_PIID=pd_piid and pib_ordercode=pd_ordercode ");
+                sql.Append("and pib_orderdetno=pd_orderdetno),0)pd_qty from (select pd_piid,min(pd_id) pd_id,sum(pd_outqty)outqty,");
+                sql.Append("pd_ordercode,pd_orderdetno,max(pd_prodcode)pd_prodcode,max(pd_piclass)pd_piclass ");
+                sql.Append("from prodiodetail where pd_piclass='出货单' group by pd_piid,pd_ordercode,pd_orderdetno)T left join product on pr_code=pd_prodcode ");
+                sql.Append("where nvl(pr_zxbzs,0)>0)  where  pd_piid='" + pi_id + "'");
                 dt = (DataTable)dh.ExecuteSql(sql.ToString(), "select");
                 BaseUtil.FillDgvWithDataTable(ProdIoInfDGV, dt);
             }

+ 3 - 0
UAS-出货标签管理/生成条码.resx

@@ -157,6 +157,9 @@
   <metadata name="Choose.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>
+  <metadata name="pd_orderdetno.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
   <metadata name="pd_pdno.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>

+ 122 - 122
UAS-出货标签管理/采集策略.Designer.cs

@@ -112,7 +112,7 @@
             this.sg_name_label.AutoSize = true;
             this.sg_name_label.BackColor = System.Drawing.Color.Transparent;
             this.sg_name_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.sg_name_label.Location = new System.Drawing.Point(399, 54);
+            this.sg_name_label.Location = new System.Drawing.Point(399, 34);
             this.sg_name_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.sg_name_label.Name = "sg_name_label";
             this.sg_name_label.Size = new System.Drawing.Size(92, 27);
@@ -124,7 +124,7 @@
             this.sg_code_label.AutoSize = true;
             this.sg_code_label.BackColor = System.Drawing.Color.Transparent;
             this.sg_code_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.sg_code_label.Location = new System.Drawing.Point(27, 54);
+            this.sg_code_label.Location = new System.Drawing.Point(27, 34);
             this.sg_code_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.sg_code_label.Name = "sg_code_label";
             this.sg_code_label.Size = new System.Drawing.Size(92, 27);
@@ -135,8 +135,8 @@
             // 
             this.si_type2.AutoSize = true;
             this.si_type2.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.si_type2.Location = new System.Drawing.Point(32, 295);
-            this.si_type2.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.si_type2.Location = new System.Drawing.Point(32, 253);
+            this.si_type2.Margin = new System.Windows.Forms.Padding(4);
             this.si_type2.Name = "si_type2";
             this.si_type2.Size = new System.Drawing.Size(93, 31);
             this.si_type2.TabIndex = 17;
@@ -147,8 +147,8 @@
             // 
             this.si_type1.AutoSize = true;
             this.si_type1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.si_type1.Location = new System.Drawing.Point(32, 425);
-            this.si_type1.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.si_type1.Location = new System.Drawing.Point(32, 383);
+            this.si_type1.Margin = new System.Windows.Forms.Padding(4);
             this.si_type1.Name = "si_type1";
             this.si_type1.Size = new System.Drawing.Size(128, 31);
             this.si_type1.TabIndex = 18;
@@ -159,8 +159,8 @@
             // 
             this.si_type4.AutoSize = true;
             this.si_type4.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.si_type4.Location = new System.Drawing.Point(32, 175);
-            this.si_type4.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.si_type4.Location = new System.Drawing.Point(32, 133);
+            this.si_type4.Margin = new System.Windows.Forms.Padding(4);
             this.si_type4.Name = "si_type4";
             this.si_type4.Size = new System.Drawing.Size(82, 31);
             this.si_type4.TabIndex = 19;
@@ -171,8 +171,8 @@
             // 
             this.si_type3.AutoSize = true;
             this.si_type3.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.si_type3.Location = new System.Drawing.Point(32, 558);
-            this.si_type3.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.si_type3.Location = new System.Drawing.Point(32, 516);
+            this.si_type3.Margin = new System.Windows.Forms.Padding(4);
             this.si_type3.Name = "si_type3";
             this.si_type3.Size = new System.Drawing.Size(73, 31);
             this.si_type3.TabIndex = 20;
@@ -184,7 +184,7 @@
             this.si_expression1_label.AutoSize = true;
             this.si_expression1_label.BackColor = System.Drawing.Color.Transparent;
             this.si_expression1_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.si_expression1_label.Location = new System.Drawing.Point(691, 465);
+            this.si_expression1_label.Location = new System.Drawing.Point(691, 423);
             this.si_expression1_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.si_expression1_label.Name = "si_expression1_label";
             this.si_expression1_label.Size = new System.Drawing.Size(112, 27);
@@ -196,7 +196,7 @@
             this.si_kind1_label.AutoSize = true;
             this.si_kind1_label.BackColor = System.Drawing.Color.Transparent;
             this.si_kind1_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.si_kind1_label.Location = new System.Drawing.Point(357, 465);
+            this.si_kind1_label.Location = new System.Drawing.Point(357, 423);
             this.si_kind1_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.si_kind1_label.Name = "si_kind1_label";
             this.si_kind1_label.Size = new System.Drawing.Size(92, 27);
@@ -208,7 +208,7 @@
             this.si_detno1_label.AutoSize = true;
             this.si_detno1_label.BackColor = System.Drawing.Color.Transparent;
             this.si_detno1_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.si_detno1_label.Location = new System.Drawing.Point(27, 465);
+            this.si_detno1_label.Location = new System.Drawing.Point(27, 423);
             this.si_detno1_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.si_detno1_label.Name = "si_detno1_label";
             this.si_detno1_label.Size = new System.Drawing.Size(92, 27);
@@ -220,7 +220,7 @@
             this.si_item1_label.AutoSize = true;
             this.si_item1_label.BackColor = System.Drawing.Color.Transparent;
             this.si_item1_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.si_item1_label.Location = new System.Drawing.Point(1113, 461);
+            this.si_item1_label.Location = new System.Drawing.Point(1113, 419);
             this.si_item1_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.si_item1_label.Name = "si_item1_label";
             this.si_item1_label.Size = new System.Drawing.Size(92, 27);
@@ -233,7 +233,7 @@
             this.si_item2_label.AutoSize = true;
             this.si_item2_label.BackColor = System.Drawing.Color.Transparent;
             this.si_item2_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.si_item2_label.Location = new System.Drawing.Point(1113, 330);
+            this.si_item2_label.Location = new System.Drawing.Point(1113, 288);
             this.si_item2_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.si_item2_label.Name = "si_item2_label";
             this.si_item2_label.Size = new System.Drawing.Size(92, 27);
@@ -246,7 +246,7 @@
             this.si_detno2_label.AutoSize = true;
             this.si_detno2_label.BackColor = System.Drawing.Color.Transparent;
             this.si_detno2_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.si_detno2_label.Location = new System.Drawing.Point(27, 334);
+            this.si_detno2_label.Location = new System.Drawing.Point(27, 292);
             this.si_detno2_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.si_detno2_label.Name = "si_detno2_label";
             this.si_detno2_label.Size = new System.Drawing.Size(92, 27);
@@ -258,7 +258,7 @@
             this.si_kind2_label.AutoSize = true;
             this.si_kind2_label.BackColor = System.Drawing.Color.Transparent;
             this.si_kind2_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.si_kind2_label.Location = new System.Drawing.Point(357, 334);
+            this.si_kind2_label.Location = new System.Drawing.Point(357, 292);
             this.si_kind2_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.si_kind2_label.Name = "si_kind2_label";
             this.si_kind2_label.Size = new System.Drawing.Size(92, 27);
@@ -270,7 +270,7 @@
             this.si_expression2_label.AutoSize = true;
             this.si_expression2_label.BackColor = System.Drawing.Color.Transparent;
             this.si_expression2_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.si_expression2_label.Location = new System.Drawing.Point(691, 334);
+            this.si_expression2_label.Location = new System.Drawing.Point(691, 292);
             this.si_expression2_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.si_expression2_label.Name = "si_expression2_label";
             this.si_expression2_label.Size = new System.Drawing.Size(112, 27);
@@ -282,7 +282,7 @@
             this.si_item3_label.AutoSize = true;
             this.si_item3_label.BackColor = System.Drawing.Color.Transparent;
             this.si_item3_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.si_item3_label.Location = new System.Drawing.Point(1113, 600);
+            this.si_item3_label.Location = new System.Drawing.Point(1113, 558);
             this.si_item3_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.si_item3_label.Name = "si_item3_label";
             this.si_item3_label.Size = new System.Drawing.Size(92, 27);
@@ -295,7 +295,7 @@
             this.si_detno3_label.AutoSize = true;
             this.si_detno3_label.BackColor = System.Drawing.Color.Transparent;
             this.si_detno3_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.si_detno3_label.Location = new System.Drawing.Point(27, 604);
+            this.si_detno3_label.Location = new System.Drawing.Point(27, 562);
             this.si_detno3_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.si_detno3_label.Name = "si_detno3_label";
             this.si_detno3_label.Size = new System.Drawing.Size(92, 27);
@@ -307,7 +307,7 @@
             this.si_kind3_label.AutoSize = true;
             this.si_kind3_label.BackColor = System.Drawing.Color.Transparent;
             this.si_kind3_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.si_kind3_label.Location = new System.Drawing.Point(357, 604);
+            this.si_kind3_label.Location = new System.Drawing.Point(357, 562);
             this.si_kind3_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.si_kind3_label.Name = "si_kind3_label";
             this.si_kind3_label.Size = new System.Drawing.Size(92, 27);
@@ -319,7 +319,7 @@
             this.si_expression3_label.AutoSize = true;
             this.si_expression3_label.BackColor = System.Drawing.Color.Transparent;
             this.si_expression3_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.si_expression3_label.Location = new System.Drawing.Point(691, 604);
+            this.si_expression3_label.Location = new System.Drawing.Point(691, 562);
             this.si_expression3_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.si_expression3_label.Name = "si_expression3_label";
             this.si_expression3_label.Size = new System.Drawing.Size(112, 27);
@@ -331,7 +331,7 @@
             this.si_item4_label.AutoSize = true;
             this.si_item4_label.BackColor = System.Drawing.Color.Transparent;
             this.si_item4_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.si_item4_label.Location = new System.Drawing.Point(1113, 206);
+            this.si_item4_label.Location = new System.Drawing.Point(1113, 164);
             this.si_item4_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.si_item4_label.Name = "si_item4_label";
             this.si_item4_label.Size = new System.Drawing.Size(92, 27);
@@ -344,7 +344,7 @@
             this.si_detno4_label.AutoSize = true;
             this.si_detno4_label.BackColor = System.Drawing.Color.Transparent;
             this.si_detno4_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.si_detno4_label.Location = new System.Drawing.Point(27, 210);
+            this.si_detno4_label.Location = new System.Drawing.Point(27, 168);
             this.si_detno4_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.si_detno4_label.Name = "si_detno4_label";
             this.si_detno4_label.Size = new System.Drawing.Size(92, 27);
@@ -356,7 +356,7 @@
             this.si_kind4_label.AutoSize = true;
             this.si_kind4_label.BackColor = System.Drawing.Color.Transparent;
             this.si_kind4_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.si_kind4_label.Location = new System.Drawing.Point(357, 210);
+            this.si_kind4_label.Location = new System.Drawing.Point(357, 168);
             this.si_kind4_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.si_kind4_label.Name = "si_kind4_label";
             this.si_kind4_label.Size = new System.Drawing.Size(92, 27);
@@ -368,7 +368,7 @@
             this.si_expression4_label.AutoSize = true;
             this.si_expression4_label.BackColor = System.Drawing.Color.Transparent;
             this.si_expression4_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.si_expression4_label.Location = new System.Drawing.Point(691, 210);
+            this.si_expression4_label.Location = new System.Drawing.Point(691, 168);
             this.si_expression4_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.si_expression4_label.Name = "si_expression4_label";
             this.si_expression4_label.Size = new System.Drawing.Size(112, 27);
@@ -385,8 +385,8 @@
             "索引字符",
             "二次解析",
             "全部"});
-            this.si_kind1.Location = new System.Drawing.Point(473, 466);
-            this.si_kind1.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.si_kind1.Location = new System.Drawing.Point(473, 424);
+            this.si_kind1.Margin = new System.Windows.Forms.Padding(4);
             this.si_kind1.Name = "si_kind1";
             this.si_kind1.Size = new System.Drawing.Size(208, 23);
             this.si_kind1.TabIndex = 10;
@@ -401,8 +401,8 @@
             "索引字符",
             "二次解析",
             "全部"});
-            this.si_kind2.Location = new System.Drawing.Point(473, 334);
-            this.si_kind2.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.si_kind2.Location = new System.Drawing.Point(473, 292);
+            this.si_kind2.Margin = new System.Windows.Forms.Padding(4);
             this.si_kind2.Name = "si_kind2";
             this.si_kind2.Size = new System.Drawing.Size(208, 23);
             this.si_kind2.TabIndex = 64;
@@ -417,8 +417,8 @@
             "索引字符",
             "二次解析",
             "全部"});
-            this.si_kind3.Location = new System.Drawing.Point(473, 604);
-            this.si_kind3.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.si_kind3.Location = new System.Drawing.Point(473, 562);
+            this.si_kind3.Margin = new System.Windows.Forms.Padding(4);
             this.si_kind3.Name = "si_kind3";
             this.si_kind3.Size = new System.Drawing.Size(208, 23);
             this.si_kind3.TabIndex = 65;
@@ -433,8 +433,8 @@
             "索引字符",
             "二次解析",
             "全部"});
-            this.si_kind4.Location = new System.Drawing.Point(473, 211);
-            this.si_kind4.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.si_kind4.Location = new System.Drawing.Point(473, 169);
+            this.si_kind4.Margin = new System.Windows.Forms.Padding(4);
             this.si_kind4.Name = "si_kind4";
             this.si_kind4.Size = new System.Drawing.Size(208, 23);
             this.si_kind4.TabIndex = 66;
@@ -444,7 +444,7 @@
             this.si_index1_label.AutoSize = true;
             this.si_index1_label.BackColor = System.Drawing.Color.Transparent;
             this.si_index1_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.si_index1_label.Location = new System.Drawing.Point(27, 508);
+            this.si_index1_label.Location = new System.Drawing.Point(27, 466);
             this.si_index1_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.si_index1_label.Name = "si_index1_label";
             this.si_index1_label.Size = new System.Drawing.Size(92, 27);
@@ -456,7 +456,7 @@
             this.si_length1_label.AutoSize = true;
             this.si_length1_label.BackColor = System.Drawing.Color.Transparent;
             this.si_length1_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.si_length1_label.Location = new System.Drawing.Point(691, 508);
+            this.si_length1_label.Location = new System.Drawing.Point(691, 466);
             this.si_length1_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.si_length1_label.Name = "si_length1_label";
             this.si_length1_label.Size = new System.Drawing.Size(52, 27);
@@ -468,7 +468,7 @@
             this.si_indexstring1_label.AutoSize = true;
             this.si_indexstring1_label.BackColor = System.Drawing.Color.Transparent;
             this.si_indexstring1_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.si_indexstring1_label.Location = new System.Drawing.Point(357, 508);
+            this.si_indexstring1_label.Location = new System.Drawing.Point(357, 466);
             this.si_indexstring1_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.si_indexstring1_label.Name = "si_indexstring1_label";
             this.si_indexstring1_label.Size = new System.Drawing.Size(92, 27);
@@ -480,7 +480,7 @@
             this.si_indexstring2_label.AutoSize = true;
             this.si_indexstring2_label.BackColor = System.Drawing.Color.Transparent;
             this.si_indexstring2_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.si_indexstring2_label.Location = new System.Drawing.Point(357, 372);
+            this.si_indexstring2_label.Location = new System.Drawing.Point(357, 330);
             this.si_indexstring2_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.si_indexstring2_label.Name = "si_indexstring2_label";
             this.si_indexstring2_label.Size = new System.Drawing.Size(92, 27);
@@ -492,7 +492,7 @@
             this.si_length2_label.AutoSize = true;
             this.si_length2_label.BackColor = System.Drawing.Color.Transparent;
             this.si_length2_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.si_length2_label.Location = new System.Drawing.Point(691, 372);
+            this.si_length2_label.Location = new System.Drawing.Point(691, 330);
             this.si_length2_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.si_length2_label.Name = "si_length2_label";
             this.si_length2_label.Size = new System.Drawing.Size(52, 27);
@@ -504,7 +504,7 @@
             this.si_index2_label.AutoSize = true;
             this.si_index2_label.BackColor = System.Drawing.Color.Transparent;
             this.si_index2_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.si_index2_label.Location = new System.Drawing.Point(27, 372);
+            this.si_index2_label.Location = new System.Drawing.Point(27, 330);
             this.si_index2_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.si_index2_label.Name = "si_index2_label";
             this.si_index2_label.Size = new System.Drawing.Size(92, 27);
@@ -516,7 +516,7 @@
             this.si_indexstring3_label.AutoSize = true;
             this.si_indexstring3_label.BackColor = System.Drawing.Color.Transparent;
             this.si_indexstring3_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.si_indexstring3_label.Location = new System.Drawing.Point(357, 649);
+            this.si_indexstring3_label.Location = new System.Drawing.Point(357, 607);
             this.si_indexstring3_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.si_indexstring3_label.Name = "si_indexstring3_label";
             this.si_indexstring3_label.Size = new System.Drawing.Size(92, 27);
@@ -528,7 +528,7 @@
             this.si_length3_label.AutoSize = true;
             this.si_length3_label.BackColor = System.Drawing.Color.Transparent;
             this.si_length3_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.si_length3_label.Location = new System.Drawing.Point(691, 649);
+            this.si_length3_label.Location = new System.Drawing.Point(691, 607);
             this.si_length3_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.si_length3_label.Name = "si_length3_label";
             this.si_length3_label.Size = new System.Drawing.Size(52, 27);
@@ -540,7 +540,7 @@
             this.si_index3_label.AutoSize = true;
             this.si_index3_label.BackColor = System.Drawing.Color.Transparent;
             this.si_index3_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.si_index3_label.Location = new System.Drawing.Point(27, 649);
+            this.si_index3_label.Location = new System.Drawing.Point(27, 607);
             this.si_index3_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.si_index3_label.Name = "si_index3_label";
             this.si_index3_label.Size = new System.Drawing.Size(92, 27);
@@ -552,7 +552,7 @@
             this.si_indexstring4_label.AutoSize = true;
             this.si_indexstring4_label.BackColor = System.Drawing.Color.Transparent;
             this.si_indexstring4_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.si_indexstring4_label.Location = new System.Drawing.Point(357, 254);
+            this.si_indexstring4_label.Location = new System.Drawing.Point(357, 212);
             this.si_indexstring4_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.si_indexstring4_label.Name = "si_indexstring4_label";
             this.si_indexstring4_label.Size = new System.Drawing.Size(92, 27);
@@ -564,7 +564,7 @@
             this.si_length4_label.AutoSize = true;
             this.si_length4_label.BackColor = System.Drawing.Color.Transparent;
             this.si_length4_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.si_length4_label.Location = new System.Drawing.Point(691, 254);
+            this.si_length4_label.Location = new System.Drawing.Point(691, 212);
             this.si_length4_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.si_length4_label.Name = "si_length4_label";
             this.si_length4_label.Size = new System.Drawing.Size(52, 27);
@@ -576,7 +576,7 @@
             this.si_index4_label.AutoSize = true;
             this.si_index4_label.BackColor = System.Drawing.Color.Transparent;
             this.si_index4_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.si_index4_label.Location = new System.Drawing.Point(27, 254);
+            this.si_index4_label.Location = new System.Drawing.Point(27, 212);
             this.si_index4_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.si_index4_label.Name = "si_index4_label";
             this.si_index4_label.Size = new System.Drawing.Size(92, 27);
@@ -588,7 +588,7 @@
             this.sg_separator_label.AutoSize = true;
             this.sg_separator_label.BackColor = System.Drawing.Color.Transparent;
             this.sg_separator_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.sg_separator_label.Location = new System.Drawing.Point(1103, 54);
+            this.sg_separator_label.Location = new System.Drawing.Point(1103, 34);
             this.sg_separator_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.sg_separator_label.Name = "sg_separator_label";
             this.sg_separator_label.Size = new System.Drawing.Size(72, 27);
@@ -600,7 +600,7 @@
             this.pb_name_label.AutoSize = true;
             this.pb_name_label.BackColor = System.Drawing.Color.Transparent;
             this.pb_name_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pb_name_label.Location = new System.Drawing.Point(777, 54);
+            this.pb_name_label.Location = new System.Drawing.Point(777, 34);
             this.pb_name_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.pb_name_label.Name = "pb_name_label";
             this.pb_name_label.Size = new System.Drawing.Size(52, 27);
@@ -612,8 +612,8 @@
             this.Add.BackColor = System.Drawing.Color.Transparent;
             this.Add.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.Add.Image = ((System.Drawing.Image)(resources.GetObject("Add.Image")));
-            this.Add.Location = new System.Drawing.Point(841, 133);
-            this.Add.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.Add.Location = new System.Drawing.Point(841, 91);
+            this.Add.Margin = new System.Windows.Forms.Padding(4);
             this.Add.Name = "Add";
             this.Add.Size = new System.Drawing.Size(100, 36);
             this.Add.TabIndex = 7;
@@ -625,8 +625,8 @@
             // 
             this.si_id1.Enabled = false;
             this.si_id1.ID = null;
-            this.si_id1.Location = new System.Drawing.Point(1219, 512);
-            this.si_id1.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.si_id1.Location = new System.Drawing.Point(1219, 470);
+            this.si_id1.Margin = new System.Windows.Forms.Padding(4);
             this.si_id1.Name = "si_id1";
             this.si_id1.Size = new System.Drawing.Size(208, 25);
             this.si_id1.Str = null;
@@ -639,8 +639,8 @@
             // 
             this.si_id2.Enabled = false;
             this.si_id2.ID = null;
-            this.si_id2.Location = new System.Drawing.Point(1219, 378);
-            this.si_id2.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.si_id2.Location = new System.Drawing.Point(1219, 336);
+            this.si_id2.Margin = new System.Windows.Forms.Padding(4);
             this.si_id2.Name = "si_id2";
             this.si_id2.Size = new System.Drawing.Size(208, 25);
             this.si_id2.Str = null;
@@ -653,8 +653,8 @@
             // 
             this.si_id3.Enabled = false;
             this.si_id3.ID = null;
-            this.si_id3.Location = new System.Drawing.Point(1219, 649);
-            this.si_id3.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.si_id3.Location = new System.Drawing.Point(1219, 607);
+            this.si_id3.Margin = new System.Windows.Forms.Padding(4);
             this.si_id3.Name = "si_id3";
             this.si_id3.Size = new System.Drawing.Size(208, 25);
             this.si_id3.Str = null;
@@ -667,8 +667,8 @@
             // 
             this.si_id4.Enabled = false;
             this.si_id4.ID = null;
-            this.si_id4.Location = new System.Drawing.Point(1219, 259);
-            this.si_id4.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.si_id4.Location = new System.Drawing.Point(1219, 217);
+            this.si_id4.Margin = new System.Windows.Forms.Padding(4);
             this.si_id4.Name = "si_id4";
             this.si_id4.Size = new System.Drawing.Size(208, 25);
             this.si_id4.Str = null;
@@ -680,8 +680,8 @@
             // sg_id
             // 
             this.sg_id.ID = null;
-            this.sg_id.Location = new System.Drawing.Point(1188, 111);
-            this.sg_id.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.sg_id.Location = new System.Drawing.Point(1188, 91);
+            this.sg_id.Margin = new System.Windows.Forms.Padding(4);
             this.sg_id.Name = "sg_id";
             this.sg_id.Size = new System.Drawing.Size(239, 25);
             this.sg_id.Str = null;
@@ -695,8 +695,8 @@
             this.pb_name.Caller = null;
             this.pb_name.Condition = null;
             this.pb_name.FormName = null;
-            this.pb_name.Location = new System.Drawing.Point(841, 54);
-            this.pb_name.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.pb_name.Location = new System.Drawing.Point(841, 34);
+            this.pb_name.Margin = new System.Windows.Forms.Padding(4);
             this.pb_name.Name = "pb_name";
             this.pb_name.SelectField = null;
             this.pb_name.SetValueField = null;
@@ -707,8 +707,8 @@
             // sg_separator
             // 
             this.sg_separator.ID = null;
-            this.sg_separator.Location = new System.Drawing.Point(1188, 54);
-            this.sg_separator.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.sg_separator.Location = new System.Drawing.Point(1188, 34);
+            this.sg_separator.Margin = new System.Windows.Forms.Padding(4);
             this.sg_separator.Name = "sg_separator";
             this.sg_separator.Size = new System.Drawing.Size(239, 25);
             this.sg_separator.Str = null;
@@ -720,8 +720,8 @@
             // 
             this.si_indexstring4.Enabled = false;
             this.si_indexstring4.ID = null;
-            this.si_indexstring4.Location = new System.Drawing.Point(473, 254);
-            this.si_indexstring4.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.si_indexstring4.Location = new System.Drawing.Point(473, 212);
+            this.si_indexstring4.Margin = new System.Windows.Forms.Padding(4);
             this.si_indexstring4.Name = "si_indexstring4";
             this.si_indexstring4.Size = new System.Drawing.Size(208, 25);
             this.si_indexstring4.Str = null;
@@ -732,8 +732,8 @@
             // si_length4
             // 
             this.si_length4.Enabled = false;
-            this.si_length4.Location = new System.Drawing.Point(821, 254);
-            this.si_length4.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.si_length4.Location = new System.Drawing.Point(821, 212);
+            this.si_length4.Margin = new System.Windows.Forms.Padding(4);
             this.si_length4.Name = "si_length4";
             this.si_length4.Negative = false;
             this.si_length4.Size = new System.Drawing.Size(208, 25);
@@ -742,8 +742,8 @@
             // si_index4
             // 
             this.si_index4.Enabled = false;
-            this.si_index4.Location = new System.Drawing.Point(133, 254);
-            this.si_index4.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.si_index4.Location = new System.Drawing.Point(133, 212);
+            this.si_index4.Margin = new System.Windows.Forms.Padding(4);
             this.si_index4.Name = "si_index4";
             this.si_index4.Negative = false;
             this.si_index4.Size = new System.Drawing.Size(208, 25);
@@ -753,8 +753,8 @@
             // 
             this.si_indexstring3.Enabled = false;
             this.si_indexstring3.ID = null;
-            this.si_indexstring3.Location = new System.Drawing.Point(473, 649);
-            this.si_indexstring3.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.si_indexstring3.Location = new System.Drawing.Point(473, 607);
+            this.si_indexstring3.Margin = new System.Windows.Forms.Padding(4);
             this.si_indexstring3.Name = "si_indexstring3";
             this.si_indexstring3.Size = new System.Drawing.Size(208, 25);
             this.si_indexstring3.Str = null;
@@ -765,8 +765,8 @@
             // si_length3
             // 
             this.si_length3.Enabled = false;
-            this.si_length3.Location = new System.Drawing.Point(821, 649);
-            this.si_length3.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.si_length3.Location = new System.Drawing.Point(821, 607);
+            this.si_length3.Margin = new System.Windows.Forms.Padding(4);
             this.si_length3.Name = "si_length3";
             this.si_length3.Negative = false;
             this.si_length3.Size = new System.Drawing.Size(208, 25);
@@ -775,8 +775,8 @@
             // si_index3
             // 
             this.si_index3.Enabled = false;
-            this.si_index3.Location = new System.Drawing.Point(133, 649);
-            this.si_index3.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.si_index3.Location = new System.Drawing.Point(133, 607);
+            this.si_index3.Margin = new System.Windows.Forms.Padding(4);
             this.si_index3.Name = "si_index3";
             this.si_index3.Negative = false;
             this.si_index3.Size = new System.Drawing.Size(208, 25);
@@ -786,8 +786,8 @@
             // 
             this.si_indexstring2.Enabled = false;
             this.si_indexstring2.ID = null;
-            this.si_indexstring2.Location = new System.Drawing.Point(473, 372);
-            this.si_indexstring2.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.si_indexstring2.Location = new System.Drawing.Point(473, 330);
+            this.si_indexstring2.Margin = new System.Windows.Forms.Padding(4);
             this.si_indexstring2.Name = "si_indexstring2";
             this.si_indexstring2.Size = new System.Drawing.Size(208, 25);
             this.si_indexstring2.Str = null;
@@ -798,8 +798,8 @@
             // si_length2
             // 
             this.si_length2.Enabled = false;
-            this.si_length2.Location = new System.Drawing.Point(821, 372);
-            this.si_length2.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.si_length2.Location = new System.Drawing.Point(821, 330);
+            this.si_length2.Margin = new System.Windows.Forms.Padding(4);
             this.si_length2.Name = "si_length2";
             this.si_length2.Negative = false;
             this.si_length2.Size = new System.Drawing.Size(208, 25);
@@ -808,8 +808,8 @@
             // si_index2
             // 
             this.si_index2.Enabled = false;
-            this.si_index2.Location = new System.Drawing.Point(133, 372);
-            this.si_index2.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.si_index2.Location = new System.Drawing.Point(133, 330);
+            this.si_index2.Margin = new System.Windows.Forms.Padding(4);
             this.si_index2.Name = "si_index2";
             this.si_index2.Negative = false;
             this.si_index2.Size = new System.Drawing.Size(208, 25);
@@ -819,8 +819,8 @@
             // 
             this.si_indexstring1.Enabled = false;
             this.si_indexstring1.ID = null;
-            this.si_indexstring1.Location = new System.Drawing.Point(473, 508);
-            this.si_indexstring1.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.si_indexstring1.Location = new System.Drawing.Point(473, 466);
+            this.si_indexstring1.Margin = new System.Windows.Forms.Padding(4);
             this.si_indexstring1.Name = "si_indexstring1";
             this.si_indexstring1.Size = new System.Drawing.Size(208, 25);
             this.si_indexstring1.Str = null;
@@ -831,8 +831,8 @@
             // si_index1
             // 
             this.si_index1.Enabled = false;
-            this.si_index1.Location = new System.Drawing.Point(133, 508);
-            this.si_index1.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.si_index1.Location = new System.Drawing.Point(133, 466);
+            this.si_index1.Margin = new System.Windows.Forms.Padding(4);
             this.si_index1.Name = "si_index1";
             this.si_index1.Negative = false;
             this.si_index1.Size = new System.Drawing.Size(208, 25);
@@ -842,8 +842,8 @@
             // 
             this.si_item4.Enabled = false;
             this.si_item4.ID = null;
-            this.si_item4.Location = new System.Drawing.Point(1219, 206);
-            this.si_item4.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.si_item4.Location = new System.Drawing.Point(1219, 164);
+            this.si_item4.Margin = new System.Windows.Forms.Padding(4);
             this.si_item4.Name = "si_item4";
             this.si_item4.Size = new System.Drawing.Size(208, 25);
             this.si_item4.Str = null;
@@ -857,8 +857,8 @@
             // 
             this.si_detno4.Enabled = false;
             this.si_detno4.ID = null;
-            this.si_detno4.Location = new System.Drawing.Point(133, 210);
-            this.si_detno4.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.si_detno4.Location = new System.Drawing.Point(133, 168);
+            this.si_detno4.Margin = new System.Windows.Forms.Padding(4);
             this.si_detno4.Name = "si_detno4";
             this.si_detno4.Size = new System.Drawing.Size(208, 25);
             this.si_detno4.Str = null;
@@ -870,8 +870,8 @@
             // 
             this.si_expression4.Enabled = false;
             this.si_expression4.ID = null;
-            this.si_expression4.Location = new System.Drawing.Point(821, 210);
-            this.si_expression4.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.si_expression4.Location = new System.Drawing.Point(821, 168);
+            this.si_expression4.Margin = new System.Windows.Forms.Padding(4);
             this.si_expression4.Name = "si_expression4";
             this.si_expression4.Size = new System.Drawing.Size(208, 25);
             this.si_expression4.Str = null;
@@ -883,8 +883,8 @@
             // 
             this.si_item3.Enabled = false;
             this.si_item3.ID = null;
-            this.si_item3.Location = new System.Drawing.Point(1219, 600);
-            this.si_item3.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.si_item3.Location = new System.Drawing.Point(1219, 558);
+            this.si_item3.Margin = new System.Windows.Forms.Padding(4);
             this.si_item3.Name = "si_item3";
             this.si_item3.Size = new System.Drawing.Size(208, 25);
             this.si_item3.Str = null;
@@ -898,8 +898,8 @@
             // 
             this.si_detno3.Enabled = false;
             this.si_detno3.ID = null;
-            this.si_detno3.Location = new System.Drawing.Point(133, 604);
-            this.si_detno3.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.si_detno3.Location = new System.Drawing.Point(133, 562);
+            this.si_detno3.Margin = new System.Windows.Forms.Padding(4);
             this.si_detno3.Name = "si_detno3";
             this.si_detno3.Size = new System.Drawing.Size(208, 25);
             this.si_detno3.Str = null;
@@ -911,8 +911,8 @@
             // 
             this.si_expression3.Enabled = false;
             this.si_expression3.ID = null;
-            this.si_expression3.Location = new System.Drawing.Point(821, 604);
-            this.si_expression3.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.si_expression3.Location = new System.Drawing.Point(821, 562);
+            this.si_expression3.Margin = new System.Windows.Forms.Padding(4);
             this.si_expression3.Name = "si_expression3";
             this.si_expression3.Size = new System.Drawing.Size(208, 25);
             this.si_expression3.Str = null;
@@ -924,8 +924,8 @@
             // 
             this.si_item2.Enabled = false;
             this.si_item2.ID = null;
-            this.si_item2.Location = new System.Drawing.Point(1219, 330);
-            this.si_item2.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.si_item2.Location = new System.Drawing.Point(1219, 288);
+            this.si_item2.Margin = new System.Windows.Forms.Padding(4);
             this.si_item2.Name = "si_item2";
             this.si_item2.Size = new System.Drawing.Size(208, 25);
             this.si_item2.Str = null;
@@ -939,8 +939,8 @@
             // 
             this.si_detno2.Enabled = false;
             this.si_detno2.ID = null;
-            this.si_detno2.Location = new System.Drawing.Point(133, 334);
-            this.si_detno2.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.si_detno2.Location = new System.Drawing.Point(133, 292);
+            this.si_detno2.Margin = new System.Windows.Forms.Padding(4);
             this.si_detno2.Name = "si_detno2";
             this.si_detno2.Size = new System.Drawing.Size(208, 25);
             this.si_detno2.Str = null;
@@ -952,8 +952,8 @@
             // 
             this.si_expression2.Enabled = false;
             this.si_expression2.ID = null;
-            this.si_expression2.Location = new System.Drawing.Point(821, 334);
-            this.si_expression2.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.si_expression2.Location = new System.Drawing.Point(821, 292);
+            this.si_expression2.Margin = new System.Windows.Forms.Padding(4);
             this.si_expression2.Name = "si_expression2";
             this.si_expression2.Size = new System.Drawing.Size(208, 25);
             this.si_expression2.Str = null;
@@ -965,8 +965,8 @@
             // 
             this.si_item1.Enabled = false;
             this.si_item1.ID = null;
-            this.si_item1.Location = new System.Drawing.Point(1219, 461);
-            this.si_item1.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.si_item1.Location = new System.Drawing.Point(1219, 419);
+            this.si_item1.Margin = new System.Windows.Forms.Padding(4);
             this.si_item1.Name = "si_item1";
             this.si_item1.Size = new System.Drawing.Size(208, 25);
             this.si_item1.Str = null;
@@ -980,8 +980,8 @@
             // 
             this.si_detno1.Enabled = false;
             this.si_detno1.ID = null;
-            this.si_detno1.Location = new System.Drawing.Point(133, 465);
-            this.si_detno1.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.si_detno1.Location = new System.Drawing.Point(133, 423);
+            this.si_detno1.Margin = new System.Windows.Forms.Padding(4);
             this.si_detno1.Name = "si_detno1";
             this.si_detno1.Size = new System.Drawing.Size(208, 25);
             this.si_detno1.Str = null;
@@ -993,8 +993,8 @@
             // 
             this.si_expression1.Enabled = false;
             this.si_expression1.ID = null;
-            this.si_expression1.Location = new System.Drawing.Point(821, 465);
-            this.si_expression1.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.si_expression1.Location = new System.Drawing.Point(821, 423);
+            this.si_expression1.Margin = new System.Windows.Forms.Padding(4);
             this.si_expression1.Name = "si_expression1";
             this.si_expression1.Size = new System.Drawing.Size(208, 25);
             this.si_expression1.Str = null;
@@ -1007,8 +1007,8 @@
             this.Delete.BackColor = System.Drawing.Color.Transparent;
             this.Delete.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.Delete.Image = ((System.Drawing.Image)(resources.GetObject("Delete.Image")));
-            this.Delete.Location = new System.Drawing.Point(712, 133);
-            this.Delete.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.Delete.Location = new System.Drawing.Point(712, 91);
+            this.Delete.Margin = new System.Windows.Forms.Padding(4);
             this.Delete.Name = "Delete";
             this.Delete.Size = new System.Drawing.Size(100, 36);
             this.Delete.TabIndex = 6;
@@ -1021,8 +1021,8 @@
             this.Save.BackColor = System.Drawing.Color.Transparent;
             this.Save.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.Save.Image = ((System.Drawing.Image)(resources.GetObject("Save.Image")));
-            this.Save.Location = new System.Drawing.Point(581, 133);
-            this.Save.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.Save.Location = new System.Drawing.Point(581, 91);
+            this.Save.Margin = new System.Windows.Forms.Padding(4);
             this.Save.Name = "Save";
             this.Save.Size = new System.Drawing.Size(100, 36);
             this.Save.TabIndex = 5;
@@ -1033,8 +1033,8 @@
             // sg_name
             // 
             this.sg_name.ID = null;
-            this.sg_name.Location = new System.Drawing.Point(505, 54);
-            this.sg_name.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.sg_name.Location = new System.Drawing.Point(505, 34);
+            this.sg_name.Margin = new System.Windows.Forms.Padding(4);
             this.sg_name.Name = "sg_name";
             this.sg_name.Size = new System.Drawing.Size(239, 25);
             this.sg_name.Str = null;
@@ -1045,8 +1045,8 @@
             // sg_code
             // 
             this.sg_code.ID = null;
-            this.sg_code.Location = new System.Drawing.Point(133, 54);
-            this.sg_code.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.sg_code.Location = new System.Drawing.Point(133, 34);
+            this.sg_code.Margin = new System.Windows.Forms.Padding(4);
             this.sg_code.Name = "sg_code";
             this.sg_code.Size = new System.Drawing.Size(239, 25);
             this.sg_code.Str = null;
@@ -1058,8 +1058,8 @@
             // si_length1
             // 
             this.si_length1.Enabled = false;
-            this.si_length1.Location = new System.Drawing.Point(821, 508);
-            this.si_length1.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.si_length1.Location = new System.Drawing.Point(821, 466);
+            this.si_length1.Margin = new System.Windows.Forms.Padding(4);
             this.si_length1.Name = "si_length1";
             this.si_length1.Negative = false;
             this.si_length1.Size = new System.Drawing.Size(208, 25);
@@ -1069,7 +1069,7 @@
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-            this.ClientSize = new System.Drawing.Size(1442, 714);
+            this.ClientSize = new System.Drawing.Size(1442, 673);
             this.Controls.Add(this.Add);
             this.Controls.Add(this.si_id1);
             this.Controls.Add(this.si_id2);
@@ -1146,7 +1146,7 @@
             this.Controls.Add(this.sg_code);
             this.Controls.Add(this.sg_code_label);
             this.Controls.Add(this.sg_name_label);
-            this.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.Margin = new System.Windows.Forms.Padding(4);
             this.Name = "采集策略";
             this.Text = "采集策略";
             this.Load += new System.EventHandler(this.采集策略_Load);

+ 2 - 2
UAS-出货标签管理/采集策略.cs

@@ -53,6 +53,7 @@ namespace UAS_LabelMachine
                 KeyEventArgs e2 = new KeyEventArgs(Keys.Enter);
                 sg_code_KeyDown(sender, e2);
             }
+            Width = Width + 1;
         }
 
         private void 采集策略_SizeChanged(object sender, EventArgs e)
@@ -84,7 +85,7 @@ namespace UAS_LabelMachine
                             Enable = 1;
                         }
                         sql.Clear();
-                        sql.Append("update scanitem set si_item='" + Controls["si_item" + i].Text + "',si_detno='" + Controls["si_detno" + i].Text + "',");
+                        sql.Append("update   set si_item='" + Controls["si_item" + i].Text + "',si_detno='" + Controls["si_detno" + i].Text + "',");
                         sql.Append("si_index='" + Controls["si_index" + i].Text + "',si_indexstring='" + Controls["si_indexstring" + i].Text + "',");
                         sql.Append("si_kind='" + Controls["si_kind" + i].Text + "', si_length='" + Controls["si_length" + i].Text + "',");
                         sql.Append("si_expression=:si_expression,si_enable=" + Enable + " where si_id=" + Controls["si_id" + i].Text);
@@ -207,7 +208,6 @@ namespace UAS_LabelMachine
                             //如果Item和CheckBox的文字相等
                             if (dt.Rows[i]["si_item"].ToString() == Controls["si_type" + j].Text)
                             {
-                                Console.WriteLine(dt.Rows[i]["si_item"].ToString());
                                 //如果状态不为0则表示启用
                                 if (dt.Rows[i]["si_enable"].ToString() != "0")
                                     (Controls["si_type" + j] as CheckBox).CheckState = CheckState.Checked;

Some files were not shown because too many files changed in this diff