Browse Source

泽天项目提交

章政 8 years ago
parent
commit
e45be882e6
100 changed files with 10924 additions and 0 deletions
  1. 64 0
      UAS-出货标签管理(泽天)/App.config
  2. 120 0
      UAS-出货标签管理(泽天)/BartenderPreview.Designer.cs
  3. 68 0
      UAS-出货标签管理(泽天)/BartenderPreview.cs
  4. 307 0
      UAS-出货标签管理(泽天)/BartenderPreview.resx
  5. 63 0
      UAS-出货标签管理(泽天)/CodeSoftPrintParam.Designer.cs
  6. 188 0
      UAS-出货标签管理(泽天)/CodeSoftPrintParam.cs
  7. 120 0
      UAS-出货标签管理(泽天)/CodeSoftPrintParam.resx
  8. 86 0
      UAS-出货标签管理(泽天)/CustomControl/BlurSearch.Designer.cs
  9. 244 0
      UAS-出货标签管理(泽天)/CustomControl/BlurSearch.cs
  10. 120 0
      UAS-出货标签管理(泽天)/CustomControl/BlurSearch.resx
  11. 36 0
      UAS-出货标签管理(泽天)/CustomControl/ChooseAllButton.Designer.cs
  12. 49 0
      UAS-出货标签管理(泽天)/CustomControl/ChooseAllButton.cs
  13. 47 0
      UAS-出货标签管理(泽天)/CustomControl/DataGridViewWithSerialNum.Designer.cs
  14. 37 0
      UAS-出货标签管理(泽天)/CustomControl/DataGridViewWithSerialNum.cs
  15. 123 0
      UAS-出货标签管理(泽天)/CustomControl/DataGridViewWithSerialNum.resx
  16. 44 0
      UAS-出货标签管理(泽天)/CustomControl/EnterTextBox.Designer.cs
  17. 92 0
      UAS-出货标签管理(泽天)/CustomControl/EnterTextBox.cs
  18. 123 0
      UAS-出货标签管理(泽天)/CustomControl/EnterTextBox.resx
  19. 37 0
      UAS-出货标签管理(泽天)/CustomControl/GroupBoxWithBorder.Designer.cs
  20. 26 0
      UAS-出货标签管理(泽天)/CustomControl/GroupBoxWithBorder.cs
  21. 73 0
      UAS-出货标签管理(泽天)/CustomControl/HeadBar.Designer.cs
  22. 68 0
      UAS-出货标签管理(泽天)/CustomControl/HeadBar.cs
  23. 192 0
      UAS-出货标签管理(泽天)/CustomControl/HeadBar.resx
  24. 127 0
      UAS-出货标签管理(泽天)/CustomControl/HeadBar.zu.resx
  25. 20 0
      UAS-出货标签管理(泽天)/CustomControl/LoadingCircle.Designer.cs
  26. 474 0
      UAS-出货标签管理(泽天)/CustomControl/LoadingCircle.cs
  27. 37 0
      UAS-出货标签管理(泽天)/CustomControl/NormalButton.Designer.cs
  28. 15 0
      UAS-出货标签管理(泽天)/CustomControl/NormalButton.cs
  29. 44 0
      UAS-出货标签管理(泽天)/CustomControl/NumOnlyTextBox.Designer.cs
  30. 48 0
      UAS-出货标签管理(泽天)/CustomControl/NumOnlyTextBox.cs
  31. 123 0
      UAS-出货标签管理(泽天)/CustomControl/NumOnlyTextBox.resx
  32. 269 0
      UAS-出货标签管理(泽天)/CustomControl/Pagination.Designer.cs
  33. 310 0
      UAS-出货标签管理(泽天)/CustomControl/Pagination.cs
  34. 129 0
      UAS-出货标签管理(泽天)/CustomControl/Pagination.resx
  35. 62 0
      UAS-出货标签管理(泽天)/CustomControl/PrinterCombox.Designer.cs
  36. 46 0
      UAS-出货标签管理(泽天)/CustomControl/PrinterCombox.cs
  37. 120 0
      UAS-出货标签管理(泽天)/CustomControl/PrinterCombox.resx
  38. 36 0
      UAS-出货标签管理(泽天)/CustomControl/RichTextAutoBottom.Designer.cs
  39. 35 0
      UAS-出货标签管理(泽天)/CustomControl/RichTextAutoBottom.cs
  40. 77 0
      UAS-出货标签管理(泽天)/CustomControl/SearchTextBox.Designer.cs
  41. 352 0
      UAS-出货标签管理(泽天)/CustomControl/SearchTextBox.cs
  42. 120 0
      UAS-出货标签管理(泽天)/CustomControl/SearchTextBox.resx
  43. 84 0
      UAS-出货标签管理(泽天)/DbFind.Designer.cs
  44. 202 0
      UAS-出货标签管理(泽天)/DbFind.cs
  45. 120 0
      UAS-出货标签管理(泽天)/DbFind.resx
  46. 12 0
      UAS-出货标签管理(泽天)/Entity/SystemInf.cs
  47. 46 0
      UAS-出货标签管理(泽天)/Entity/User.cs
  48. 209 0
      UAS-出货标签管理(泽天)/Login.Designer.cs
  49. 131 0
      UAS-出货标签管理(泽天)/Login.cs
  50. 123 0
      UAS-出货标签管理(泽天)/Login.resx
  51. 284 0
      UAS-出货标签管理(泽天)/PowerSetting.Designer.cs
  52. 77 0
      UAS-出货标签管理(泽天)/PowerSetting.cs
  53. 187 0
      UAS-出货标签管理(泽天)/PowerSetting.resx
  54. 94 0
      UAS-出货标签管理(泽天)/Program.cs
  55. 36 0
      UAS-出货标签管理(泽天)/Properties/AssemblyInfo.cs
  56. 273 0
      UAS-出货标签管理(泽天)/Properties/Resources.Designer.cs
  57. 184 0
      UAS-出货标签管理(泽天)/Properties/Resources.resx
  58. 27 0
      UAS-出货标签管理(泽天)/Properties/Settings.settings
  59. 110 0
      UAS-出货标签管理(泽天)/Properties/Settings1.Designer.cs
  60. 69 0
      UAS-出货标签管理(泽天)/Properties/app.manifest
  61. 8 0
      UAS-出货标签管理(泽天)/PublicMethod/ArrayList.cs
  62. 118 0
      UAS-出货标签管理(泽天)/PublicMethod/AutoSizeFormClass.cs
  63. 771 0
      UAS-出货标签管理(泽天)/PublicMethod/BaseUtil.cs
  64. 1202 0
      UAS-出货标签管理(泽天)/PublicMethod/DataHelper.cs
  65. 124 0
      UAS-出货标签管理(泽天)/PublicMethod/ExcelHandler.cs
  66. 110 0
      UAS-出货标签管理(泽天)/PublicMethod/GlobalEventsHandler.cs
  67. 86 0
      UAS-出货标签管理(泽天)/PublicMethod/HttpHandler.cs
  68. 15 0
      UAS-出货标签管理(泽天)/PublicMethod/LogManager.cs
  69. 178 0
      UAS-出货标签管理(泽天)/PublicMethod/ftpOperater.cs
  70. BIN
      UAS-出货标签管理(泽天)/Resources/1 (4).gif
  71. BIN
      UAS-出货标签管理(泽天)/Resources/46.gif
  72. BIN
      UAS-出货标签管理(泽天)/Resources/Excel_2010_16px_1180011_easyicon.net.png
  73. BIN
      UAS-出货标签管理(泽天)/Resources/Login_Icon.gif
  74. BIN
      UAS-出货标签管理(泽天)/Resources/bindingNavigatorAddNewItem.Image.png
  75. BIN
      UAS-出货标签管理(泽天)/Resources/bindingNavigatorDeleteItem.Image.png
  76. BIN
      UAS-出货标签管理(泽天)/Resources/bindingNavigatorMoveFirstItem.Image.png
  77. BIN
      UAS-出货标签管理(泽天)/Resources/bindingNavigatorMoveLastItem.Image.png
  78. BIN
      UAS-出货标签管理(泽天)/Resources/bindingNavigatorMoveNextItem.Image.png
  79. BIN
      UAS-出货标签管理(泽天)/Resources/bindingNavigatorMovePreviousItem.Image.png
  80. BIN
      UAS-出货标签管理(泽天)/Resources/close_32px_1181428_easyicon.net.png
  81. BIN
      UAS-出货标签管理(泽天)/Resources/close_up_32px_1181430_easyicon.net.png
  82. BIN
      UAS-出货标签管理(泽天)/Resources/delete_128px_1151377_easyicon.net.ico
  83. BIN
      UAS-出货标签管理(泽天)/Resources/download_17.519713261649px_1200629_easyicon.net (1).png
  84. BIN
      UAS-出货标签管理(泽天)/Resources/matte_white_square_icon_business_tool_hammer_96px_571061_easyicon.net.ico
  85. BIN
      UAS-出货标签管理(泽天)/Resources/preview_16px_25980_easyicon.net.png
  86. BIN
      UAS-出货标签管理(泽天)/Resources/print_128px_1082624_easyicon.net.ico
  87. BIN
      UAS-出货标签管理(泽天)/Resources/search_16px_1202802_easyicon.net.png
  88. BIN
      UAS-出货标签管理(泽天)/Resources/timg.jpg
  89. BIN
      UAS-出货标签管理(泽天)/Resources/upload_17.459649122807px_1200703_easyicon.net (1).png
  90. BIN
      UAS-出货标签管理(泽天)/Resources/users.png
  91. BIN
      UAS-出货标签管理(泽天)/Resources/users_user_72px_523311_easyicon.net.png
  92. BIN
      UAS-出货标签管理(泽天)/Resources/write_15.893687707641px_1181413_easyicon.net.png
  93. 6 0
      UAS-出货标签管理(泽天)/Service References/Vivo_BoxReelRelation/ReelAPI.disco
  94. 527 0
      UAS-出货标签管理(泽天)/Service References/Vivo_BoxReelRelation/ReelAPI.wsdl
  95. 244 0
      UAS-出货标签管理(泽天)/Service References/Vivo_BoxReelRelation/Reference.cs
  96. 31 0
      UAS-出货标签管理(泽天)/Service References/Vivo_BoxReelRelation/Reference.svcmap
  97. 10 0
      UAS-出货标签管理(泽天)/Service References/Vivo_BoxReelRelation/UAS_LabelMachine.Vivo_BoxReelRelation.ReelEntity.datasource
  98. 12 0
      UAS-出货标签管理(泽天)/Service References/Vivo_BoxReelRelation/configuration.svcinfo
  99. 437 0
      UAS-出货标签管理(泽天)/Service References/Vivo_BoxReelRelation/configuration91.svcinfo
  100. 6 0
      UAS-出货标签管理(泽天)/Service References/Vivo_GetPlateID/ReelAPI.disco

+ 64 - 0
UAS-出货标签管理(泽天)/App.config

@@ -0,0 +1,64 @@
+<?xml version="1.0" encoding="utf-8"?>
+<configuration>
+  <configSections>
+    <sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+      <section name="UAS_LabelMachine.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
+      <section name="贴标机标签打印.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
+    </sectionGroup>
+  </configSections>
+  <startup useLegacyV2RuntimeActivationPolicy="true">
+    <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0" />
+    <supportedRuntime version="v2.0.50727" />
+  </startup>
+  <system.serviceModel>
+    <bindings>
+      <basicHttpBinding>
+        <binding name="Service1Soap" />
+        <binding name="Service1Soap1" />
+      </basicHttpBinding>
+      <customBinding>
+        <binding name="Service1Soap">
+          <textMessageEncoding messageVersion="Soap12" />
+          <httpTransport />
+        </binding>
+        <binding name="Service1Soap12">
+          <textMessageEncoding messageVersion="Soap12" />
+          <httpTransport />
+        </binding>
+      </customBinding>
+    </bindings>
+    <client>
+      <endpoint address="http://middle.mes.vivo.xyz:7007/ReelAPI.asmx"
+        binding="basicHttpBinding" bindingConfiguration="Service1Soap"
+        contract="Vivo_GetPlateID.Service1Soap" name="Service1Soap" />
+      <endpoint address="http://middle.mes.vivo.xyz:7007/ReelAPI.asmx"
+        binding="basicHttpBinding" bindingConfiguration="Service1Soap1"
+        contract="Vivo_BoxReelRelation.Service1Soap" name="Service1Soap1" />
+    </client>
+  </system.serviceModel>
+  <userSettings>
+    <UAS_LabelMachine.Properties.Settings>
+      <setting name="ShareUrl" serializeAs="String">
+        <value />
+      </setting>
+      <setting name="LastLoginMaster" serializeAs="String">
+        <value />
+      </setting>
+      <setting name="IPAddress" serializeAs="String">
+        <value />
+      </setting>
+      <setting name="LastLoginUser" serializeAs="String">
+        <value />
+      </setting>
+      <setting name="FTPAddress" serializeAs="String">
+        <value>ftp://218.18.115.198:21|Print|Administrator1@#</value>
+      </setting>
+      <setting name="MidBoxCapacity" serializeAs="String">
+        <value>0</value>
+      </setting>
+      <setting name="OutboxCapacity" serializeAs="String">
+        <value>0</value>
+      </setting>
+    </UAS_LabelMachine.Properties.Settings>
+  </userSettings>
+</configuration>

+ 120 - 0
UAS-出货标签管理(泽天)/BartenderPreview.Designer.cs

@@ -0,0 +1,120 @@
+namespace UAS_LabelMachine
+{
+    partial class BartenderPreview
+    {
+        /// <summary>
+        /// Required designer variable.
+        /// </summary>
+        private System.ComponentModel.IContainer components = null;
+
+        /// <summary>
+        /// Clean up any resources being used.
+        /// </summary>
+        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+        protected override void Dispose(bool disposing)
+        {
+            if (disposing && (components != null))
+            {
+                components.Dispose();
+            }
+            base.Dispose(disposing);
+        }
+
+        #region Windows Form Designer generated code
+
+        /// <summary>
+        /// Required method for Designer support - do not modify
+        /// the contents of this method with the code editor.
+        /// </summary>
+        private void InitializeComponent()
+        {
+            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(BartenderPreview));
+            this.SQL = new System.Windows.Forms.RichTextBox();
+            this.label1 = new System.Windows.Forms.Label();
+            this.Cancel = new UAS_LabelMachine.CustomControl.NormalButton();
+            this.Save = new UAS_LabelMachine.CustomControl.NormalButton();
+            this.LabelPreViewPic = new System.Windows.Forms.PictureBox();
+            ((System.ComponentModel.ISupportInitialize)(this.LabelPreViewPic)).BeginInit();
+            this.SuspendLayout();
+            // 
+            // SQL
+            // 
+            this.SQL.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.SQL.Location = new System.Drawing.Point(27, 35);
+            this.SQL.Name = "SQL";
+            this.SQL.Size = new System.Drawing.Size(434, 96);
+            this.SQL.TabIndex = 1;
+            this.SQL.Text = "";
+            // 
+            // label1
+            // 
+            this.label1.AutoSize = true;
+            this.label1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label1.Location = new System.Drawing.Point(24, 11);
+            this.label1.Name = "label1";
+            this.label1.Size = new System.Drawing.Size(72, 21);
+            this.label1.TabIndex = 2;
+            this.label1.Text = "SQL语句";
+            // 
+            // Cancel
+            // 
+            this.Cancel.Image = ((System.Drawing.Image)(resources.GetObject("Cancel.Image")));
+            this.Cancel.Location = new System.Drawing.Point(261, 527);
+            this.Cancel.Name = "Cancel";
+            this.Cancel.Size = new System.Drawing.Size(75, 30);
+            this.Cancel.TabIndex = 4;
+            this.Cancel.Text = "取消";
+            this.Cancel.UseVisualStyleBackColor = true;
+            this.Cancel.Click += new System.EventHandler(this.Cancel_Click);
+            // 
+            // Save
+            // 
+            this.Save.Image = ((System.Drawing.Image)(resources.GetObject("Save.Image")));
+            this.Save.Location = new System.Drawing.Point(151, 527);
+            this.Save.Name = "Save";
+            this.Save.Size = new System.Drawing.Size(75, 30);
+            this.Save.TabIndex = 3;
+            this.Save.Tag = "";
+            this.Save.Text = "保存";
+            this.Save.UseVisualStyleBackColor = true;
+            this.Save.Click += new System.EventHandler(this.Save_Click);
+            // 
+            // LabelPreViewPic
+            // 
+            this.LabelPreViewPic.BackColor = System.Drawing.SystemColors.ControlDarkDark;
+            this.LabelPreViewPic.Location = new System.Drawing.Point(27, 148);
+            this.LabelPreViewPic.Name = "LabelPreViewPic";
+            this.LabelPreViewPic.Size = new System.Drawing.Size(434, 347);
+            this.LabelPreViewPic.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage;
+            this.LabelPreViewPic.TabIndex = 0;
+            this.LabelPreViewPic.TabStop = false;
+            // 
+            // BartenderPreview
+            // 
+            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+            this.ClientSize = new System.Drawing.Size(489, 576);
+            this.Controls.Add(this.Cancel);
+            this.Controls.Add(this.Save);
+            this.Controls.Add(this.label1);
+            this.Controls.Add(this.SQL);
+            this.Controls.Add(this.LabelPreViewPic);
+            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
+            this.Name = "BartenderPreview";
+            this.Tag = "Make!LabelPreview";
+            this.Text = "标签预览";
+            this.Load += new System.EventHandler(this.标签预览_Load);
+            ((System.ComponentModel.ISupportInitialize)(this.LabelPreViewPic)).EndInit();
+            this.ResumeLayout(false);
+            this.PerformLayout();
+        }
+
+        #endregion
+
+        private System.Windows.Forms.PictureBox LabelPreViewPic;
+        private System.Windows.Forms.RichTextBox SQL;
+        private System.Windows.Forms.Label label1;
+        private CustomControl.NormalButton Save;
+        private CustomControl.NormalButton Cancel;
+    }
+}

+ 68 - 0
UAS-出货标签管理(泽天)/BartenderPreview.cs

@@ -0,0 +1,68 @@
+using System;
+using System.Data;
+using System.Drawing;
+using System.Runtime.InteropServices;
+using System.Windows.Forms;
+
+namespace UAS_LabelMachine
+{
+    public partial class BartenderPreview : Form
+    {
+
+        [DllImport("user32.dll")]
+        public static extern bool ReleaseCapture();
+        [DllImport("user32.dll")]
+        public static extern bool SendMessage(IntPtr hwnd, int wMsg, int wParam, int lParam);
+        public const int WM_SYSCOMMAND = 0x0112;
+        public const int SC_MOVE = 0xF010;
+        public const int HTCAPTION = 0x0002;
+
+        DataHelper dh;
+
+        string pl_id;
+
+
+        public BartenderPreview()
+        {
+            InitializeComponent();
+        }
+
+        public BartenderPreview(string ID, Image image)
+        {
+            InitializeComponent();
+            LabelPreViewPic.Image = image;
+            pl_id = ID;
+        }
+
+        private void 标签预览_Load(object sender, EventArgs e)
+        {
+            dh = new DataHelper();
+            //dt = (DataTable)dh.getFieldsDataByCondition("productlabel left join LABEL on la_code = pl_labelcode left join labelparameter on lp_laid = la_id", new string[] { "la_sql", "la_id", "pl_labelcode" }, "pl_id='" + pl_id + "'");
+            //SQL.Text = dt.Rows[0]["la_sql"].ToString();
+        }
+
+        private void headBar1_MouseDown(object sender, MouseEventArgs e)
+        {
+            ReleaseCapture();
+            SendMessage(this.Handle, WM_SYSCOMMAND, SC_MOVE + HTCAPTION, 0);
+        }
+
+        //存在Label则直接更新,不存在的插入一条记录
+        private void Save_Click(object sender, EventArgs e)
+        {
+            //if (dt.Rows[0]["la_id"].ToString() == "")
+            //{
+            //    dh.ExecuteSql("insert into label(la_id,la_inman,la_indate,la_sql,la_code) values (label_seq.nextval,'',sysdate,:sql,:la_code) ", "insert", SQL.Text, dt.Rows[0]["pl_labelcode"].ToString());
+            //}
+            //else {
+            //    dh.ExecuteSql("update label set la_sql=:sql where la_id=" + dt.Rows[0]["la_id"].ToString(), "update", SQL.Text);
+            //}
+            MessageBox.Show("保存成功");
+        }
+
+        private void Cancel_Click(object sender, EventArgs e)
+        {
+            this.Close();
+        }
+    }
+}

+ 307 - 0
UAS-出货标签管理(泽天)/BartenderPreview.resx

@@ -0,0 +1,307 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
+  <data name="Cancel.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAAQAAAAEACAYAAABccqhmAAAABGdBTUEAALGOfPtRkwAAACBjSFJNAACH
+        DwAAjA8AAP1SAACBQAAAfXkAAOmLAAA85QAAGcxzPIV3AAAKOWlDQ1BQaG90b3Nob3AgSUNDIHByb2Zp
+        bGUAAEjHnZZ3VFTXFofPvXd6oc0w0hl6ky4wgPQuIB0EURhmBhjKAMMMTWyIqEBEEREBRZCggAGjoUis
+        iGIhKKhgD0gQUGIwiqioZEbWSnx5ee/l5ffHvd/aZ+9z99l7n7UuACRPHy4vBZYCIJkn4Ad6ONNXhUfQ
+        sf0ABniAAaYAMFnpqb5B7sFAJC83F3q6yAn8i94MAUj8vmXo6U+ng/9P0qxUvgAAyF/E5mxOOkvE+SJO
+        yhSkiu0zIqbGJIoZRomZL0pQxHJijlvkpZ99FtlRzOxkHlvE4pxT2clsMfeIeHuGkCNixEfEBRlcTqaI
+        b4tYM0mYzBXxW3FsMoeZDgCKJLYLOKx4EZuImMQPDnQR8XIAcKS4LzjmCxZwsgTiQ7mkpGbzuXHxArou
+        S49uam3NoHtyMpM4AoGhP5OVyOSz6S4pyalMXjYAi2f+LBlxbemiIluaWltaGpoZmX5RqP+6+Dcl7u0i
+        vQr43DOI1veH7a/8UuoAYMyKarPrD1vMfgA6tgIgd/8Pm+YhACRFfWu/8cV5aOJ5iRcIUm2MjTMzM424
+        HJaRuKC/6386/A198T0j8Xa/l4fuyollCpMEdHHdWClJKUI+PT2VyeLQDf88xP848K/zWBrIieXwOTxR
+        RKhoyri8OFG7eWyugJvCo3N5/6mJ/zDsT1qca5Eo9Z8ANcoISN2gAuTnPoCiEAESeVDc9d/75oMPBeKb
+        F6Y6sTj3nwX9+65wifiRzo37HOcSGExnCfkZi2viawnQgAAkARXIAxWgAXSBITADVsAWOAI3sAL4gWAQ
+        DtYCFogHyYAPMkEu2AwKQBHYBfaCSlAD6kEjaAEnQAc4DS6Ay+A6uAnugAdgBIyD52AGvAHzEARhITJE
+        geQhVUgLMoDMIAZkD7lBPlAgFA5FQ3EQDxJCudAWqAgqhSqhWqgR+hY6BV2ArkID0D1oFJqCfoXewwhM
+        gqmwMqwNG8MM2An2hoPhNXAcnAbnwPnwTrgCroOPwe3wBfg6fAcegZ/DswhAiAgNUUMMEQbigvghEUgs
+        wkc2IIVIOVKHtCBdSC9yCxlBppF3KAyKgqKjDFG2KE9UCIqFSkNtQBWjKlFHUe2oHtQt1ChqBvUJTUYr
+        oQ3QNmgv9Cp0HDoTXYAuRzeg29CX0HfQ4+g3GAyGhtHBWGE8MeGYBMw6TDHmAKYVcx4zgBnDzGKxWHms
+        AdYO64dlYgXYAux+7DHsOewgdhz7FkfEqeLMcO64CBwPl4crxzXhzuIGcRO4ebwUXgtvg/fDs/HZ+BJ8
+        Pb4LfwM/jp8nSBN0CHaEYEICYTOhgtBCuER4SHhFJBLVidbEACKXuIlYQTxOvEIcJb4jyZD0SS6kSJKQ
+        tJN0hHSedI/0ikwma5MdyRFkAXknuZF8kfyY/FaCImEk4SXBltgoUSXRLjEo8UISL6kl6SS5VjJHslzy
+        pOQNyWkpvJS2lIsUU2qDVJXUKalhqVlpirSptJ90snSxdJP0VelJGayMtoybDFsmX+awzEWZMQpC0aC4
+        UFiULZR6yiXKOBVD1aF6UROoRdRvqP3UGVkZ2WWyobJZslWyZ2RHaAhNm+ZFS6KV0E7QhmjvlygvcVrC
+        WbJjScuSwSVzcopyjnIcuUK5Vrk7cu/l6fJu8onyu+U75B8poBT0FQIUMhUOKlxSmFakKtoqshQLFU8o
+        3leClfSVApXWKR1W6lOaVVZR9lBOVd6vfFF5WoWm4qiSoFKmclZlSpWiaq/KVS1TPaf6jC5Ld6In0Svo
+        PfQZNSU1TzWhWq1av9q8uo56iHqeeqv6Iw2CBkMjVqNMo1tjRlNV01czV7NZ874WXouhFa+1T6tXa05b
+        RztMe5t2h/akjpyOl06OTrPOQ12yroNumm6d7m09jB5DL1HvgN5NfVjfQj9ev0r/hgFsYGnANThgMLAU
+        vdR6KW9p3dJhQ5Khk2GGYbPhqBHNyMcoz6jD6IWxpnGE8W7jXuNPJhYmSSb1Jg9MZUxXmOaZdpn+aqZv
+        xjKrMrttTjZ3N99o3mn+cpnBMs6yg8vuWlAsfC22WXRbfLS0suRbtlhOWWlaRVtVWw0zqAx/RjHjijXa
+        2tl6o/Vp63c2ljYCmxM2v9ga2ibaNtlOLtdZzllev3zMTt2OaVdrN2JPt4+2P2Q/4qDmwHSoc3jiqOHI
+        dmxwnHDSc0pwOub0wtnEme/c5jznYuOy3uW8K+Lq4Vro2u8m4xbiVun22F3dPc692X3Gw8Jjncd5T7Sn
+        t+duz2EvZS+WV6PXzAqrFetX9HiTvIO8K72f+Oj78H26fGHfFb57fB+u1FrJW9nhB/y8/Pb4PfLX8U/z
+        /z4AE+AfUBXwNNA0MDewN4gSFBXUFPQm2Dm4JPhBiG6IMKQ7VDI0MrQxdC7MNaw0bGSV8ar1q66HK4Rz
+        wzsjsBGhEQ0Rs6vdVu9dPR5pEVkQObRGZ03WmqtrFdYmrT0TJRnFjDoZjY4Oi26K/sD0Y9YxZ2O8Yqpj
+        ZlgurH2s52xHdhl7imPHKeVMxNrFlsZOxtnF7YmbineIL4+f5rpwK7kvEzwTahLmEv0SjyQuJIUltSbj
+        kqOTT/FkeIm8nhSVlKyUgVSD1ILUkTSbtL1pM3xvfkM6lL4mvVNAFf1M9Ql1hVuFoxn2GVUZbzNDM09m
+        SWfxsvqy9bN3ZE/kuOd8vQ61jrWuO1ctd3Pu6Hqn9bUboA0xG7o3amzM3zi+yWPT0c2EzYmbf8gzySvN
+        e70lbEtXvnL+pvyxrR5bmwskCvgFw9tst9VsR23nbu/fYb5j/45PhezCa0UmReVFH4pZxde+Mv2q4quF
+        nbE7+0ssSw7uwuzi7Rra7bD7aKl0aU7p2B7fPe1l9LLCstd7o/ZeLV9WXrOPsE+4b6TCp6Jzv+b+Xfs/
+        VMZX3qlyrmqtVqreUT13gH1g8KDjwZYa5ZqimveHuIfu1nrUttdp15UfxhzOOPy0PrS+92vG140NCg1F
+        DR+P8I6MHA082tNo1djYpNRU0gw3C5unjkUeu/mN6zedLYYtta201qLj4Ljw+LNvo78dOuF9ovsk42TL
+        d1rfVbdR2grbofbs9pmO+I6RzvDOgVMrTnV32Xa1fW/0/ZHTaqerzsieKTlLOJt/duFczrnZ86nnpy/E
+        XRjrjup+cHHVxds9AT39l7wvXbnsfvlir1PvuSt2V05ftbl66hrjWsd1y+vtfRZ9bT9Y/NDWb9nffsPq
+        RudN65tdA8sHzg46DF645Xrr8m2v29fvrLwzMBQydHc4cnjkLvvu5L2key/vZ9yff7DpIfph4SOpR+WP
+        lR7X/aj3Y+uI5ciZUdfRvidBTx6Mscae/5T+04fx/Kfkp+UTqhONk2aTp6fcp24+W/1s/Hnq8/npgp+l
+        f65+ofviu18cf+mbWTUz/pL/cuHX4lfyr468Xva6e9Z/9vGb5Dfzc4Vv5d8efcd41/s+7P3EfOYH7IeK
+        j3ofuz55f3q4kLyw8Bv3hPP74uYdwgAAAAlwSFlzAAALEwAACxMBAJqcGAAACfBJREFUeF7t3dtuFFcC
+        heFc5VWQRsrL5T0iRcrDkJAjJOADNjbdbvD5iE9tu302RIq0Z6+ynWkmS6oZrlys/+KT8FJX3f2bcmPa
+        X5RSAISyI4AMdgSQwY4AMtgRQAY7AshgRwAZ7Agggx0BZLAjgAx2BJDBjgAy2BFABjsCyGBHABnsCCCD
+        HQFksCOADHYEkMGOADLYEUAGOwLIYEcAGewIIIMdAWSwI4AMdgSQwY4AMtgRQAY7AshgRwAZ7Agggx0B
+        ZLAjgAx2BJDBjgAy2BFABjsCyGBHABnsCCCDHQFksCOADHYEkMGOADLYEUAGOwLIYEcAGewIIIMdAWSw
+        I4AMdgSQwY4AMtgRQAY7AshgRwAZ7Agggx0BZLAjgAx2BJDBjgAy2BFABjsCyGBHABnsCCCDHQFksCOA
+        DHYEkMGOADLYEUAGOwLIYEcAGewIIIMdAWSwI4AMdgSQwY4AMtgRQAY7AshgRwAZ7Agggx0BZLAjgAx2
+        BJDBjgAy2BFABjsCyGBHABnsCCCDHQFksCOADHYEkMGOADLYEUAGOwLIYEf5/vsnj6pvqpnqr6oAePDU
+        qppVu49c2+PsWC/8urpZXV0rR8fH5f2HD+XDGH0N4GH47zbVrNpVw2rZNX7voy/qi7+sHvd6C2U0Oi03
+        7z+Um5v35RpAZ6hZtauG1bKaVtvjrd/76Iv6om/7/UG9+PZGV9c3d67L5RWAh06t3nfbHAa1ZTVd2/5m
+        vPV7f/+hvuCr6q8r3UQ3u7wqF9X5xSWAjlG7avi+ZbVd/Ws8fhk/AL5dXl75O/qz84tyenZ+56yMTgE8
+        dGr1vls1fH8YLNW2a+P/eAoYPwAWD4ZH5fT8sozqxSf1Zsejs3J0cgqgY9SuGlbLavrgcKgDYDAev4wf
+        AH+OTmv4o/NyrJscjcqwOhyeAOgYtauG1fJ907Xxs/H4ZfwAqC+sf+Mfn9aLT+qJcVwdlf0DAF2jdtWw
+        WlbTaluN3/d+76MDQC88PDxpbrC7N6wOy7tdAF2jdtWwWlbTarv1ANCJsbc/bG6ws7Nftrb3AHSUGlbL
+        avqwtt16AOzV02Jn96Bs1Qs3t3fLxua7sg6gc9SuGlbLalpttx4AOi10wcbmblnb2Cmr69tlZQ1A16hd
+        NayW1bTabj0AtncObuNf3ykrq1tleWWzLC0D6Bq1q4bVsppW260HwObWbfy6eHFpo7xdXC9v3q4B6Bi1
+        q4bVsppW260HwPr6u3rBVr14owzerJWFwWrpL6wA6Bi1q4bVsppW260HwMrqdnNq6MJef6W87i2X+ddL
+        ADpG7aphtaym1XbrAbBUHxcG9fGht7Bc5l4vllfzb8vs3BsAHaN21bBaVtNqu/UA0PcNenzQhTOv3pSX
+        s4MyPbMAoGPUrhpWy2pabbceAHpceN1bKrOKv95karpfJqd6ADpG7aphtaym1XbrAdAf1L/95xfrhYMy
+        Od0rLyZfl+cT8wA6Ru2qYbWsptV26wHQ6y833z9MvezXG8yXP17Mld+fvwLQMWpXDatlNa22Ww8AvXuo
+        E2Nislf+eD5Xnv3+qjx9NgugY9SuGlbLalpttx4Ac3OLZXp6oTx/MV9vMFt+ezpTfv3tJYCOUbtqWC2r
+        abXdegDMzr2t3zf06yPEXPnt2Uz5pd7o51+nAXSM2lXDallNq+3WA2BmdtC8eaCTQzf46Zep8uPPkwA6
+        Ru2qYbWsptV26wGg7xX0DuLT32eaU0Q3evLTBICOUbtqWC2rabXdegDoBwiev7h9/NcJohv98OMLAB2j
+        dtWwWlbTarv1AJh6udC8c/jr05l6gkzVG02U75+8ANAxalcNq2U1rbbbD4C7NwD1vcOTnyabGz3+4TmA
+        jlG7algtq2m1zQEAhOAAAIJ92gHAewDAZ+GT3gPgXwGAz8Mn/SsAPwcAfB4+6ecA+ElA4POgdtXw//WT
+        gPxfAODzoHbVsFr+n/8vgD44YPrlQn1kqE8Bf7yqN5ht3kQA0C1qVw2rZTWttlsPgPneUvNZYhNTveYD
+        BXSDp/URAkC3qF01rJbVtNpuPQB6CyvlVX1U0DuGE1O3HwemmwDoFrWrhtWymlbbrQfAYLDafHLIzOyb
+        +thw+4GgE5OvAXSM2lXDallNq+3WA+DN4vrtU0D9fqE5BGYGzQ8QAOgWtauG1bKaVtutB8Di8mZZ0EeD
+        95ebC/XOoT5bHEC3qF01rJbVtNpuPQD020TfLq3XC1abC/XGgX6xAIBuUbu38a82Tavt1gNgbf1dWVrZ
+        qo8LG82p0a/fN+jxAUC3qF01rJbVtNpuPQD49eDA5+GTfj349s5B2di8PQT020R18VL93gFAt6hdNayW
+        1bTabj0AdncP6wv3y2a9YH1jp168XVbXAHSN2lXDallN7+4dth8A+wfHd4fAQdna3quPDXvN6QGgW9Su
+        GlbLalpttx4Aw+FJfeFRPS2G5d3uQdl5d9CcHgC6Re2qYbWsptV22wHw59HxqAyPTsrB4XFz0d7+sHl0
+        ANAtalcNq2U1LbXxy/H4ZfwAWNk/GJaT0Vk5Oj6tF4zKYT01dAMA3aJ21bBaVtN7+817AIPx+GX8APhu
+        aXmlnJ1flNHZeXPR8clpOboz1NMBgAftvle1q4bVsppeXGr+M9C34/HL+AHwVfXXxcVVOa/Ozi/L6dlF
+        dV5GpwC6Qs2qXTWsltW02lbj4/HLR1/UF3zX7w/K1fVNuby6LheXt4fBLd3sjm4M4GEYb/OuV7WrhtWy
+        mq5t/+Nvf/noi/qiL6vHvV6/PkKMynW9WDe4uq43qjfTDQE8TGq0abU2q3bVsFpW02p7vPV7/xikvvjr
+        6mZlZbUcHR2Xm/cfxrwH8OD8p1E1q3bVsFp2jd+zo9QLH1XfVHOVbgagG9Ss2n3k2h5nRwAZ7Agggx0B
+        ZLAjgAx2BJDBjgAy2BFABjsCyGBHABnsCCCDHQFksCOADHYEkMGOADLYEUAGOwLIYEcAGewIIIMdAWSw
+        I4AMdgSQwY4AMtgRQAY7AshgRwAZ7Agggx0BZLAjgAx2BJDBjgAy2BFABjsCyGBHABnsCCCDHQFksCOA
+        DHYEkMGOADLYEUAGOwLIYEcAGewIIIMdAWSwI4AMdgSQwY4AMtgRQAY7AshgRwAZ7Agggx0BZLAjgAx2
+        BJDBjgAy2BFABjsCyGBHABnsCCCDHQFksCOADHYEkMGOADLYEUAGOwLIYEcAGewIIIMdAWSwI4AMdgSQ
+        wY4AMtgRQAY7AshgRwAZ7Agggx0BZLAjgAx2BJDBjgAy2BFABjsCyGBHABnsCCCDHQFksCOADHYEkMGO
+        ADLYEUAGOwLIYEcAGewIIIMdAWSwI4AMdgSQwY4AMtgRQAY7AshgRwAZ7Agggx0BZLAjgAx2BJDBjgAy
+        2BFABjsCSFC++DdnYZod1cA/NQAAAABJRU5ErkJggg==
+</value>
+  </data>
+  <data name="Save.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAAQAAAAEACAYAAABccqhmAAAABGdBTUEAALGOfPtRkwAAACBjSFJNAACH
+        DwAAjA8AAP1SAACBQAAAfXkAAOmLAAA85QAAGcxzPIV3AAAKOWlDQ1BQaG90b3Nob3AgSUNDIHByb2Zp
+        bGUAAEjHnZZ3VFTXFofPvXd6oc0w0hl6ky4wgPQuIB0EURhmBhjKAMMMTWyIqEBEEREBRZCggAGjoUis
+        iGIhKKhgD0gQUGIwiqioZEbWSnx5ee/l5ffHvd/aZ+9z99l7n7UuACRPHy4vBZYCIJkn4Ad6ONNXhUfQ
+        sf0ABniAAaYAMFnpqb5B7sFAJC83F3q6yAn8i94MAUj8vmXo6U+ng/9P0qxUvgAAyF/E5mxOOkvE+SJO
+        yhSkiu0zIqbGJIoZRomZL0pQxHJijlvkpZ99FtlRzOxkHlvE4pxT2clsMfeIeHuGkCNixEfEBRlcTqaI
+        b4tYM0mYzBXxW3FsMoeZDgCKJLYLOKx4EZuImMQPDnQR8XIAcKS4LzjmCxZwsgTiQ7mkpGbzuXHxArou
+        S49uam3NoHtyMpM4AoGhP5OVyOSz6S4pyalMXjYAi2f+LBlxbemiIluaWltaGpoZmX5RqP+6+Dcl7u0i
+        vQr43DOI1veH7a/8UuoAYMyKarPrD1vMfgA6tgIgd/8Pm+YhACRFfWu/8cV5aOJ5iRcIUm2MjTMzM424
+        HJaRuKC/6386/A198T0j8Xa/l4fuyollCpMEdHHdWClJKUI+PT2VyeLQDf88xP848K/zWBrIieXwOTxR
+        RKhoyri8OFG7eWyugJvCo3N5/6mJ/zDsT1qca5Eo9Z8ANcoISN2gAuTnPoCiEAESeVDc9d/75oMPBeKb
+        F6Y6sTj3nwX9+65wifiRzo37HOcSGExnCfkZi2viawnQgAAkARXIAxWgAXSBITADVsAWOAI3sAL4gWAQ
+        DtYCFogHyYAPMkEu2AwKQBHYBfaCSlAD6kEjaAEnQAc4DS6Ay+A6uAnugAdgBIyD52AGvAHzEARhITJE
+        geQhVUgLMoDMIAZkD7lBPlAgFA5FQ3EQDxJCudAWqAgqhSqhWqgR+hY6BV2ArkID0D1oFJqCfoXewwhM
+        gqmwMqwNG8MM2An2hoPhNXAcnAbnwPnwTrgCroOPwe3wBfg6fAcegZ/DswhAiAgNUUMMEQbigvghEUgs
+        wkc2IIVIOVKHtCBdSC9yCxlBppF3KAyKgqKjDFG2KE9UCIqFSkNtQBWjKlFHUe2oHtQt1ChqBvUJTUYr
+        oQ3QNmgv9Cp0HDoTXYAuRzeg29CX0HfQ4+g3GAyGhtHBWGE8MeGYBMw6TDHmAKYVcx4zgBnDzGKxWHms
+        AdYO64dlYgXYAux+7DHsOewgdhz7FkfEqeLMcO64CBwPl4crxzXhzuIGcRO4ebwUXgtvg/fDs/HZ+BJ8
+        Pb4LfwM/jp8nSBN0CHaEYEICYTOhgtBCuER4SHhFJBLVidbEACKXuIlYQTxOvEIcJb4jyZD0SS6kSJKQ
+        tJN0hHSedI/0ikwma5MdyRFkAXknuZF8kfyY/FaCImEk4SXBltgoUSXRLjEo8UISL6kl6SS5VjJHslzy
+        pOQNyWkpvJS2lIsUU2qDVJXUKalhqVlpirSptJ90snSxdJP0VelJGayMtoybDFsmX+awzEWZMQpC0aC4
+        UFiULZR6yiXKOBVD1aF6UROoRdRvqP3UGVkZ2WWyobJZslWyZ2RHaAhNm+ZFS6KV0E7QhmjvlygvcVrC
+        WbJjScuSwSVzcopyjnIcuUK5Vrk7cu/l6fJu8onyu+U75B8poBT0FQIUMhUOKlxSmFakKtoqshQLFU8o
+        3leClfSVApXWKR1W6lOaVVZR9lBOVd6vfFF5WoWm4qiSoFKmclZlSpWiaq/KVS1TPaf6jC5Ld6In0Svo
+        PfQZNSU1TzWhWq1av9q8uo56iHqeeqv6Iw2CBkMjVqNMo1tjRlNV01czV7NZ874WXouhFa+1T6tXa05b
+        RztMe5t2h/akjpyOl06OTrPOQ12yroNumm6d7m09jB5DL1HvgN5NfVjfQj9ev0r/hgFsYGnANThgMLAU
+        vdR6KW9p3dJhQ5Khk2GGYbPhqBHNyMcoz6jD6IWxpnGE8W7jXuNPJhYmSSb1Jg9MZUxXmOaZdpn+aqZv
+        xjKrMrttTjZ3N99o3mn+cpnBMs6yg8vuWlAsfC22WXRbfLS0suRbtlhOWWlaRVtVWw0zqAx/RjHjijXa
+        2tl6o/Vp63c2ljYCmxM2v9ga2ibaNtlOLtdZzllev3zMTt2OaVdrN2JPt4+2P2Q/4qDmwHSoc3jiqOHI
+        dmxwnHDSc0pwOub0wtnEme/c5jznYuOy3uW8K+Lq4Vro2u8m4xbiVun22F3dPc692X3Gw8Jjncd5T7Sn
+        t+duz2EvZS+WV6PXzAqrFetX9HiTvIO8K72f+Oj78H26fGHfFb57fB+u1FrJW9nhB/y8/Pb4PfLX8U/z
+        /z4AE+AfUBXwNNA0MDewN4gSFBXUFPQm2Dm4JPhBiG6IMKQ7VDI0MrQxdC7MNaw0bGSV8ar1q66HK4Rz
+        wzsjsBGhEQ0Rs6vdVu9dPR5pEVkQObRGZ03WmqtrFdYmrT0TJRnFjDoZjY4Oi26K/sD0Y9YxZ2O8Yqpj
+        ZlgurH2s52xHdhl7imPHKeVMxNrFlsZOxtnF7YmbineIL4+f5rpwK7kvEzwTahLmEv0SjyQuJIUltSbj
+        kqOTT/FkeIm8nhSVlKyUgVSD1ILUkTSbtL1pM3xvfkM6lL4mvVNAFf1M9Ql1hVuFoxn2GVUZbzNDM09m
+        SWfxsvqy9bN3ZE/kuOd8vQ61jrWuO1ctd3Pu6Hqn9bUboA0xG7o3amzM3zi+yWPT0c2EzYmbf8gzySvN
+        e70lbEtXvnL+pvyxrR5bmwskCvgFw9tst9VsR23nbu/fYb5j/45PhezCa0UmReVFH4pZxde+Mv2q4quF
+        nbE7+0ssSw7uwuzi7Rra7bD7aKl0aU7p2B7fPe1l9LLCstd7o/ZeLV9WXrOPsE+4b6TCp6Jzv+b+Xfs/
+        VMZX3qlyrmqtVqreUT13gH1g8KDjwZYa5ZqimveHuIfu1nrUttdp15UfxhzOOPy0PrS+92vG140NCg1F
+        DR+P8I6MHA082tNo1djYpNRU0gw3C5unjkUeu/mN6zedLYYtta201qLj4Ljw+LNvo78dOuF9ovsk42TL
+        d1rfVbdR2grbofbs9pmO+I6RzvDOgVMrTnV32Xa1fW/0/ZHTaqerzsieKTlLOJt/duFczrnZ86nnpy/E
+        XRjrjup+cHHVxds9AT39l7wvXbnsfvlir1PvuSt2V05ftbl66hrjWsd1y+vtfRZ9bT9Y/NDWb9nffsPq
+        RudN65tdA8sHzg46DF645Xrr8m2v29fvrLwzMBQydHc4cnjkLvvu5L2key/vZ9yff7DpIfph4SOpR+WP
+        lR7X/aj3Y+uI5ciZUdfRvidBTx6Mscae/5T+04fx/Kfkp+UTqhONk2aTp6fcp24+W/1s/Hnq8/npgp+l
+        f65+ofviu18cf+mbWTUz/pL/cuHX4lfyr468Xva6e9Z/9vGb5Dfzc4Vv5d8efcd41/s+7P3EfOYH7IeK
+        j3ofuz55f3q4kLyw8Bv3hPP74uYdwgAAAAlwSFlzAAALEwAACxMBAJqcGAAACfBJREFUeF7t3dtuFFcC
+        heFc5VWQRsrL5T0iRcrDkJAjJOADNjbdbvD5iE9tu302RIq0Z6+ynWkmS6oZrlys/+KT8FJX3f2bcmPa
+        X5RSAISyI4AMdgSQwY4AMtgRQAY7AshgRwAZ7Agggx0BZLAjgAx2BJDBjgAy2BFABjsCyGBHABnsCCCD
+        HQFksCOADHYEkMGOADLYEUAGOwLIYEcAGewIIIMdAWSwI4AMdgSQwY4AMtgRQAY7AshgRwAZ7Agggx0B
+        ZLAjgAx2BJDBjgAy2BFABjsCyGBHABnsCCCDHQFksCOADHYEkMGOADLYEUAGOwLIYEcAGewIIIMdAWSw
+        I4AMdgSQwY4AMtgRQAY7AshgRwAZ7Agggx0BZLAjgAx2BJDBjgAy2BFABjsCyGBHABnsCCCDHQFksCOA
+        DHYEkMGOADLYEUAGOwLIYEcAGewIIIMdAWSwI4AMdgSQwY4AMtgRQAY7AshgRwAZ7Agggx0BZLAjgAx2
+        BJDBjgAy2BFABjsCyGBHABnsCCCDHQFksCOADHYEkMGOADLYEUAGOwLIYEf5/vsnj6pvqpnqr6oAePDU
+        qppVu49c2+PsWC/8urpZXV0rR8fH5f2HD+XDGH0N4GH47zbVrNpVw2rZNX7voy/qi7+sHvd6C2U0Oi03
+        7z+Um5v35RpAZ6hZtauG1bKaVtvjrd/76Iv6om/7/UG9+PZGV9c3d67L5RWAh06t3nfbHAa1ZTVd2/5m
+        vPV7f/+hvuCr6q8r3UQ3u7wqF9X5xSWAjlG7avi+ZbVd/Ws8fhk/AL5dXl75O/qz84tyenZ+56yMTgE8
+        dGr1vls1fH8YLNW2a+P/eAoYPwAWD4ZH5fT8sozqxSf1Zsejs3J0cgqgY9SuGlbLavrgcKgDYDAev4wf
+        AH+OTmv4o/NyrJscjcqwOhyeAOgYtauG1fJ907Xxs/H4ZfwAqC+sf+Mfn9aLT+qJcVwdlf0DAF2jdtWw
+        WlbTaluN3/d+76MDQC88PDxpbrC7N6wOy7tdAF2jdtWwWlbTarv1ANCJsbc/bG6ws7Nftrb3AHSUGlbL
+        avqwtt16AOzV02Jn96Bs1Qs3t3fLxua7sg6gc9SuGlbLalpttx4AOi10wcbmblnb2Cmr69tlZQ1A16hd
+        NayW1bTabj0AtncObuNf3ykrq1tleWWzLC0D6Bq1q4bVsppW260HwObWbfy6eHFpo7xdXC9v3q4B6Bi1
+        q4bVsppW260HwPr6u3rBVr14owzerJWFwWrpL6wA6Bi1q4bVsppW260HwMrqdnNq6MJef6W87i2X+ddL
+        ADpG7aphtaym1XbrAbBUHxcG9fGht7Bc5l4vllfzb8vs3BsAHaN21bBaVtNqu/UA0PcNenzQhTOv3pSX
+        s4MyPbMAoGPUrhpWy2pabbceAHpceN1bKrOKv95karpfJqd6ADpG7aphtaym1XbrAdAf1L/95xfrhYMy
+        Od0rLyZfl+cT8wA6Ru2qYbWsptV26wHQ6y833z9MvezXG8yXP17Mld+fvwLQMWpXDatlNa22Ww8AvXuo
+        E2Nislf+eD5Xnv3+qjx9NgugY9SuGlbLalpttx4Ac3OLZXp6oTx/MV9vMFt+ezpTfv3tJYCOUbtqWC2r
+        abXdegDMzr2t3zf06yPEXPnt2Uz5pd7o51+nAXSM2lXDallNq+3WA2BmdtC8eaCTQzf46Zep8uPPkwA6
+        Ru2qYbWsptV26wGg7xX0DuLT32eaU0Q3evLTBICOUbtqWC2rabXdegDoBwiev7h9/NcJohv98OMLAB2j
+        dtWwWlbTarv1AJh6udC8c/jr05l6gkzVG02U75+8ANAxalcNq2U1rbbbD4C7NwD1vcOTnyabGz3+4TmA
+        jlG7algtq2m1zQEAhOAAAIJ92gHAewDAZ+GT3gPgXwGAz8Mn/SsAPwcAfB4+6ecA+ElA4POgdtXw//WT
+        gPxfAODzoHbVsFr+n/8vgD44YPrlQn1kqE8Bf7yqN5ht3kQA0C1qVw2rZTWttlsPgPneUvNZYhNTveYD
+        BXSDp/URAkC3qF01rJbVtNpuPQB6CyvlVX1U0DuGE1O3HwemmwDoFrWrhtWymlbbrQfAYLDafHLIzOyb
+        +thw+4GgE5OvAXSM2lXDallNq+3WA+DN4vrtU0D9fqE5BGYGzQ8QAOgWtauG1bKaVtutB8Di8mZZ0EeD
+        95ebC/XOoT5bHEC3qF01rJbVtNpuPQD020TfLq3XC1abC/XGgX6xAIBuUbu38a82Tavt1gNgbf1dWVrZ
+        qo8LG82p0a/fN+jxAUC3qF01rJbVtNpuPQD49eDA5+GTfj349s5B2di8PQT020R18VL93gFAt6hdNayW
+        1bTabj0AdncP6wv3y2a9YH1jp168XVbXAHSN2lXDallN7+4dth8A+wfHd4fAQdna3quPDXvN6QGgW9Su
+        GlbLalpttx4Aw+FJfeFRPS2G5d3uQdl5d9CcHgC6Re2qYbWsptV22wHw59HxqAyPTsrB4XFz0d7+sHl0
+        ANAtalcNq2U1LbXxy/H4ZfwAWNk/GJaT0Vk5Oj6tF4zKYT01dAMA3aJ21bBaVtN7+817AIPx+GX8APhu
+        aXmlnJ1flNHZeXPR8clpOboz1NMBgAftvle1q4bVsppeXGr+M9C34/HL+AHwVfXXxcVVOa/Ozi/L6dlF
+        dV5GpwC6Qs2qXTWsltW02lbj4/HLR1/UF3zX7w/K1fVNuby6LheXt4fBLd3sjm4M4GEYb/OuV7WrhtWy
+        mq5t/+Nvf/noi/qiL6vHvV6/PkKMynW9WDe4uq43qjfTDQE8TGq0abU2q3bVsFpW02p7vPV7/xikvvjr
+        6mZlZbUcHR2Xm/cfxrwH8OD8p1E1q3bVsFp2jd+zo9QLH1XfVHOVbgagG9Ss2n3k2h5nRwAZ7Agggx0B
+        ZLAjgAx2BJDBjgAy2BFABjsCyGBHABnsCCCDHQFksCOADHYEkMGOADLYEUAGOwLIYEcAGewIIIMdAWSw
+        I4AMdgSQwY4AMtgRQAY7AshgRwAZ7Agggx0BZLAjgAx2BJDBjgAy2BFABjsCyGBHABnsCCCDHQFksCOA
+        DHYEkMGOADLYEUAGOwLIYEcAGewIIIMdAWSwI4AMdgSQwY4AMtgRQAY7AshgRwAZ7Agggx0BZLAjgAx2
+        BJDBjgAy2BFABjsCyGBHABnsCCCDHQFksCOADHYEkMGOADLYEUAGOwLIYEcAGewIIIMdAWSwI4AMdgSQ
+        wY4AMtgRQAY7AshgRwAZ7Agggx0BZLAjgAx2BJDBjgAy2BFABjsCyGBHABnsCCCDHQFksCOADHYEkMGO
+        ADLYEUAGOwLIYEcAGewIIIMdAWSwI4AMdgSQwY4AMtgRQAY7AshgRwAZ7Agggx0BZLAjgAx2BJDBjgAy
+        2BFABjsCSFC++DdnYZod1cA/NQAAAABJRU5ErkJggg==
+</value>
+  </data>
+</root>

+ 63 - 0
UAS-出货标签管理(泽天)/CodeSoftPrintParam.Designer.cs

@@ -0,0 +1,63 @@
+namespace 贴标机标签打印
+{
+    partial class CodeSoftPrintParam
+    {
+        /// <summary>
+        /// Required designer variable.
+        /// </summary>
+        private System.ComponentModel.IContainer components = null;
+
+        /// <summary>
+        /// Clean up any resources being used.
+        /// </summary>
+        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+        protected override void Dispose(bool disposing)
+        {
+            if (disposing && (components != null))
+            {
+                components.Dispose();
+            }
+            base.Dispose(disposing);
+        }
+
+        #region Windows Form Designer generated code
+
+        /// <summary>
+        /// Required method for Designer support - do not modify
+        /// the contents of this method with the code editor.
+        /// </summary>
+        private void InitializeComponent()
+        {
+            this.label1 = new System.Windows.Forms.Label();
+            this.SuspendLayout();
+            // 
+            // label1
+            // 
+            this.label1.AutoSize = true;
+            this.label1.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label1.Location = new System.Drawing.Point(7, 8);
+            this.label1.Name = "label1";
+            this.label1.Size = new System.Drawing.Size(486, 17);
+            this.label1.TabIndex = 0;
+            this.label1.Text = "变量右侧的表示本次打印的测试值,右侧下方的输入框是维护取值SQL,保存时仅保存SQL";
+            // 
+            // CodeSoftPrintParam
+            // 
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
+            this.AutoScroll = true;
+            this.AutoSize = true;
+            this.ClientSize = new System.Drawing.Size(731, 307);
+            this.Controls.Add(this.label1);
+            this.Name = "CodeSoftPrintParam";
+            this.Text = "模板参数维护";
+            this.Load += new System.EventHandler(this.CodeSoftPrintParam_Load);
+            this.ResumeLayout(false);
+            this.PerformLayout();
+
+        }
+
+        #endregion
+
+        private System.Windows.Forms.Label label1;
+    }
+}

+ 188 - 0
UAS-出货标签管理(泽天)/CodeSoftPrintParam.cs

@@ -0,0 +1,188 @@
+using System;
+using System.Windows.Forms;
+using 贴标机标签打印.CustomControl;
+using System.Drawing;
+using System.Text;
+using System.Data;
+
+namespace 贴标机标签打印
+{
+    public partial class CodeSoftPrintParam : Form
+    {
+        public CodeSoftPrintParam()
+        {
+            InitializeComponent();
+        }
+        //模板参数的名称集合
+        private string[] ParamName;
+        //标签的客户编号ID
+        private string Cl_ID;
+        //Label表的主键,关联LabelParameter查询SQL
+        private string LA_ID;
+
+        private int LabelHeight;
+
+        private int LabelWidth;
+        //打开的标签文件
+        private Document Doc;
+
+        DataTable dt;
+
+        DataHelper dh;
+
+        StringBuilder sql = new StringBuilder();
+
+        public CodeSoftPrintParam(string cl_id, string la_id, string[] paramname, Document doc)
+        {
+            InitializeComponent();
+            ParamName = paramname;
+            Cl_ID = cl_id;
+            LA_ID = la_id;
+            Doc = doc;
+            LabelHeight = doc.Format.LabelHeight;
+            LabelWidth = doc.Format.LabelWidth;
+        }
+
+        private void CodeSoftPrintParam_Load(object sender, EventArgs e)
+        {
+            dh = new DataHelper();
+            dt = dh.getFieldsDatasByCondition("labelparameter", new string[] { "lp_id", "lp_name", "lp_sql", "lp_laid" }, "lp_laid=" + (LA_ID == "" ? "0" : LA_ID));
+            int y = 100;
+            for (int i = 0; i < ParamName.Length; i++)
+            {
+                //变量的名称Label
+                Label Param = new Label();
+                Param.Text = ParamName[i];
+                Param.Anchor = AnchorStyles.Left;
+                Param.Anchor = AnchorStyles.Top;
+                Param.Location = new Point(200, y + 5);
+                this.Controls.Add(Param);
+                //维护变量的打印测试参数
+                EnterTextBox TempParam = new EnterTextBox();
+                TempParam.Anchor = AnchorStyles.Left;
+                TempParam.Anchor = AnchorStyles.Top;
+                TempParam.Name = "Temp" + ParamName[i];
+                TempParam.Text = Doc.Variables.FreeVariables.Item(ParamName[i]).Value;
+                TempParam.Location = new Point(300, y);
+                y = y + 30;
+                TempParam.Size = new Size(150, 22);
+                this.Controls.Add(TempParam);
+                //变量的SQL标签
+                Label ParamSQL = new Label();
+                ParamSQL.Text = ParamName[i] + "取值SQL";
+                ParamSQL.Anchor = AnchorStyles.Left;
+                ParamSQL.Anchor = AnchorStyles.Top;
+                ParamSQL.AutoSize = false;
+                ParamSQL.Location = new Point(200, y + 5);
+                this.Controls.Add(ParamSQL);
+                //维护SQL输入框  
+                EnterTextBox SQL = new EnterTextBox();
+                SQL.Anchor = AnchorStyles.Left;
+                SQL.Anchor = AnchorStyles.Top;
+                SQL.Name = ParamName[i];
+                for (int j = 0; j < dt.Rows.Count; j++)
+                {
+                    if (dt.Rows[j]["lp_name"].ToString() == ParamName[i])
+                    {
+                        SQL.Text = dt.Rows[j]["lp_sql"].ToString();
+                        //只要维护个这个参数就会有lp_laid这个属性,判断该SQL是否需要插入
+                        SQL.Tag = dt.Rows[j]["lp_id"].ToString();
+                    }
+                }
+                SQL.Location = new Point(300, y);
+                this.Controls.Add(SQL);
+                SQL.Size = new Size(250, 22);
+                NormalButton Test = new NormalButton();
+                Test.Text = "检测";
+                Test.Tag = ParamName[i];
+                Test.Click += CheckSQL;
+                Test.Location = new Point(570, y);
+                Test.Size = new Size(60, 22);
+                this.Controls.Add(Test);
+                y = y + 30;
+            }
+            NormalButton nb = new NormalButton();
+            nb.Text = "保存";
+            nb.Click += Save_Click;
+            nb.Location = new Point(330, y + 10);
+            nb.Size = new Size(80, 22);
+            this.Controls.Add(nb);
+            Height = y + 150;
+        }
+
+        private void Save_Click(object sender, EventArgs e)
+        {
+            //将标签信息插入Label表,将SQL和标签其他信息插入LabelParameter
+            //如果此标签没有维护过则LA_ID字段的值为空
+            string[] psql = new string[ParamName.Length];
+            for (int i = 0; i < ParamName.Length; i++)
+            {
+                Doc.Variables.FreeVariables.Item(ParamName[i]).Value = "Temp" + Controls[ParamName[i]].Text;
+                psql[i] = Controls[ParamName[i]].Text;
+            }
+            //未维护参数的时候从序列取一个新的ID
+            if (LA_ID == "" || LA_ID == null)
+            {
+                string la_id = dh.GetSEQ("label_seq");
+                dh.ExecuteSql("insert into label(la_id,la_code,la_name,la_indate,la_inman) select '" + la_id + "',cl_custcode,cu_name,sysdate,'管理员' from customerlabel left join customer on cu_code=cl_custcode where cl_id=" + Cl_ID, "insert");
+                sql.Clear();
+                sql.Append("insert into labelparameter (lp_id,lp_laid,lp_name,lp_software,lp_height,lp_width,lp_sql) ");
+                sql.Append("values(labelparameter_seq.nextval,'" + la_id + "',:lp_name,'CodeSoft','" + LabelHeight + "','" + LabelWidth + "',:lp_sql)");
+                //保存标签参数的值和获取需要插入的SQL的数组
+                dh.BatchInsert(sql.ToString(), new string[] { "lp_name", "lp_sql" }, ParamName, psql);
+            }
+            //如果维护过变标签的时候就使用传进来的LA_ID作为参数
+            if (LA_ID != "")
+            {
+                //存在ID直接更新的数据
+                ArrayList<string> UpdateName = new ArrayList<string>();
+                ArrayList<string> UpdateSQL = new ArrayList<string>();
+                ArrayList<string> UpdateID = new ArrayList<string>();
+                //不存在ID需要新插入的数据
+                ArrayList<string> InsertName = new ArrayList<string>();
+                ArrayList<string> InsertSQL = new ArrayList<string>();
+                for (int i = 0; i < ParamName.Length; i++)
+                {
+                    //ID为空需要插入的数据
+                    if (Controls[ParamName[i]].Tag == null || Controls[ParamName[i]].Tag.ToString() == "")
+                    {
+                        InsertName.Add(ParamName[i]);
+                        InsertSQL.Add(Controls[ParamName[i]].Text);
+                    }
+                    //存在ID需要更新的数据
+                    else {
+                        UpdateName.Add(ParamName[i]);
+                        UpdateSQL.Add(Controls[ParamName[i]].Text);
+                        UpdateID.Add(Controls[ParamName[i]].Tag.ToString());
+                    }
+                }
+                //保存标签参数的值和获取需要插入的SQL的数组
+                sql.Clear();
+                sql.Append("insert into labelparameter (lp_id,lp_laid,lp_name,lp_software,lp_height,lp_width,lp_sql) ");
+                sql.Append("values(labelparameter_seq.nextval,'" + LA_ID + "',:lp_name,'CodeSoft','" + LabelHeight + "','" + LabelWidth + "',:lp_sql)");
+                dh.BatchInsert(sql.ToString(), new string[] { "lp_name", "lp_sql" }, InsertName.ToArray(), InsertSQL.ToArray());
+                //更新存在ID的参数
+                sql.Clear();
+                sql.Append("update labelparameter set lp_sql=:lp_sql , lp_name=:lp_name where lp_laid=:lp_laid");
+                dh.BatchInsert(sql.ToString(), new string[] { "lp_sql", "lp_name", "lp_laid" }, UpdateSQL.ToArray(), UpdateName.ToArray(), UpdateID.ToArray());
+            }
+            Doc.Save();
+            MessageBox.Show("保存成功");
+        }
+
+        //通过Tag获取到输入框的SQL,执行测试的方法
+        private void CheckSQL(object sender, EventArgs e)
+        {
+            NormalButton nbt = sender as NormalButton;
+            string ErrorMessage = "";
+            if (dh.CheckSQL(this.Controls[nbt.Tag.ToString()].Text, out ErrorMessage))
+            {
+                MessageBox.Show("检测通过");
+            }
+            else
+            {
+                MessageBox.Show(ErrorMessage);
+            }
+        }
+    }
+}

+ 120 - 0
UAS-出货标签管理(泽天)/CodeSoftPrintParam.resx

@@ -0,0 +1,120 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+</root>

+ 86 - 0
UAS-出货标签管理(泽天)/CustomControl/BlurSearch.Designer.cs

@@ -0,0 +1,86 @@
+namespace UAS_LabelMachine.CustomControl
+{
+    partial class BlurSearch
+    {
+        /// <summary> 
+        /// 必需的设计器变量。
+        /// </summary>
+        private System.ComponentModel.IContainer components = null;
+
+        /// <summary> 
+        /// 清理所有正在使用的资源。
+        /// </summary>
+        /// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
+        protected override void Dispose(bool disposing)
+        {
+            if (disposing && (components != null))
+            {
+                components.Dispose();
+            }
+            base.Dispose(disposing);
+        }
+
+        #region 组件设计器生成的代码
+
+        /// <summary> 
+        /// 设计器支持所需的方法 - 不要修改
+        /// 使用代码编辑器修改此方法的内容。
+        /// </summary>
+        private void InitializeComponent()
+        {
+            this.ListBox = new System.Windows.Forms.ListBox();
+            this.EnterTextBox = new EnterTextBox();
+            this.SuspendLayout();
+            // 
+            // ListBox
+            // 
+            this.ListBox.Dock = System.Windows.Forms.DockStyle.Bottom;
+            this.ListBox.FormattingEnabled = true;
+            this.ListBox.ItemHeight = 12;
+            this.ListBox.Location = new System.Drawing.Point(0, 20);
+            this.ListBox.Margin = new System.Windows.Forms.Padding(2);
+            this.ListBox.Name = "ListBox";
+            this.ListBox.Size = new System.Drawing.Size(154, 100);
+            this.ListBox.TabIndex = 1;
+            this.ListBox.Click += new System.EventHandler(this.ListBox_Click);
+            // 
+            // EnterTextBox
+            // 
+            this.EnterTextBox.BackColor = System.Drawing.Color.White;
+            this.EnterTextBox.Dock = System.Windows.Forms.DockStyle.Top;
+            this.EnterTextBox.ID = null;
+            this.EnterTextBox.Location = new System.Drawing.Point(0, 0);
+            this.EnterTextBox.Margin = new System.Windows.Forms.Padding(2);
+            this.EnterTextBox.Name = "EnterTextBox";
+            this.EnterTextBox.Size = new System.Drawing.Size(154, 21);
+            this.EnterTextBox.Str = null;
+            this.EnterTextBox.Str1 = null;
+            this.EnterTextBox.Str2 = null;
+            this.EnterTextBox.TabIndex = 2;
+            this.EnterTextBox.TextChanged += new System.EventHandler(this.EnterTextBox_TextChanged);
+            this.EnterTextBox.Enter += new System.EventHandler(this.EnterTextBox_Enter);
+            this.EnterTextBox.KeyDown += new System.Windows.Forms.KeyEventHandler(this.EnterTextBox_KeyDown);
+            this.EnterTextBox.Leave += new System.EventHandler(this.EnterTextBox_Leave);
+            // 
+            // BlurSearch
+            // 
+            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+            this.Controls.Add(this.EnterTextBox);
+            this.Controls.Add(this.ListBox);
+            this.Margin = new System.Windows.Forms.Padding(2);
+            this.Name = "BlurSearch";
+            this.Size = new System.Drawing.Size(154, 120);
+            this.Load += new System.EventHandler(this.BlurSearch_Load);
+            this.Leave += new System.EventHandler(this.BlurSearch_Leave);
+            this.ResumeLayout(false);
+            this.PerformLayout();
+
+        }
+
+        #endregion
+
+        private System.Windows.Forms.ListBox ListBox;
+        private EnterTextBox EnterTextBox;
+    }
+}

+ 244 - 0
UAS-出货标签管理(泽天)/CustomControl/BlurSearch.cs

@@ -0,0 +1,244 @@
+using System;
+using System.Data;
+using System.Windows.Forms;
+using UAS_LabelMachine;
+
+namespace UAS_LabelMachine.CustomControl
+{
+    public partial class BlurSearch : UserControl
+    {
+        DataHelper dh = new DataHelper();
+
+        public delegate void OnTextChange(object sender, EventArgs e);
+
+        public delegate void OnKeyDown(object sender, KeyEventArgs e);
+
+        public event OnTextChange UserControlTextChanged;
+
+        public event OnKeyDown UserKeyDown;
+
+        string TableName1;
+
+        string Field1;
+
+        int ItemSelectIndex = 0;
+        DataTable dt;
+
+        public override string Text
+        {
+            get
+            {
+                return EnterTextBox.Text;
+            }
+
+            set
+            {
+                EnterTextBox.Text = value;
+            }
+        }
+
+        public BlurSearch()
+        {
+            InitializeComponent();
+        }
+
+        public string TableName
+        {
+            get
+            {
+                return TableName1;
+            }
+
+            set
+            {
+                TableName1 = value;
+            }
+        }
+
+        private string value;
+
+        public string Field
+        {
+            get
+            {
+                return Field1;
+            }
+
+            set
+            {
+                Field1 = value;
+            }
+        }
+
+        public string Condition
+        {
+            get
+            {
+                return condition;
+            }
+
+            set
+            {
+                condition = value;
+            }
+        }
+
+        public string ValueField
+        {
+            get
+            {
+                return valueField;
+            }
+
+            set
+            {
+                valueField = value;
+            }
+        }
+
+        public string Value
+        {
+            get
+            {
+                return value;
+            }
+
+            set
+            {
+                this.value = value;
+            }
+        }
+
+        private string valueField;
+
+        private string condition;
+
+        private void TextBox_Leave(object sender, EventArgs e)
+        {
+            Height = EnterTextBox.Height;
+            ListBox.Visible = false;
+        }
+
+        private void BlurSearch_Load(object sender, EventArgs e)
+        {
+            Height = EnterTextBox.Height;
+            ListBox.Visible = false;
+        }
+
+        private void EnterTextBox_TextChanged(object sender, EventArgs e)
+        {
+            if (TableName1 != null && EnterTextBox.Focused)
+            {
+                string con = Field1 + " like '%" + EnterTextBox.Text + "%' and rownum<=5 ";
+                if (condition != "" && condition != null)
+                {
+                    con = Field1 + " like '%" + EnterTextBox.Text + "%' and rownum<=5 and " + condition;
+                }
+                dt = dh.getFieldsDatasByCondition(TableName1, new string[] { Field1, valueField, "rownum" }, con.ToUpper());
+                if (dt.Rows.Count > 0)
+                {
+                    ListBox.Items.Clear();
+                    for (int i = 0; i < dt.Rows.Count; i++)
+                    {
+                        ListBox.Items.Add(dt.Rows[i][Field1]);
+                    }
+                    //每次数据查询之后将索引重置
+                    ItemSelectIndex = 0;
+                    ListBox.Height = ListBox.ItemHeight * (dt.Rows.Count + 1);
+                    ListBox.Visible = true;
+                    Height = ListBox.Height + EnterTextBox.Height;
+                }
+                if (dt.Rows.Count == 1)
+                {
+                    value = dt.Rows[0][valueField].ToString();
+                }
+            }
+            else
+            {
+                ListBox.Visible = false;
+                Height = EnterTextBox.Height;
+            }
+            UserControlTextChanged?.Invoke(sender, new EventArgs());
+        }
+
+        private void ListBox_Click(object sender, EventArgs e)
+        {
+            value = dt.Select("rownum=" + (ListBox.SelectedIndex + 1))[0][1].ToString();
+            EnterTextBox.Text = ListBox.SelectedItem.ToString();
+            ListBox.Visible = false;
+            Height = EnterTextBox.Height;
+        }
+
+        private void EnterTextBox_KeyDown(object sender, KeyEventArgs e)
+        {
+            if (ListBox.Items.Count > 0)
+            {
+                if (e.KeyCode == Keys.Down || e.KeyCode == Keys.Up)
+                {
+                    switch (e.KeyCode)
+                    {
+                        case Keys.Down:
+                            if (ListBox.Items.Count > ItemSelectIndex + 1)
+                                ItemSelectIndex = ItemSelectIndex + 1;
+                            break;
+                        case Keys.Up:
+                            if (ItemSelectIndex - 1 >= 0)
+                                ItemSelectIndex = ItemSelectIndex - 1;
+                            break;
+                        default:
+                            break;
+                    }
+                    ListBox.SelectedIndex = ItemSelectIndex;
+                }
+                if (e.KeyCode == Keys.Enter)
+                {
+                    try
+                    {
+                        EnterTextBox.Text = ListBox.SelectedItem.ToString();
+                        ListBox.Visible = false;
+                        Height = EnterTextBox.Height;
+                    }
+                    catch (Exception)
+                    {
+                    }
+                }
+            }
+            UserKeyDown?.Invoke(sender, e);
+        }
+
+        private void EnterTextBox_Enter(object sender, EventArgs e)
+        {
+            string con = Field1 + " like '%" + EnterTextBox.Text + "%' and rownum<=10 ";
+            if (condition != "" && condition != null)
+            {
+                con = Field1 + " like '%" + EnterTextBox.Text + "%' and rownum<=10 and " + condition;
+            }
+            dt = dh.getFieldsDatasByCondition(TableName1, new string[] { Field1, valueField, "rownum" }, con.ToUpper());
+            if (dt.Rows.Count > 0)
+            {
+                ListBox.Items.Clear();
+                for (int i = 0; i < dt.Rows.Count; i++)
+                {
+                    ListBox.Items.Add(dt.Rows[i][Field1]);
+                }
+                //每次数据查询之后将索引重置
+                ItemSelectIndex = 0;
+                ListBox.Height = ListBox.ItemHeight * (dt.Rows.Count + 1);
+                ListBox.Visible = true;
+                Height = ListBox.Height + EnterTextBox.Height;
+            }
+        }
+
+        private void EnterTextBox_Leave(object sender, EventArgs e)
+        {
+            //ListBox.Visible = false;
+        }
+
+        private void BlurSearch_Leave(object sender, EventArgs e)
+        {
+            ListBox.Height = 0;
+            ListBox.Visible = false;
+            Height = ListBox.Height + EnterTextBox.Height;
+        }
+    }
+}

+ 120 - 0
UAS-出货标签管理(泽天)/CustomControl/BlurSearch.resx

@@ -0,0 +1,120 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+</root>

+ 36 - 0
UAS-出货标签管理(泽天)/CustomControl/ChooseAllButton.Designer.cs

@@ -0,0 +1,36 @@
+namespace UAS_LabelMachine.CustomControl
+{
+    partial class ChooseAllButton
+    {
+        /// <summary> 
+        /// 必需的设计器变量。
+        /// </summary>
+        private System.ComponentModel.IContainer components = null;
+
+        /// <summary> 
+        /// 清理所有正在使用的资源。
+        /// </summary>
+        /// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
+        protected override void Dispose(bool disposing)
+        {
+            if (disposing && (components != null))
+            {
+                components.Dispose();
+            }
+            base.Dispose(disposing);
+        }
+
+        #region 组件设计器生成的代码
+
+        /// <summary> 
+        /// 设计器支持所需的方法 - 不要修改
+        /// 使用代码编辑器修改此方法的内容。
+        /// </summary>
+        private void InitializeComponent()
+        {
+            components = new System.ComponentModel.Container();
+        }
+
+        #endregion
+    }
+}

+ 49 - 0
UAS-出货标签管理(泽天)/CustomControl/ChooseAllButton.cs

@@ -0,0 +1,49 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Drawing;
+using System.Data;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Forms;
+
+namespace UAS_LabelMachine.CustomControl
+{
+    public partial class ChooseAllButton : Button
+    {
+        DataGridView DGV;
+        bool AllChecked = false;
+
+        public ChooseAllButton()
+        {
+            InitializeComponent();
+        }
+
+        public void ChooseAll(DataGridView dgv)
+        {
+            DGV = dgv;
+            Click += ChooseAll_Click;
+        }
+
+        private void ChooseAll_Click(object sender, EventArgs e)
+        {
+            if (AllChecked)
+            {
+                for (int i = 0; i < DGV.RowCount; i++)
+                {
+                    DGV.Rows[i].Cells[0].Value = false;
+                }
+                AllChecked = false;
+            }
+            else
+            {
+                for (int i = 0; i < DGV.RowCount; i++)
+                {
+                    DGV.Rows[i].Cells[0].Value = true;
+                }
+                AllChecked = true;
+            }
+        }
+    }
+}

+ 47 - 0
UAS-出货标签管理(泽天)/CustomControl/DataGridViewWithSerialNum.Designer.cs

@@ -0,0 +1,47 @@
+using System.Windows.Forms;
+
+namespace UAS_LabelMachine.CustomControl
+{
+    partial class DataGridViewWithSerialNum
+    {
+       // private AutoScaleMode AutoScaleMode;
+
+        /// <summary> 
+        /// 必需的设计器变量。
+        /// </summary>
+        private System.ComponentModel.IContainer components = null;
+
+        /// <summary> 
+        /// 清理所有正在使用的资源。
+        /// </summary>
+        /// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
+        protected override void Dispose(bool disposing)
+        {
+            if (disposing && (components != null))
+            {
+                components.Dispose();
+            }
+            base.Dispose(disposing);
+        }
+
+        #region 组件设计器生成的代码
+
+        /// <summary> 
+        /// 设计器支持所需的方法 - 不要修改
+        /// 使用代码编辑器修改此方法的内容。
+        /// </summary>
+        private void InitializeComponent()
+        {
+            ((System.ComponentModel.ISupportInitialize)(this)).BeginInit();
+            this.SuspendLayout();
+            // 
+            // DataGridViewWithSerialNum
+            // 
+            this.RowTemplate.Height = 23;
+            this.CellPainting += new System.Windows.Forms.DataGridViewCellPaintingEventHandler(this.DataGridViewWithSerialNum_CellPainting);
+            ((System.ComponentModel.ISupportInitialize)(this)).EndInit();
+            this.ResumeLayout(false);
+        }
+        #endregion
+    }
+}

+ 37 - 0
UAS-出货标签管理(泽天)/CustomControl/DataGridViewWithSerialNum.cs

@@ -0,0 +1,37 @@
+using System.Drawing;
+using System.Windows.Forms;
+
+namespace UAS_LabelMachine.CustomControl
+{
+    public partial class DataGridViewWithSerialNum : DataGridView
+    {
+        SolidBrush solidBrush;
+
+        public DataGridViewWithSerialNum()
+        {
+            InitializeComponent();
+            solidBrush = new SolidBrush(RowHeadersDefaultCellStyle.ForeColor);
+        }
+
+        protected override void OnRowPostPaint(DataGridViewRowPostPaintEventArgs e)
+        {
+            e.Graphics.DrawString((e.RowIndex + 1).ToString(), e.InheritedRowStyle.Font, solidBrush, e.RowBounds.Location.X + 15, e.RowBounds.Location.Y + 5);
+            base.OnRowPostPaint(e);
+        }
+
+        private void DataGridViewWithSerialNum_CellPainting(object sender, DataGridViewCellPaintingEventArgs e)
+        {
+            //bool mouseOver = e.CellBounds.Contains(this.PointToClient(Cursor.Position));
+            //if (e.RowIndex % 2 != 0 || e.ColumnIndex == -1)
+            //{
+            //    solidBrush = new SolidBrush(Color.FromArgb(51, 153, 255));
+            //    e.Graphics.FillRectangle(mouseOver ? solidBrush : Brushes.LightGray, e.CellBounds);
+            //    Rectangle border = e.CellBounds;
+            //    border.Width -= 1;
+            //    e.Graphics.DrawRectangle(Pens.White, border);
+            //    e.PaintContent(e.CellBounds);
+            //    e.Handled = true;
+            //}
+        }
+    }
+}

+ 123 - 0
UAS-出货标签管理(泽天)/CustomControl/DataGridViewWithSerialNum.resx

@@ -0,0 +1,123 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <metadata name="$this.TrayLargeIcon" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>False</value>
+  </metadata>
+</root>

+ 44 - 0
UAS-出货标签管理(泽天)/CustomControl/EnterTextBox.Designer.cs

@@ -0,0 +1,44 @@
+namespace UAS_LabelMachine.CustomControl
+{
+    partial class EnterTextBox
+    {
+        /// <summary> 
+        /// 必需的设计器变量。
+        /// </summary>
+        private System.ComponentModel.IContainer components = null;
+
+        /// <summary> 
+        /// 清理所有正在使用的资源。
+        /// </summary>
+        /// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
+        protected override void Dispose(bool disposing)
+        {
+            if (disposing && (components != null))
+            {
+                components.Dispose();
+            }
+            base.Dispose(disposing);
+        }
+
+        #region 组件设计器生成的代码
+
+        /// <summary> 
+        /// 设计器支持所需的方法 - 不要修改
+        /// 使用代码编辑器修改此方法的内容。
+        /// </summary>
+        private void InitializeComponent()
+        {
+            this.SuspendLayout();
+            // 
+            // EnterTextBox
+            // 
+            this.Size = new System.Drawing.Size(196, 21);
+            this.Enter += new System.EventHandler(this.EnterTextBox_Enter);
+            this.Leave += new System.EventHandler(this.EnterTextBox_Leave);
+            this.ResumeLayout(false);
+
+        }
+
+        #endregion
+    }
+}

+ 92 - 0
UAS-出货标签管理(泽天)/CustomControl/EnterTextBox.cs

@@ -0,0 +1,92 @@
+using System;
+using System.Drawing;
+using System.Windows.Forms;
+
+namespace UAS_LabelMachine.CustomControl
+{
+    public partial class EnterTextBox : TextBox
+    {
+        //传值的备用字符串
+        private string ID1;
+        private string str;
+        private string str1;
+        private string str2;
+
+        public string ID
+        {
+            get
+            {
+                return ID1;
+            }
+
+            set
+            {
+                ID1 = value;
+            }
+        }
+
+        public string Str
+        {
+            get
+            {
+                return str;
+            }
+
+            set
+            {
+                str = value;
+            }
+        }
+
+        public string Str1
+        {
+            get
+            {
+                return str1;
+            }
+
+            set
+            {
+                str1 = value;
+            }
+        }
+
+        public string Str2
+        {
+            get
+            {
+                return str2;
+            }
+
+            set
+            {
+                str2 = value;
+            }
+        }
+
+        public EnterTextBox()
+        {
+            InitializeComponent();
+            this.KeyDown += EnterTextBox_KeyDown;
+        }
+
+        private void EnterTextBox_Enter(object sender, EventArgs e)
+        {
+            this.BackColor = Color.GreenYellow;
+        }
+
+        private void EnterTextBox_Leave(object sender, EventArgs e)
+        {
+            this.BackColor = Color.White;
+        }
+        //手动添加全选功能
+
+        private void EnterTextBox_KeyDown(object sender, KeyEventArgs e)
+        {
+            
+            if (e.Modifiers.CompareTo(Keys.Control) == 0 && e.KeyCode == Keys.A) {
+                this.SelectAll();
+            }
+        }
+    }
+}

+ 123 - 0
UAS-出货标签管理(泽天)/CustomControl/EnterTextBox.resx

@@ -0,0 +1,123 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <metadata name="$this.TrayLargeIcon" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>False</value>
+  </metadata>
+</root>

+ 37 - 0
UAS-出货标签管理(泽天)/CustomControl/GroupBoxWithBorder.Designer.cs

@@ -0,0 +1,37 @@
+namespace UAS_LabelMachine.CustomControl.GroupBoxWithBorder
+{
+    partial class GroupBoxWithBorder
+    {
+        /// <summary> 
+        /// 必需的设计器变量。
+        /// </summary>
+        private System.ComponentModel.IContainer components = null;
+
+        /// <summary> 
+        /// 清理所有正在使用的资源。
+        /// </summary>
+        /// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
+        protected override void Dispose(bool disposing)
+        {
+            if (disposing && (components != null))
+            {
+                components.Dispose();
+            }
+            base.Dispose(disposing);
+        }
+
+        #region 组件设计器生成的代码
+
+        /// <summary> 
+        /// 设计器支持所需的方法 - 不要修改
+        /// 使用代码编辑器修改此方法的内容。
+        /// </summary>
+        private void InitializeComponent()
+        {
+            components = new System.ComponentModel.Container();
+           // this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+        }
+
+        #endregion
+    }
+}

+ 26 - 0
UAS-出货标签管理(泽天)/CustomControl/GroupBoxWithBorder.cs

@@ -0,0 +1,26 @@
+using System.Drawing;
+using System.Windows.Forms;
+
+namespace UAS_LabelMachine.CustomControl.GroupBoxWithBorder
+{
+    public partial class GroupBoxWithBorder : GroupBox
+    {
+        public GroupBoxWithBorder()
+        {
+            InitializeComponent();
+            this.Paint += this.groupBox1_Paint;
+        }
+
+        private void groupBox1_Paint(object sender, PaintEventArgs e)
+        {
+            e.Graphics.Clear(this.BackColor);
+            e.Graphics.DrawString(this.Text, this.Font, Brushes.Black, 10, 1);
+            Pen LineColor = Pens.Gray;
+            e.Graphics.DrawLine(LineColor, 1, 7, 8, 7);
+            e.Graphics.DrawLine(LineColor, e.Graphics.MeasureString(this.Text, this.Font).Width + 8, 7, this.Width - 2, 7);
+            e.Graphics.DrawLine(LineColor, 1, 7, 1, this.Height - 2);
+            e.Graphics.DrawLine(LineColor, 1, this.Height - 2, this.Width - 2, this.Height - 2);
+            e.Graphics.DrawLine(LineColor, this.Width - 2, 7, this.Width - 2, this.Height - 2);
+        }
+    }
+}

+ 73 - 0
UAS-出货标签管理(泽天)/CustomControl/HeadBar.Designer.cs

@@ -0,0 +1,73 @@
+namespace UAS_LabelMachine.CustomControl
+{
+    partial class HeadBar
+    {
+        /// <summary> 
+        /// 必需的设计器变量。
+        /// </summary>
+        private System.ComponentModel.IContainer components = null;
+
+        /// <summary> 
+        /// 清理所有正在使用的资源。
+        /// </summary>
+        /// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
+        protected override void Dispose(bool disposing)
+        {
+            if (disposing && (components != null))
+            {
+                components.Dispose();
+            }
+            base.Dispose(disposing);
+        }
+
+        #region 组件设计器生成的代码
+
+        /// <summary> 
+        /// 设计器支持所需的方法 - 不要修改
+        /// 使用代码编辑器修改此方法的内容。
+        /// </summary>
+        private void InitializeComponent()
+        {
+            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(HeadBar));
+            this.MinWindow = new System.Windows.Forms.PictureBox();
+            this.CloseWindow = new System.Windows.Forms.PictureBox();
+            ((System.ComponentModel.ISupportInitialize)(this.MinWindow)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.CloseWindow)).BeginInit();
+            this.SuspendLayout();
+            // 
+            // MinWindow
+            // 
+            resources.ApplyResources(this.MinWindow, "MinWindow");
+            this.MinWindow.Image = global::UAS_LabelMachine.Properties.Resources.close_up_32px_1181430_easyicon_net;
+            this.MinWindow.Name = "MinWindow";
+            this.MinWindow.TabStop = false;
+            this.MinWindow.Click += new System.EventHandler(this.CloseWindow_Click);
+            // 
+            // CloseWindow
+            // 
+            resources.ApplyResources(this.CloseWindow, "CloseWindow");
+            this.CloseWindow.Image = global::UAS_LabelMachine.Properties.Resources.close_32px_1181428_easyicon_net;
+            this.CloseWindow.Name = "CloseWindow";
+            this.CloseWindow.TabStop = false;
+            this.CloseWindow.Click += new System.EventHandler(this.MinWindow_Click);
+            // 
+            // HeadBar
+            // 
+            resources.ApplyResources(this, "$this");
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+            this.BackColor = System.Drawing.SystemColors.ControlDarkDark;
+            this.Controls.Add(this.MinWindow);
+            this.Controls.Add(this.CloseWindow);
+            this.Name = "HeadBar";
+            ((System.ComponentModel.ISupportInitialize)(this.MinWindow)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.CloseWindow)).EndInit();
+            this.ResumeLayout(false);
+
+        }
+
+        #endregion
+
+        private System.Windows.Forms.PictureBox MinWindow;
+        private System.Windows.Forms.PictureBox CloseWindow;
+    }
+}

+ 68 - 0
UAS-出货标签管理(泽天)/CustomControl/HeadBar.cs

@@ -0,0 +1,68 @@
+using System;
+using System.Collections.Generic;
+using System.Runtime.InteropServices;
+using System.Windows.Forms;
+
+namespace UAS_LabelMachine.CustomControl
+{
+    public partial class HeadBar : UserControl
+    {   
+        //需要关闭前提示窗口的在这里加
+        private List<string> NeedConfirm = new List<string>() {"Main"};
+        [DllImport("user32.dll")]
+        public static extern bool ReleaseCapture();
+        [DllImport("user32.dll")]
+        public static extern bool SendMessage(IntPtr hwnd, int wMsg, int wParam, int lParam);
+        public const int WM_SYSCOMMAND = 0x0112;
+        public const int SC_MOVE = 0xF010;
+        public const int HTCAPTION = 0x0002;
+
+        //定义委托
+        public delegate void OnHeadBarClick(object sender, EventArgs e);
+        //定义事件
+        public event OnHeadBarClick HeadBarDoubleClick;
+
+        public HeadBar()
+        {
+            InitializeComponent();
+        }
+        /// <summary>
+        /// 用于对窗体的关闭,判断主窗体的时候退出程序,非主窗体时关闭该窗体,同时回收内存
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
+        public void CloseWindow_Click(object sender, EventArgs e)
+        {
+            if (this.ParentForm.WindowState == FormWindowState.Normal || this.ParentForm.WindowState == FormWindowState.Maximized)
+            {
+                this.ParentForm.WindowState = FormWindowState.Minimized;
+            }
+        }
+        /// <summary>
+        /// 最小化父级窗体
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
+        private void MinWindow_Click(object sender, EventArgs e)
+        {
+            //判断是否需要关闭前的提示
+            if (NeedConfirm.Contains(this.FindForm().Name))
+            {
+                string logout_confirm = MessageBox.Show(this.ParentForm, "是否关闭", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question).ToString();
+                if (logout_confirm == "Yes")
+                {
+                    this.FindForm().Close();
+                }
+            }
+            else {
+                this.FindForm().Close();
+            }
+          
+        }
+
+        private void panel1_Click(object sender, EventArgs e)
+        {
+            HeadBarDoubleClick?.Invoke(sender, new EventArgs());
+        }
+    }
+}

+ 192 - 0
UAS-出货标签管理(泽天)/CustomControl/HeadBar.resx

@@ -0,0 +1,192 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
+  <data name="MinWindow.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
+    <value>Right</value>
+  </data>
+  <data name="MinWindow.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
+    <value>NoControl</value>
+  </data>
+  <assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
+  <data name="MinWindow.Location" type="System.Drawing.Point, System.Drawing">
+    <value>531, 0</value>
+  </data>
+  <data name="MinWindow.Size" type="System.Drawing.Size, System.Drawing">
+    <value>32, 32</value>
+  </data>
+  <assembly alias="mscorlib" name="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
+  <data name="MinWindow.TabIndex" type="System.Int32, mscorlib">
+    <value>5</value>
+  </data>
+  <data name="&gt;&gt;MinWindow.Name" xml:space="preserve">
+    <value>MinWindow</value>
+  </data>
+  <data name="&gt;&gt;MinWindow.Type" xml:space="preserve">
+    <value>System.Windows.Forms.PictureBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </data>
+  <data name="&gt;&gt;MinWindow.Parent" xml:space="preserve">
+    <value>$this</value>
+  </data>
+  <data name="&gt;&gt;MinWindow.ZOrder" xml:space="preserve">
+    <value>0</value>
+  </data>
+  <data name="CloseWindow.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
+    <value>Right</value>
+  </data>
+  <data name="CloseWindow.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
+    <value>NoControl</value>
+  </data>
+  <data name="CloseWindow.Location" type="System.Drawing.Point, System.Drawing">
+    <value>563, 0</value>
+  </data>
+  <data name="CloseWindow.Size" type="System.Drawing.Size, System.Drawing">
+    <value>32, 32</value>
+  </data>
+  <data name="CloseWindow.TabIndex" type="System.Int32, mscorlib">
+    <value>4</value>
+  </data>
+  <data name="&gt;&gt;CloseWindow.Name" xml:space="preserve">
+    <value>CloseWindow</value>
+  </data>
+  <data name="&gt;&gt;CloseWindow.Type" xml:space="preserve">
+    <value>System.Windows.Forms.PictureBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </data>
+  <data name="&gt;&gt;CloseWindow.Parent" xml:space="preserve">
+    <value>$this</value>
+  </data>
+  <data name="&gt;&gt;CloseWindow.ZOrder" xml:space="preserve">
+    <value>1</value>
+  </data>
+  <metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <data name="$this.AutoScaleDimensions" type="System.Drawing.SizeF, System.Drawing">
+    <value>6, 12</value>
+  </data>
+  <data name="$this.Size" type="System.Drawing.Size, System.Drawing">
+    <value>595, 32</value>
+  </data>
+  <data name="&gt;&gt;$this.Name" xml:space="preserve">
+    <value>HeadBar</value>
+  </data>
+  <data name="&gt;&gt;$this.Type" xml:space="preserve">
+    <value>System.Windows.Forms.UserControl, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </data>
+</root>

+ 127 - 0
UAS-出货标签管理(泽天)/CustomControl/HeadBar.zu.resx

@@ -0,0 +1,127 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
+  <data name="CloseWindow.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
+    <value>NoControl</value>
+  </data>
+  <data name="MinWindow.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
+    <value>NoControl</value>
+  </data>
+</root>

+ 20 - 0
UAS-出货标签管理(泽天)/CustomControl/LoadingCircle.Designer.cs

@@ -0,0 +1,20 @@
+//#####################################################################################
+//★★★★★★★           http://www.cnpopsoft.com [华普软件]           ★★★★★★★
+//★★★★★★★           华普软件-VB、C#专业论文与源码荟萃!           ★★★★★★★
+//#####################################################################################
+
+namespace UAS_MES.CustomControl.SetLoading
+{
+    partial class LoadingCircle
+    {
+        /// <summary>
+        /// Required designer variable.
+        /// </summary>
+        //private System.ComponentModel.IContainer components = null;
+
+        /// <summary>
+        /// Clean up any resources being used.
+        /// </summary>
+  
+    }
+}

+ 474 - 0
UAS-出货标签管理(泽天)/CustomControl/LoadingCircle.cs

@@ -0,0 +1,474 @@
+//#####################################################################################
+//★★★★★★★           http://www.cnpopsoft.com [华普软件]           ★★★★★★★
+//★★★★★★★           华普软件-VB、C#专业论文与源码荟萃!           ★★★★★★★
+//#####################################################################################
+
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Drawing.Drawing2D;
+using System.Text;
+using System.Windows.Forms;
+
+namespace UAS_LabelMachine.CustomControl.SetLoading
+{
+    public partial class  LoadingCircle : Control
+    {
+        #region 常数
+
+        private const double NumberOfDegreesInCircle = 360;
+        private const double NumberOfDegreesInHalfCircle = NumberOfDegreesInCircle / 2;
+        private const int DefaultInnerCircleRadius = 8;
+        private const int DefaultOuterCircleRadius = 10;
+        private const int DefaultNumberOfSpoke = 10;
+        private const int DefaultSpokeThickness = 4;
+        private readonly Color DefaultColor = Color.DarkGray;
+
+        private const int MacOSXInnerCircleRadius = 5;
+        private const int MacOSXOuterCircleRadius = 11;
+        private const int MacOSXNumberOfSpoke = 12;
+        private const int MacOSXSpokeThickness = 2;
+
+        private const int FireFoxInnerCircleRadius = 6;
+        private const int FireFoxOuterCircleRadius = 7;
+        private const int FireFoxNumberOfSpoke = 9;
+        private const int FireFoxSpokeThickness = 4;
+
+        private const int IE7InnerCircleRadius = 8;
+        private const int IE7OuterCircleRadius = 9;
+        private const int IE7NumberOfSpoke = 24;
+        private const int IE7SpokeThickness = 4;
+
+        #endregion
+
+        #region 枚举
+
+        public enum StylePresets
+        {
+            MacOSX,
+            Firefox,
+            IE7,
+            Custom
+        }
+
+        #endregion
+
+        #region 局部变量
+
+        private Timer m_Timer;
+        private bool m_IsTimerActive;
+        private int m_NumberOfSpoke;
+        private int m_SpokeThickness;
+        private int m_ProgressValue;
+        private int m_OuterCircleRadius;
+        private int m_InnerCircleRadius;
+        private PointF m_CenterPoint;
+        private Color m_Color;
+        private Color[] m_Colors;
+        private double[] m_Angles;
+        private StylePresets m_StylePreset;
+
+        #endregion
+
+        #region 属性
+
+        /// <summary>
+        /// 获取和设置控件高亮色
+        /// </summary>
+        /// <value>高亮色</value>
+        [TypeConverter("System.Drawing.ColorConverter"),
+        Category("LoadingCircle"),
+        Description("获取和设置控件高亮色")]
+        public Color Color
+        {
+            get
+            {
+                return m_Color;
+            }
+            set
+            {
+                m_Color = value;
+
+                GenerateColorsPallet();
+                Invalidate();
+            }
+        }
+
+        /// <summary>
+        /// 获取和设置外围半径
+        /// </summary>
+        /// <value>外围半径</value>
+        [System.ComponentModel.Description("获取和设置外围半径"),
+         System.ComponentModel.Category("LoadingCircle")]
+        public int OuterCircleRadius
+        {
+            get
+            {
+                if (m_OuterCircleRadius == 0)
+                    m_OuterCircleRadius = DefaultOuterCircleRadius;
+
+                return m_OuterCircleRadius;
+            }
+            set
+            {
+                m_OuterCircleRadius = value;
+                Invalidate();
+            }
+        }
+
+        /// <summary>
+        /// 获取和设置内圆半径
+        /// </summary>
+        /// <value>内圆半径</value>
+        [System.ComponentModel.Description("获取和设置内圆半径"),
+         System.ComponentModel.Category("LoadingCircle")]
+        public int InnerCircleRadius
+        {
+            get
+            {
+                if (m_InnerCircleRadius == 0)
+                    m_InnerCircleRadius = DefaultInnerCircleRadius;
+
+                return m_InnerCircleRadius;
+            }
+            set
+            {
+                m_InnerCircleRadius = value;
+                Invalidate();
+            }
+        }
+
+        /// <summary>
+        /// 获取和设置辐条数量
+        /// </summary>
+        /// <value>辐条数量</value>
+        [System.ComponentModel.Description("获取和设置辐条数量"),
+        System.ComponentModel.Category("LoadingCircle")]
+        public int NumberSpoke
+        {
+            get
+            {
+                if (m_NumberOfSpoke == 0)
+                    m_NumberOfSpoke = DefaultNumberOfSpoke;
+
+                return m_NumberOfSpoke;
+            }
+            set
+            {
+                if (m_NumberOfSpoke != value && m_NumberOfSpoke > 0)
+                {
+                    m_NumberOfSpoke = value;
+                    GenerateColorsPallet();
+                    GetSpokesAngles();
+
+                    Invalidate();
+                }
+            }
+        }
+
+        /// <summary>
+        /// 获取和设置一个布尔值,表示当前控件<see cref="T:LoadingCircle"/>是否激活。
+        /// </summary>
+        /// <value><c>true</c> 表示激活;否则,为<c>false</c>。</value>
+        [System.ComponentModel.Description("获取和设置一个布尔值,表示当前控件是否激活。"),
+        System.ComponentModel.Category("LoadingCircle")]
+        public bool Active
+        {
+            get
+            {
+                return m_IsTimerActive;
+            }
+            set
+            {
+                m_IsTimerActive = value;
+                ActiveTimer();
+            }
+        }
+
+        /// <summary>
+        /// 获取和设置辐条粗细程度。
+        /// </summary>
+        /// <value>辐条粗细值</value>
+        [System.ComponentModel.Description("获取和设置辐条粗细程度。"),
+        System.ComponentModel.Category("LoadingCircle")]
+        public int SpokeThickness
+        {
+            get
+            {
+                if (m_SpokeThickness <= 0)
+                    m_SpokeThickness = DefaultSpokeThickness;
+
+                return m_SpokeThickness;
+            }
+            set
+            {
+                m_SpokeThickness = value;
+                Invalidate();
+            }
+        }
+
+        /// <summary>
+        /// 获取和设置旋转速度。
+        /// </summary>
+        /// <value>旋转速度</value>
+        [System.ComponentModel.Description("获取和设置旋转速度。"),
+        System.ComponentModel.Category("LoadingCircle")]
+        public int RotationSpeed
+        {
+            get
+            {
+                return m_Timer.Interval;
+            }
+            set
+            {
+                if (value > 0)
+                    m_Timer.Interval = value;
+            }
+        }
+
+        /// <summary>
+        /// 快速设置预定义风格。
+        /// </summary>
+        /// <value>风格的值</value>
+        [Category("LoadingCircle"),
+        Description("快速设置预定义风格。"),
+         DefaultValue(typeof(StylePresets), "Custom")]
+        public StylePresets StylePreset
+        {
+            get { return m_StylePreset; }
+            set
+            {
+                m_StylePreset = value;
+
+                switch (m_StylePreset)
+                {
+                    case StylePresets.MacOSX:
+                        SetCircleAppearance(MacOSXNumberOfSpoke,
+                            MacOSXSpokeThickness, MacOSXInnerCircleRadius,
+                            MacOSXOuterCircleRadius);
+                        break;
+                    case StylePresets.Firefox:
+                        SetCircleAppearance(FireFoxNumberOfSpoke,
+                            FireFoxSpokeThickness, FireFoxInnerCircleRadius,
+                            FireFoxOuterCircleRadius);
+                        break;
+                    case StylePresets.IE7:
+                        SetCircleAppearance(IE7NumberOfSpoke,
+                            IE7SpokeThickness, IE7InnerCircleRadius,
+                            IE7OuterCircleRadius);
+                        break;
+                    case StylePresets.Custom:
+                        SetCircleAppearance(DefaultNumberOfSpoke,
+                            DefaultSpokeThickness,
+                            DefaultInnerCircleRadius,
+                            DefaultOuterCircleRadius);
+                        break;
+                }
+            }
+        }
+
+        #endregion
+
+        #region 构造函数及事件处理
+
+        public LoadingCircle()
+        {
+            SetStyle(ControlStyles.UserPaint, true);
+            SetStyle(ControlStyles.OptimizedDoubleBuffer, true);
+            SetStyle(ControlStyles.ResizeRedraw, true);
+            SetStyle(ControlStyles.SupportsTransparentBackColor, true);
+
+            m_Color = DefaultColor;
+
+            GenerateColorsPallet();
+            GetSpokesAngles();
+            GetControlCenterPoint();
+
+            m_Timer = new Timer();
+            m_Timer.Tick += new EventHandler(aTimer_Tick);
+            ActiveTimer();
+
+            this.Resize += new EventHandler(LoadingCircle_Resize);
+        }
+
+        void LoadingCircle_Resize(object sender, EventArgs e)
+        {
+            GetControlCenterPoint();
+        }
+
+        void aTimer_Tick(object sender, EventArgs e)
+        {
+            m_ProgressValue = ++m_ProgressValue % m_NumberOfSpoke;
+            Invalidate();
+        }
+
+        protected override void OnPaint(PaintEventArgs e)
+        {
+            if (m_NumberOfSpoke > 0)
+            {
+                e.Graphics.SmoothingMode = SmoothingMode.HighQuality;
+
+                int intPosition = m_ProgressValue;
+                for (int intCounter = 0; intCounter < m_NumberOfSpoke; intCounter++)
+                {
+                    intPosition = intPosition % m_NumberOfSpoke;
+                    DrawLine(e.Graphics,
+                             GetCoordinate(m_CenterPoint, m_InnerCircleRadius, m_Angles[intPosition]),
+                             GetCoordinate(m_CenterPoint, m_OuterCircleRadius, m_Angles[intPosition]),
+                             m_Colors[intCounter], m_SpokeThickness);
+                    intPosition++;
+                }
+            }
+
+            base.OnPaint(e);
+        }
+
+        #endregion
+
+        #region 局部方法
+
+        private Color Darken(Color _objColor, int _intPercent)
+        {
+            int intRed = _objColor.R;
+            int intGreen = _objColor.G;
+            int intBlue = _objColor.B;
+            return Color.FromArgb(_intPercent, Math.Min(intRed, byte.MaxValue), Math.Min(intGreen, byte.MaxValue), Math.Min(intBlue, byte.MaxValue));
+        }
+
+        private void GenerateColorsPallet()
+        {
+            m_Colors = GenerateColorsPallet(m_Color, Active, m_NumberOfSpoke);
+        }
+
+        private Color[] GenerateColorsPallet(Color _objColor, bool _blnShadeColor, int _intNbSpoke)
+        {
+            Color[] objColors = new Color[NumberSpoke];
+
+            byte bytIncrement = (byte)(byte.MaxValue / NumberSpoke);
+
+            byte PERCENTAGE_OF_DARKEN = 0;
+
+            for (int intCursor = 0; intCursor < NumberSpoke; intCursor++)
+            {
+                if (_blnShadeColor)
+                {
+                    if (intCursor == 0 || intCursor < NumberSpoke - _intNbSpoke)
+                        objColors[intCursor] = _objColor;
+                    else
+                    {
+                        PERCENTAGE_OF_DARKEN += bytIncrement;
+
+                        if (PERCENTAGE_OF_DARKEN > byte.MaxValue)
+                            PERCENTAGE_OF_DARKEN = byte.MaxValue;
+
+                        objColors[intCursor] = Darken(_objColor, PERCENTAGE_OF_DARKEN);
+                    }
+                }
+                else
+                    objColors[intCursor] = _objColor;
+            }
+
+            return objColors;
+        }
+
+        private void GetControlCenterPoint()
+        {
+            m_CenterPoint = GetControlCenterPoint(this);
+        }
+
+        private PointF GetControlCenterPoint(Control _objControl)
+        {
+            return new PointF(_objControl.Width / 2, _objControl.Height / 2 - 1);
+        }
+
+        private void DrawLine(Graphics _objGraphics, PointF _objPointOne, PointF _objPointTwo,
+                              Color _objColor, int _intLineThickness)
+        {
+            using (Pen objPen = new Pen(new SolidBrush(_objColor), _intLineThickness))
+            {
+                objPen.StartCap = LineCap.Round;
+                objPen.EndCap = LineCap.Round;
+                _objGraphics.DrawLine(objPen, _objPointOne, _objPointTwo);
+            }
+        }
+
+        private PointF GetCoordinate(PointF _objCircleCenter, int _intRadius, double _dblAngle)
+        {
+            double dblAngle = Math.PI * _dblAngle / NumberOfDegreesInHalfCircle;
+
+            return new PointF(_objCircleCenter.X + _intRadius * (float)Math.Cos(dblAngle),
+                              _objCircleCenter.Y + _intRadius * (float)Math.Sin(dblAngle));
+        }
+
+        private void GetSpokesAngles()
+        {
+            m_Angles = GetSpokesAngles(NumberSpoke);
+        }
+
+        private double[] GetSpokesAngles(int _intNumberSpoke)
+        {
+            double[] Angles = new double[_intNumberSpoke];
+            double dblAngle = (double)NumberOfDegreesInCircle / _intNumberSpoke;
+
+            for (int shtCounter = 0; shtCounter < _intNumberSpoke; shtCounter++)
+                Angles[shtCounter] = (shtCounter == 0 ? dblAngle : Angles[shtCounter - 1] + dblAngle);
+
+            return Angles;
+        }
+
+        private void ActiveTimer()
+        {
+            if (m_IsTimerActive)
+                m_Timer.Start();
+            else
+            {
+                m_Timer.Stop();
+                m_ProgressValue = 0;
+            }
+
+            GenerateColorsPallet();
+            Invalidate();
+        }
+
+        #endregion
+
+        #region 全局方法
+
+        /// <summary>
+        /// 获取适合控件区域的矩形大小。
+        /// </summary>
+        /// <param name="proposedSize">The custom-sized area for a control.</param>
+        /// <returns>
+        /// An ordered pair of type <see cref="T:System.Drawing.Size"></see> representing the width and height of a rectangle.
+        /// </returns>
+        public override Size GetPreferredSize(Size proposedSize)
+        {
+            proposedSize.Width =
+                (m_OuterCircleRadius + m_SpokeThickness) * 2;
+
+            return proposedSize;
+        }
+
+        /// <summary>
+        /// 设置控件的外观
+        /// </summary>
+        /// <param name="numberSpoke">条数</param>
+        /// <param name="spokeThickness">粗细</param>
+        /// <param name="innerCircleRadius">内圆半径</param>
+        /// <param name="outerCircleRadius">外圆半径</param>
+        public void SetCircleAppearance(int numberSpoke, int spokeThickness,
+            int innerCircleRadius, int outerCircleRadius)
+        {
+            NumberSpoke = numberSpoke;
+            SpokeThickness = spokeThickness;
+            InnerCircleRadius = innerCircleRadius;
+            OuterCircleRadius = outerCircleRadius;
+
+            Invalidate();
+        }
+
+        #endregion
+    }
+}

+ 37 - 0
UAS-出货标签管理(泽天)/CustomControl/NormalButton.Designer.cs

@@ -0,0 +1,37 @@
+namespace UAS_LabelMachine.CustomControl
+{
+    partial class NormalButton
+    {
+        /// <summary> 
+        /// 必需的设计器变量。
+        /// </summary>
+        private System.ComponentModel.IContainer components = null;
+
+        /// <summary> 
+        /// 清理所有正在使用的资源。
+        /// </summary>
+        /// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
+        protected override void Dispose(bool disposing)
+        {
+            if (disposing && (components != null))
+            {
+                components.Dispose();
+            }
+            base.Dispose(disposing);
+        }
+
+        #region 组件设计器生成的代码
+
+        /// <summary> 
+        /// 设计器支持所需的方法 - 不要修改
+        /// 使用代码编辑器修改此方法的内容。
+        /// </summary>
+        private void InitializeComponent()
+        {
+            components = new System.ComponentModel.Container();
+           // this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+        }
+
+        #endregion
+    }
+}

+ 15 - 0
UAS-出货标签管理(泽天)/CustomControl/NormalButton.cs

@@ -0,0 +1,15 @@
+using System.Windows.Forms;
+
+using UAS_LabelMachine.Properties;
+
+namespace UAS_LabelMachine.CustomControl
+{
+    public partial class NormalButton : Button
+    {
+        public NormalButton()
+        {
+            InitializeComponent();
+            Image = Resources._46;
+        }
+    }
+}

+ 44 - 0
UAS-出货标签管理(泽天)/CustomControl/NumOnlyTextBox.Designer.cs

@@ -0,0 +1,44 @@
+namespace UAS_LabelMachine.CustomControl
+{
+    partial class NumOnlyTextBox
+    {
+        /// <summary> 
+        /// 必需的设计器变量。
+        /// </summary>
+        private System.ComponentModel.IContainer components = null;
+
+        /// <summary> 
+        /// 清理所有正在使用的资源。
+        /// </summary>
+        /// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
+        protected override void Dispose(bool disposing)
+        {
+            if (disposing && (components != null))
+            {
+                components.Dispose();
+            }
+            base.Dispose(disposing);
+        }
+
+        #region 组件设计器生成的代码
+
+        /// <summary> 
+        /// 设计器支持所需的方法 - 不要修改
+        /// 使用代码编辑器修改此方法的内容。
+        /// </summary>
+        private void InitializeComponent()
+        {
+            this.SuspendLayout();
+            // 
+            // NumOnlyTextBox
+            // 
+            this.Enter += new System.EventHandler(this.NumOnlyTextBox_Enter);
+            this.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.NumOnlyTextBox_KeyPress);
+            this.Leave += new System.EventHandler(this.NumOnlyTextBox_Leave);
+            this.ResumeLayout(false);
+
+        }
+
+        #endregion
+    }
+}

+ 48 - 0
UAS-出货标签管理(泽天)/CustomControl/NumOnlyTextBox.cs

@@ -0,0 +1,48 @@
+using System;
+using System.Drawing;
+using System.Windows.Forms;
+
+namespace UAS_LabelMachine.CustomControl
+{
+    public partial class NumOnlyTextBox : TextBox
+    {
+        private bool Negative1;
+
+        public NumOnlyTextBox()
+        {
+            InitializeComponent();
+        }
+        //通过标识来判断是否允许输入负数
+        public bool Negative
+        {
+            get
+            {
+                return Negative1;
+            }
+
+            set
+            {
+                Negative1 = value;
+            }
+        }
+
+        private void NumOnlyTextBox_KeyPress(object sender, KeyPressEventArgs e)
+        {
+            // 允许输入:数字、退格键(8)、全选(1)、复制(3)、粘贴(22)
+            if (!char.IsDigit(e.KeyChar) && e.KeyChar != 8 && e.KeyChar != 1 && e.KeyChar != 3 && e.KeyChar != 22)
+            {
+                e.Handled = true;
+            }
+        }
+
+        private void NumOnlyTextBox_Leave(object sender, EventArgs e)
+        {
+            this.BackColor = Color.White;
+        }
+
+        private void NumOnlyTextBox_Enter(object sender, EventArgs e)
+        {
+            this.BackColor = Color.GreenYellow;
+        }
+    }
+}

+ 123 - 0
UAS-出货标签管理(泽天)/CustomControl/NumOnlyTextBox.resx

@@ -0,0 +1,123 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <metadata name="$this.TrayLargeIcon" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>False</value>
+  </metadata>
+</root>

+ 269 - 0
UAS-出货标签管理(泽天)/CustomControl/Pagination.Designer.cs

@@ -0,0 +1,269 @@
+using UAS_LabelMachine;
+namespace UAS_LabelMachine.CustomControl
+{
+    partial class Pagination
+    {
+        /// <summary> 
+        /// 必需的设计器变量。
+        /// </summary>
+        private System.ComponentModel.IContainer components = null;
+
+        /// <summary> 
+        /// 清理所有正在使用的资源。
+        /// </summary>
+        /// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
+        protected override void Dispose(bool disposing)
+        {
+            if (disposing && (components != null))
+            {
+                components.Dispose();
+            }
+            base.Dispose(disposing);
+        }
+
+        #region 组件设计器生成的代码
+
+        /// <summary> 
+        /// 设计器支持所需的方法 - 不要修改
+        /// 使用代码编辑器修改此方法的内容。
+        /// </summary>
+        private void InitializeComponent()
+        {
+            this.components = new System.ComponentModel.Container();
+            this.panel1 = new System.Windows.Forms.Panel();
+            this.ShowItemsNum = new System.Windows.Forms.ComboBox();
+            this.UpLoadData = new System.Windows.Forms.PictureBox();
+            this.DownLoadTemplet = new System.Windows.Forms.PictureBox();
+            this.Delete = new System.Windows.Forms.PictureBox();
+            this.ExportExcel = new System.Windows.Forms.PictureBox();
+            this.label2 = new System.Windows.Forms.Label();
+            this.TotalPage = new System.Windows.Forms.Label();
+            this.CurrentPage = new System.Windows.Forms.TextBox();
+            this.PreviousPage = new System.Windows.Forms.PictureBox();
+            this.LastPage = new System.Windows.Forms.PictureBox();
+            this.NextPage = new System.Windows.Forms.PictureBox();
+            this.FirstPage = new System.Windows.Forms.PictureBox();
+            this.folderBrowserDialog1 = new System.Windows.Forms.FolderBrowserDialog();
+            this.toolTip1 = new System.Windows.Forms.ToolTip(this.components);
+            this.openFileDialog1 = new System.Windows.Forms.OpenFileDialog();
+            this.panel1.SuspendLayout();
+            ((System.ComponentModel.ISupportInitialize)(this.UpLoadData)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.DownLoadTemplet)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.Delete)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.ExportExcel)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.PreviousPage)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.LastPage)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.NextPage)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.FirstPage)).BeginInit();
+            this.SuspendLayout();
+            // 
+            // panel1
+            // 
+            this.panel1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
+            | System.Windows.Forms.AnchorStyles.Left)));
+            this.panel1.BackColor = System.Drawing.SystemColors.Control;
+            this.panel1.Controls.Add(this.ShowItemsNum);
+            this.panel1.Controls.Add(this.UpLoadData);
+            this.panel1.Controls.Add(this.DownLoadTemplet);
+            this.panel1.Controls.Add(this.Delete);
+            this.panel1.Controls.Add(this.ExportExcel);
+            this.panel1.Controls.Add(this.label2);
+            this.panel1.Controls.Add(this.TotalPage);
+            this.panel1.Controls.Add(this.CurrentPage);
+            this.panel1.Controls.Add(this.PreviousPage);
+            this.panel1.Controls.Add(this.LastPage);
+            this.panel1.Controls.Add(this.NextPage);
+            this.panel1.Controls.Add(this.FirstPage);
+            this.panel1.Cursor = System.Windows.Forms.Cursors.Default;
+            this.panel1.Location = new System.Drawing.Point(0, 0);
+            this.panel1.Name = "panel1";
+            this.panel1.Size = new System.Drawing.Size(543, 32);
+            this.panel1.TabIndex = 0;
+            // 
+            // ShowItemsNum
+            // 
+            this.ShowItemsNum.FormattingEnabled = true;
+            this.ShowItemsNum.Items.AddRange(new object[] {
+            "40",
+            "35",
+            "30",
+            "25",
+            "20",
+            "15",
+            "10",
+            "5"});
+            this.ShowItemsNum.Location = new System.Drawing.Point(246, 6);
+            this.ShowItemsNum.Name = "ShowItemsNum";
+            this.ShowItemsNum.Size = new System.Drawing.Size(36, 20);
+            this.ShowItemsNum.TabIndex = 13;
+            this.ShowItemsNum.Text = "20";
+            this.ShowItemsNum.SelectedValueChanged += new System.EventHandler(this.ShowItemsNum_SelectedValueChanged);
+            this.ShowItemsNum.KeyDown += new System.Windows.Forms.KeyEventHandler(this.ShowItemsNum_KeyDown);
+            // 
+            // UpLoadData
+            // 
+            this.UpLoadData.Cursor = System.Windows.Forms.Cursors.Hand;
+            this.UpLoadData.Location = new System.Drawing.Point(385, 9);
+            this.UpLoadData.Name = "UpLoadData";
+            this.UpLoadData.Size = new System.Drawing.Size(16, 16);
+            this.UpLoadData.TabIndex = 12;
+            this.UpLoadData.TabStop = false;
+            this.UpLoadData.Click += new System.EventHandler(this.UpLoadData_Click);
+            // 
+            // DownLoadTemplet
+            // 
+            this.DownLoadTemplet.Cursor = System.Windows.Forms.Cursors.Hand;
+            this.DownLoadTemplet.Image = global::UAS_LabelMachine.Properties.Resources.download_17_519713261649px_1200629_easyicon_net__1_;
+            this.DownLoadTemplet.Location = new System.Drawing.Point(352, 9);
+            this.DownLoadTemplet.Name = "DownLoadTemplet";
+            this.DownLoadTemplet.Size = new System.Drawing.Size(16, 16);
+            this.DownLoadTemplet.TabIndex = 11;
+            this.DownLoadTemplet.TabStop = false;
+            this.DownLoadTemplet.Visible = false;
+            this.DownLoadTemplet.Click += new System.EventHandler(this.DownLoadTemplet_Click);
+            // 
+            // Delete
+            // 
+            this.Delete.Cursor = System.Windows.Forms.Cursors.Hand;
+            this.Delete.Image = global::UAS_LabelMachine.Properties.Resources.bindingNavigatorDeleteItem_Image;
+            this.Delete.Location = new System.Drawing.Point(292, 8);
+            this.Delete.Name = "Delete";
+            this.Delete.Size = new System.Drawing.Size(16, 18);
+            this.Delete.TabIndex = 9;
+            this.Delete.TabStop = false;
+            this.Delete.Tag = "IfDelete";
+            this.Delete.Click += new System.EventHandler(this.Delete_Click);
+            // 
+            // ExportExcel
+            // 
+            this.ExportExcel.Cursor = System.Windows.Forms.Cursors.Hand;
+            this.ExportExcel.Image = global::UAS_LabelMachine.Properties.Resources.Excel_2010_16px_1180011_easyicon_net;
+            this.ExportExcel.Location = new System.Drawing.Point(320, 8);
+            this.ExportExcel.Name = "ExportExcel";
+            this.ExportExcel.Size = new System.Drawing.Size(16, 18);
+            this.ExportExcel.TabIndex = 8;
+            this.ExportExcel.TabStop = false;
+            this.ExportExcel.Click += new System.EventHandler(this.ExportExcel_Click);
+            // 
+            // label2
+            // 
+            this.label2.AutoSize = true;
+            this.label2.Cursor = System.Windows.Forms.Cursors.Default;
+            this.label2.Location = new System.Drawing.Point(185, 10);
+            this.label2.Name = "label2";
+            this.label2.Size = new System.Drawing.Size(65, 12);
+            this.label2.TabIndex = 6;
+            this.label2.Text = "显示数量:";
+            // 
+            // TotalPage
+            // 
+            this.TotalPage.AutoSize = true;
+            this.TotalPage.Cursor = System.Windows.Forms.Cursors.Default;
+            this.TotalPage.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.TotalPage.Location = new System.Drawing.Point(87, 5);
+            this.TotalPage.Name = "TotalPage";
+            this.TotalPage.Size = new System.Drawing.Size(0, 20);
+            this.TotalPage.TabIndex = 5;
+            // 
+            // CurrentPage
+            // 
+            this.CurrentPage.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.CurrentPage.Location = new System.Drawing.Point(56, 4);
+            this.CurrentPage.Name = "CurrentPage";
+            this.CurrentPage.Size = new System.Drawing.Size(24, 23);
+            this.CurrentPage.TabIndex = 4;
+            this.CurrentPage.Text = "1";
+            this.CurrentPage.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
+            this.CurrentPage.KeyDown += new System.Windows.Forms.KeyEventHandler(this.CurrentPage_KeyDown);
+            // 
+            // PreviousPage
+            // 
+            this.PreviousPage.Cursor = System.Windows.Forms.Cursors.Hand;
+            this.PreviousPage.Image = global::UAS_LabelMachine.Properties.Resources.bindingNavigatorMovePreviousItem_Image;
+            this.PreviousPage.Location = new System.Drawing.Point(37, 8);
+            this.PreviousPage.Name = "PreviousPage";
+            this.PreviousPage.Size = new System.Drawing.Size(15, 15);
+            this.PreviousPage.TabIndex = 3;
+            this.PreviousPage.TabStop = false;
+            this.PreviousPage.Click += new System.EventHandler(this.PreviousPage_Click);
+            // 
+            // LastPage
+            // 
+            this.LastPage.Cursor = System.Windows.Forms.Cursors.Hand;
+            this.LastPage.Image = global::UAS_LabelMachine.Properties.Resources.bindingNavigatorMoveLastItem_Image;
+            this.LastPage.Location = new System.Drawing.Point(157, 8);
+            this.LastPage.Name = "LastPage";
+            this.LastPage.Size = new System.Drawing.Size(15, 15);
+            this.LastPage.TabIndex = 2;
+            this.LastPage.TabStop = false;
+            this.LastPage.Click += new System.EventHandler(this.LastPage_Click);
+            // 
+            // NextPage
+            // 
+            this.NextPage.Cursor = System.Windows.Forms.Cursors.Hand;
+            this.NextPage.Image = global::UAS_LabelMachine.Properties.Resources.bindingNavigatorMoveNextItem_Image;
+            this.NextPage.Location = new System.Drawing.Point(133, 8);
+            this.NextPage.Margin = new System.Windows.Forms.Padding(3, 3, 3, 20);
+            this.NextPage.Name = "NextPage";
+            this.NextPage.Size = new System.Drawing.Size(15, 15);
+            this.NextPage.TabIndex = 1;
+            this.NextPage.TabStop = false;
+            this.NextPage.Click += new System.EventHandler(this.NextPage_Click);
+            // 
+            // FirstPage
+            // 
+            this.FirstPage.Cursor = System.Windows.Forms.Cursors.Hand;
+            this.FirstPage.Image = global::UAS_LabelMachine.Properties.Resources.bindingNavigatorMoveFirstItem_Image;
+            this.FirstPage.Location = new System.Drawing.Point(16, 8);
+            this.FirstPage.Name = "FirstPage";
+            this.FirstPage.Size = new System.Drawing.Size(15, 15);
+            this.FirstPage.TabIndex = 0;
+            this.FirstPage.TabStop = false;
+            this.FirstPage.Click += new System.EventHandler(this.FirstPage_Click);
+            // 
+            // openFileDialog1
+            // 
+            this.openFileDialog1.FileName = "openFileDialog1";
+            // 
+            // Pagination
+            // 
+            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+            this.Controls.Add(this.panel1);
+            this.Cursor = System.Windows.Forms.Cursors.Hand;
+            this.Name = "Pagination";
+            this.Size = new System.Drawing.Size(543, 32);
+            this.panel1.ResumeLayout(false);
+            this.panel1.PerformLayout();
+            ((System.ComponentModel.ISupportInitialize)(this.UpLoadData)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.DownLoadTemplet)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.Delete)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.ExportExcel)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.PreviousPage)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.LastPage)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.NextPage)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.FirstPage)).EndInit();
+            this.ResumeLayout(false);
+
+        }
+
+        #endregion
+
+        private System.Windows.Forms.Panel panel1;
+        private System.Windows.Forms.Label TotalPage;
+        private System.Windows.Forms.TextBox CurrentPage;
+        private System.Windows.Forms.PictureBox PreviousPage;
+        private System.Windows.Forms.PictureBox LastPage;
+        private System.Windows.Forms.PictureBox NextPage;
+        private System.Windows.Forms.PictureBox FirstPage;
+        private System.Windows.Forms.PictureBox ExportExcel;
+        private System.Windows.Forms.Label label2;
+        private System.Windows.Forms.FolderBrowserDialog folderBrowserDialog1;
+        private System.Windows.Forms.PictureBox Delete;
+        private System.Windows.Forms.PictureBox DownLoadTemplet;
+        private System.Windows.Forms.PictureBox UpLoadData;
+        private System.Windows.Forms.ToolTip toolTip1;
+        private System.Windows.Forms.OpenFileDialog openFileDialog1;
+        private System.Windows.Forms.ComboBox ShowItemsNum;
+    }
+}

+ 310 - 0
UAS-出货标签管理(泽天)/CustomControl/Pagination.cs

@@ -0,0 +1,310 @@
+using System;
+using System.Data;
+using System.IO;
+using System.Windows.Forms;
+
+namespace UAS_LabelMachine.CustomControl
+{
+    public partial class Pagination : UserControl
+    {
+        //申明一些全局变量用来在函数之间传递参数
+        int PageSize;
+        int Current_Page;
+        int TotalPageCount;
+        int RowCount;
+        string Table_ID;
+        string TableName;
+        string Caller;
+        string Field;
+        DataGridViewImageColumn dgic = null;
+        string Condition;
+
+        DataGridView Dgv;
+        DataTable dt;
+        DataHelper dh;
+        public Pagination()
+        {
+            InitializeComponent();
+            //鼠标经过控件的时候显示文字
+            dh = new DataHelper();
+            toolTip1.SetToolTip(DownLoadTemplet, "下载模板");
+            toolTip1.SetToolTip(UpLoadData, "上传数据");
+            toolTip1.SetToolTip(ExportExcel, "导出数据");
+            toolTip1.SetToolTip(Delete, "删除数据");
+            toolTip1.SetToolTip(FirstPage, "第一页");
+            toolTip1.SetToolTip(PreviousPage, "上一页");
+            toolTip1.SetToolTip(NextPage, "下一页");
+            toolTip1.SetToolTip(LastPage, "最后一页");
+        }
+        public delegate void OnCheckedChange(object sender, EventArgs e);
+
+        //定义事件
+        public event OnCheckedChange UserControlCheckedChanged;
+
+        /// <summary>
+        /// 将数据绑定到数据源
+        /// </summary>
+        /// <param name="dgv"></param>
+        /// <param name="TableName"></param>
+        /// <param name="Field"></param>
+        public void BindDataToNavigator(DataGridView dgv, string tableName, string field, string ID, string caller, string condition, params DataGridViewImageColumn[] operate)
+        {
+            //将传来的值赋给全局变量
+            Dgv = dgv;
+            TableName = tableName;
+            Table_ID = ID;
+            Caller = caller;
+            Field = field;
+            Condition = condition;
+            //每页显示的数据数量
+            PageSize = int.Parse(this.ShowItemsNum.Text);
+            //当前在多少页
+            Current_Page = int.Parse(this.CurrentPage.Text);
+            //获取记录的总行数
+            RowCount = dh.getRowCount(TableName);
+            //分页获取数据,先取第一页的
+            dt = dh.getFieldsDatasByPageing(TableName, field, Current_Page, PageSize, Caller, condition);
+            //给BindingSource指定一个DataTable
+            RefreshTotalCount();
+            //给父控件的DataGridView绑定数据
+            dgv.DataSource = dt;
+
+            dt.Dispose();
+            for (int i = 0; i < operate.Length; i++)
+            {
+                dgic = operate[i];
+                AddOperateColumnToDgv();
+            }
+        }
+
+        //获取分页的数据
+        public void GetPageData()
+        {
+            this.TotalPage.Text = "/ " + TotalPageCount.ToString();
+            CurrentPage.Text = Current_Page.ToString();
+            //取分页数据
+            dt = dh.getFieldsDatasByPageing(TableName, Field, Current_Page, PageSize, Caller, Condition);
+            //赋值给父窗体的DataGridView
+            Dgv.DataSource = dt;
+            AddOperateColumnToDgv();
+        }
+
+        //判断是否需要添加操作列
+        private void AddOperateColumnToDgv()
+        {
+            if (dgic != null)
+            {
+                if (Dgv.Columns[dgic.Name] != null)
+                {
+                    Dgv.Columns.Remove(Dgv.Columns[dgic.Name]);
+                }
+                dgic.DisplayIndex = Dgv.Columns.Count;
+                Dgv.Columns.Add(dgic);
+            }
+        }
+
+        //第一页
+        private void FirstPage_Click(object sender, EventArgs e)
+        {
+            Current_Page = 1;
+            GetPageData();
+            RefreshTotalCount();
+        }
+
+        //往前翻一页
+        private void PreviousPage_Click(object sender, EventArgs e)
+        {
+            if (Current_Page > 1)
+            {
+                Current_Page--;
+            }
+            GetPageData();
+            RefreshTotalCount();
+        }
+
+        //往后翻一页
+        private void NextPage_Click(object sender, EventArgs e)
+        {
+            if (Current_Page < TotalPageCount)
+            {
+                Current_Page++;
+            }
+            GetPageData();
+            RefreshTotalCount();
+        }
+
+        //最后一页
+        private void LastPage_Click(object sender, EventArgs e)
+        {
+            Current_Page = TotalPageCount;
+            CurrentPage.Text = TotalPageCount.ToString();
+            GetPageData();
+            RefreshTotalCount();
+        }
+
+        private void ExportExcel_Click(object sender, EventArgs e)
+        {
+            ExcelExport("");
+        }
+
+        //用户手动输入页码的时候获取数据
+        private void CurrentPage_KeyDown(object sender, KeyEventArgs e)
+        {
+            //判断用户是否按下回车键
+            if (e.KeyValue == (int)Keys.Enter)
+            {
+                //判断是否是数字类型的
+                Current_Page = int.Parse(CurrentPage.Text);
+                //判断是否是合理的页码
+                if (Current_Page >= 1 && Current_Page <= TotalPageCount)
+                {
+                    GetPageData();
+                }
+                else
+                {
+                    MessageBox.Show("请输入正确的页码");
+                }
+            }
+        }
+
+        //刷新总页数
+        private void RefreshTotalCount()
+        {
+            DataHelper dh = new DataHelper();
+            //获取记录的总行数
+            if (Condition.Trim() != "")
+            {
+                RowCount = dh.getRowCount(TableName, Condition);
+            }
+            else
+            {
+                RowCount = dh.getRowCount(TableName);
+            }
+            //取模后+1来确定总的页数
+            TotalPageCount = RowCount / PageSize + 1;
+            //设置总页数Label显示的值
+            TotalPage.Text = "/ " + TotalPageCount.ToString();
+        }
+
+        //删除按钮
+        private void Delete_Click(object sender, EventArgs e)
+        {
+            UserControlCheckedChanged?.Invoke(sender, new EventArgs());
+            for (int i = 0; i < Dgv.Rows.Count; i++)
+            {
+                if (Dgv.Rows[i].Cells["Choose"].Value != null)
+                {
+                    if ((bool)Dgv.Rows[i].Cells["Choose"].Value == true)
+                    {
+                        Dgv.Rows[i].Selected = true;
+                    }
+                }
+            }
+
+            string[] DeleteID = new string[Dgv.SelectedRows.Count];
+            DataTable dt = (DataTable)Dgv.DataSource;
+            string getIDColumnName = "";
+            //取列的描述,对应的主键的ID
+            foreach (DataColumn dc in dt.Columns)
+            {
+                if (dc.ColumnName == Table_ID)
+                {
+                    getIDColumnName = dc.Caption;
+                }
+            }
+            for (int i = 0; i < Dgv.SelectedRows.Count; i++)
+            {
+                DeleteID[i] = Dgv.SelectedRows[i].Cells[Table_ID].Value.ToString();
+            }
+            DataHelper dh = new DataHelper();
+            //取的配置的数据是从DataTable里面判断的,取的是固定字段的Dgv用第二种
+            string tablename = TableName;
+            if (TableName.Contains("join"))
+            {
+                tablename = TableName.Substring(0, TableName.IndexOf("left")).Trim();
+            }
+            dh.DeleteDataByID(tablename, getIDColumnName == "" ? Table_ID : getIDColumnName, DeleteID);
+            GetPageData();
+            RefreshTotalCount();
+
+        }
+
+        //添加新的数据
+        private void Add_Click(object sender, EventArgs e)
+        {
+            ((DataTable)Dgv.DataSource).Rows.Add();
+        }
+
+        private void DownLoadTemplet_Click(object sender, EventArgs e)
+        {
+            ExcelExport("Templet");
+        }
+
+        //选择导出Excel时是选择导出数据的还是模板
+        private void ExcelExport(string DataOrTemplet)
+        {
+            //Data表示导出数据
+            //Templet表示导出模板
+            DataHelper dh = new DataHelper();
+            folderBrowserDialog1.Description = "选择导出的路径";
+            DialogResult result = folderBrowserDialog1.ShowDialog();
+            if (result == DialogResult.OK)
+            {
+                string FolderPath = folderBrowserDialog1.SelectedPath;
+                ExcelHandler eh = new ExcelHandler();
+                //导出Excel的时候返回一个文件名,用户选择是否打开
+                string filePath = eh.ExportExcel(BaseUtil.GetExportDataTable(Dgv), FolderPath, "客户标签");
+                //用户选择导出之后是否立即打开
+                MessageBoxButtons messButton = MessageBoxButtons.YesNo;
+                string openFile = MessageBox.Show(this.ParentForm, "是否打开文件", "提示", messButton).ToString();
+                if (openFile == "Yes")
+                {
+                    System.Diagnostics.Process.Start(filePath);
+                }
+            }
+        }
+
+        private void UpLoadData_Click(object sender, EventArgs e)
+        {
+            openFileDialog1.Title = "选择需要导入的Excel";
+            if (openFileDialog1.ShowDialog() == DialogResult.OK)
+            {
+                string ChoosedExcel = openFileDialog1.FileName;
+                FileStream fs = new FileStream(ChoosedExcel, FileMode.OpenOrCreate, FileAccess.ReadWrite);
+            }
+        }
+
+        private void ShowItemsNum_SelectedValueChanged(object sender, EventArgs e)
+        {
+            PageSize = int.Parse(ShowItemsNum.SelectedItem.ToString());
+            //推荐合理的行数
+            //int AdviceNum = DgvHeight / DgvRowHeight - 3;
+            if (PageSize >= 1)
+            {
+                RefreshTotalCount();
+                GetPageData();
+            }
+            else
+            {
+                MessageBox.Show("请输入正确的数字");
+            }
+        }
+
+        private void ShowItemsNum_KeyDown(object sender, KeyEventArgs e)
+        {
+            if (e.KeyCode == Keys.Enter)
+            {
+                PageSize = int.Parse(ShowItemsNum.Text);
+                if (PageSize >= 1)
+                {
+                    RefreshTotalCount();
+                    GetPageData();
+                }
+                else
+                {
+                    MessageBox.Show("请输入正确的数字");
+                }
+            }
+        }
+    }
+}

+ 129 - 0
UAS-出货标签管理(泽天)/CustomControl/Pagination.resx

@@ -0,0 +1,129 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <metadata name="folderBrowserDialog1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>17, 17</value>
+  </metadata>
+  <metadata name="toolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>197, 17</value>
+  </metadata>
+  <metadata name="openFileDialog1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>298, 17</value>
+  </metadata>
+</root>

+ 62 - 0
UAS-出货标签管理(泽天)/CustomControl/PrinterCombox.Designer.cs

@@ -0,0 +1,62 @@
+namespace UAS_LabelMachine.CustomControl
+{
+    partial class PrinterCombox
+    {
+        /// <summary> 
+        /// 必需的设计器变量。
+        /// </summary>
+        private System.ComponentModel.IContainer components = null;
+
+        /// <summary> 
+        /// 清理所有正在使用的资源。
+        /// </summary>
+        /// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
+        protected override void Dispose(bool disposing)
+        {
+            if (disposing && (components != null))
+            {
+                components.Dispose();
+            }
+            base.Dispose(disposing);
+        }
+
+        #region 组件设计器生成的代码
+
+        /// <summary> 
+        /// 设计器支持所需的方法 - 不要修改
+        /// 使用代码编辑器修改此方法的内容。
+        /// </summary>
+        private void InitializeComponent()
+        {
+            this.PrinterList = new System.Windows.Forms.ComboBox();
+            this.SuspendLayout();
+            // 
+            // PrinterList
+            // 
+            this.PrinterList.Dock = System.Windows.Forms.DockStyle.Fill;
+            this.PrinterList.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+            this.PrinterList.FormattingEnabled = true;
+            this.PrinterList.Location = new System.Drawing.Point(0, 0);
+            this.PrinterList.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
+            this.PrinterList.Name = "PrinterList";
+            this.PrinterList.Size = new System.Drawing.Size(284, 26);
+            this.PrinterList.TabIndex = 0;
+            // 
+            // PrinterCombox
+            // 
+            this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 18F);
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+            this.Controls.Add(this.PrinterList);
+            this.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
+            this.Name = "PrinterCombox";
+            this.Size = new System.Drawing.Size(284, 28);
+            this.Load += new System.EventHandler(this.PrinterCombox_Load);
+            this.ResumeLayout(false);
+
+        }
+
+        #endregion
+
+        private System.Windows.Forms.ComboBox PrinterList;
+    }
+}

+ 46 - 0
UAS-出货标签管理(泽天)/CustomControl/PrinterCombox.cs

@@ -0,0 +1,46 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Drawing;
+using System.Data;
+using System.Linq;
+using System.Text;
+using System.Windows.Forms;
+using System.Drawing.Printing;
+
+namespace UAS_LabelMachine.CustomControl
+{
+    public partial class PrinterCombox : UserControl
+    {
+        public PrinterCombox()
+        {
+            InitializeComponent();
+        }
+
+        public override string Text
+        {
+            get
+            {
+                return PrinterList.Text; 
+            }
+
+            set
+            {
+                PrinterList.Text = value;
+            }
+        }
+
+        private void PrinterCombox_Load(object sender, EventArgs e)
+        {
+            PrintDocument print = new PrintDocument();
+            string sDefault = print.PrinterSettings.PrinterName;//默认打印机名
+
+            foreach (string sPrint in PrinterSettings.InstalledPrinters)//获取所有打印机名称
+            {
+                PrinterList.Items.Add(sPrint);
+                if (sPrint == sDefault)
+                    PrinterList.SelectedIndex = PrinterList.Items.IndexOf(sPrint);
+            }
+        }
+    }
+}

+ 120 - 0
UAS-出货标签管理(泽天)/CustomControl/PrinterCombox.resx

@@ -0,0 +1,120 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+</root>

+ 36 - 0
UAS-出货标签管理(泽天)/CustomControl/RichTextAutoBottom.Designer.cs

@@ -0,0 +1,36 @@
+namespace UAS_LabelMachine.CustomControl.RichText
+{
+    partial class RichTextAutoBottom
+    {
+        /// <summary> 
+        /// 必需的设计器变量。
+        /// </summary>
+        private System.ComponentModel.IContainer components = null;
+
+        /// <summary> 
+        /// 清理所有正在使用的资源。
+        /// </summary>
+        /// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
+        protected override void Dispose(bool disposing)
+        {
+            if (disposing && (components != null))
+            {
+                components.Dispose();
+            }
+            base.Dispose(disposing);
+        }
+
+        #region 组件设计器生成的代码
+
+        /// <summary> 
+        /// 设计器支持所需的方法 - 不要修改
+        /// 使用代码编辑器修改此方法的内容。
+        /// </summary>
+        private void InitializeComponent()
+        {
+            components = new System.ComponentModel.Container();
+        }
+
+        #endregion
+    }
+}

+ 35 - 0
UAS-出货标签管理(泽天)/CustomControl/RichTextAutoBottom.cs

@@ -0,0 +1,35 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Drawing;
+using System.Data;
+using System.Linq;
+using System.Text;
+using System.Windows.Forms;
+
+namespace UAS_LabelMachine.CustomControl.RichText
+{
+    public partial class RichTextAutoBottom : RichTextBox
+    {
+        public RichTextAutoBottom()
+        {
+            InitializeComponent();
+            TextChanged += RichTextBox_TextChange;
+            
+        }
+        private void RichTextBox_TextChange(object sender,EventArgs e)
+        {
+            SelectionStart = Text.Length; 
+            ScrollToCaret(); 
+        }
+        /// <summary>
+        /// color设置AppendText的颜色
+        /// </summary>
+        /// <param name="str"></param>
+        /// <param name="color"></param>
+        public void AppendText(string str,Color color) {
+            SelectionColor = color;
+            base.AppendText(str);
+        }
+    }
+}

+ 77 - 0
UAS-出货标签管理(泽天)/CustomControl/SearchTextBox.Designer.cs

@@ -0,0 +1,77 @@
+namespace UAS_LabelMachine.CustomControl
+{
+    partial class SearchTextBox
+    {
+        /// <summary> 
+        /// 必需的设计器变量。
+        /// </summary>
+        private System.ComponentModel.IContainer components = null;
+
+        /// <summary> 
+        /// 清理所有正在使用的资源。
+        /// </summary>
+        /// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
+        protected override void Dispose(bool disposing)
+        {
+            if (disposing && (components != null))
+            {
+                components.Dispose();
+            }
+            base.Dispose(disposing);
+        }
+
+        #region 组件设计器生成的代码
+
+        /// <summary> 
+        /// 设计器支持所需的方法 - 不要修改
+        /// 使用代码编辑器修改此方法的内容。
+        /// </summary>
+        private void InitializeComponent()
+        {
+            this.TextBox = new System.Windows.Forms.TextBox();
+            this.Search_Icon = new System.Windows.Forms.PictureBox();
+            ((System.ComponentModel.ISupportInitialize)(this.Search_Icon)).BeginInit();
+            this.SuspendLayout();
+            // 
+            // TextBox
+            // 
+            this.TextBox.Dock = System.Windows.Forms.DockStyle.Fill;
+            this.TextBox.Location = new System.Drawing.Point(0, 0);
+            this.TextBox.Name = "TextBox";
+            this.TextBox.Size = new System.Drawing.Size(247, 21);
+            this.TextBox.TabIndex = 0;
+            this.TextBox.TextChanged += new System.EventHandler(this.TextBox_TextChanged);
+            this.TextBox.Enter += new System.EventHandler(this.TextBox_Enter);
+            this.TextBox.Leave += new System.EventHandler(this.TextBox_Leave);
+            // 
+            // Search_Icon
+            // 
+            this.Search_Icon.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
+            | System.Windows.Forms.AnchorStyles.Right)));
+            this.Search_Icon.Cursor = System.Windows.Forms.Cursors.Hand;
+            this.Search_Icon.Image = global::UAS_LabelMachine.Properties.Resources.search_16px_1202802_easyicon_net;
+            this.Search_Icon.Location = new System.Drawing.Point(227, 1);
+            this.Search_Icon.Name = "Search_Icon";
+            this.Search_Icon.Size = new System.Drawing.Size(19, 19);
+            this.Search_Icon.TabIndex = 1;
+            this.Search_Icon.TabStop = false;
+            this.Search_Icon.Click += new System.EventHandler(this.Search_Icon_Click);
+            // 
+            // SearchTextBox
+            // 
+            this.Controls.Add(this.Search_Icon);
+            this.Controls.Add(this.TextBox);
+            this.Name = "SearchTextBox";
+            this.Size = new System.Drawing.Size(247, 21);
+            ((System.ComponentModel.ISupportInitialize)(this.Search_Icon)).EndInit();
+            this.ResumeLayout(false);
+            this.PerformLayout();
+
+        }
+
+        #endregion
+
+        private System.Windows.Forms.TextBox TextBox;
+        private System.Windows.Forms.PictureBox Search_Icon;
+    }
+}

+ 352 - 0
UAS-出货标签管理(泽天)/CustomControl/SearchTextBox.cs

@@ -0,0 +1,352 @@
+using System;
+using System.Data;
+using System.Windows.Forms;
+using UAS_LabelMachine.PublicMethod;
+
+namespace UAS_LabelMachine.CustomControl
+{
+    public partial class SearchTextBox : UserControl
+    {
+
+        DataHelper dh = new DataHelper();
+
+        #region 构造函数
+        public SearchTextBox()
+        {
+            InitializeComponent();
+        }
+        #endregion
+
+        #region 变量
+        /// <summary>
+        /// 是否通过Leave事件找到数据
+        /// </summary>
+        public bool LeaveFindData;
+        /// <summary>
+        /// DBFind窗体弹出的标题
+        /// </summary>
+        private string DBTitle1;
+        /// <summary>
+        /// 输入框是否可编辑
+        /// </summary>
+        private bool TextBoxEnable1;
+        /// <summary>
+        /// 业务逻辑的标识符
+        /// </summary>
+        private string caller;
+        /// <summary>
+        /// 发起DbFind的窗体
+        /// </summary>
+        private string formName;
+        /// <summary>
+        /// 需要赋值的字段
+        /// </summary>
+        private string[] setValueField;
+        /// <summary>
+        /// 初始的筛选条件
+        /// </summary>
+        private string condition;
+        /// <summary>
+        /// 权限标识
+        /// </summary>
+        private string Power1;
+        /// <summary>
+        /// 查询的表名
+        /// </summary>
+        private string tableName;
+        /// <summary>
+        /// 查询的字段
+        /// </summary>
+        private string selectField;
+        DataTable dt = new DataTable();
+        DbFind db;
+
+        private DataTable returnData;
+
+        public override string Text
+        {
+            get
+            {
+                return TextBox.Text;
+            }
+            set
+            {
+                TextBox.Text = value;
+            }
+        }
+
+        string AllPower1;
+
+        public string AllPower
+        {
+            get
+            {
+                return AllPower1;
+            }
+
+            set
+            {
+                AllPower1 = value;
+            }
+        }
+
+
+        public string Caller
+        {
+            get
+            {
+                return caller;
+            }
+
+            set
+            {
+                caller = value;
+            }
+        }
+
+        public string FormName
+        {
+            get
+            {
+                return formName;
+            }
+
+            set
+            {
+                formName = value;
+            }
+        }
+
+        public string[] SetValueField
+        {
+            get
+            {
+                return setValueField;
+            }
+
+            set
+            {
+                setValueField = value;
+            }
+        }
+
+        public string Condition
+        {
+            get
+            {
+                return condition;
+            }
+
+            set
+            {
+                condition = value;
+            }
+        }
+
+        public string TableName
+        {
+            get
+            {
+                return tableName;
+            }
+
+            set
+            {
+                tableName = value;
+            }
+        }
+
+        public string SelectField
+        {
+            get
+            {
+                return selectField;
+            }
+
+            set
+            {
+                selectField = value;
+            }
+        }
+
+        public string Power
+        {
+            get
+            {
+                return Power1;
+            }
+
+            set
+            {
+                Power1 = value;
+            }
+        }
+
+        public string DBTitle
+        {
+            get
+            {
+                return DBTitle1;
+            }
+
+            set
+            {
+                DBTitle1 = value;
+            }
+        }
+
+        public bool TextBoxEnable
+        {
+            get
+            {
+                return TextBoxEnable1;
+            }
+
+            set
+            {
+                TextBoxEnable1 = value;
+            }
+        }
+
+        public DataTable ReturnData
+        {
+            get
+            {
+                return returnData;
+            }
+
+            set
+            {
+                returnData = value;
+            }
+        }
+        #endregion
+
+        #region 自定义事件
+        public delegate void OnTextChange(object sender, EventArgs e);
+        //定义事件
+        public event OnTextChange UserControlTextChanged;
+        //定义委托
+        public delegate void Icon_Click(object sender, EventArgs e);
+        /// <summary>
+        /// 图标点击事件
+        /// </summary>
+        public event Icon_Click SearchIconClick;
+
+        public delegate void DBSourceChange(object sender, EventArgs e);
+
+        public event DBSourceChange DbChange;
+
+        public delegate void OnTextKeyDown(object sender, KeyEventArgs e);
+
+        public event OnTextKeyDown TextKeyDown;
+        #endregion
+        //定义委托
+
+        private void TextBox_TextChanged(object sender, EventArgs e)
+        {
+            UserControlTextChanged?.Invoke(sender, new EventArgs());
+        }
+
+        //Key先发起失去焦点事件,在执行用户自定义的事件
+        private void TextBox_KeyDown(object sender, KeyEventArgs e)
+        {
+            if (e.KeyCode == Keys.Enter)
+            {
+                TextBox_Leave(sender, e);
+                TextKeyDown?.Invoke(sender, new KeyEventArgs(e.KeyCode));
+            }
+        }
+
+        private void Search_Icon_Click(object sender, EventArgs e)
+        {
+            SearchIconClick?.Invoke(sender, new EventArgs());
+            db = new DbFind(Name, tableName, selectField, setValueField, caller, formName, condition);
+            db.Text = DBTitle1;
+            LogManager.DoLog("DbFind查询,发起窗口【" + formName + "】,查询表【" + tableName + "】,字段" + selectField + ",条件" + condition);
+            if (db.IsAbleDbFind1)
+            {
+                db.ShowDialog();
+                GetData();
+            }
+            else
+            {
+                MessageBox.Show("该字段未配置DbFind", "提示", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
+            }
+        }
+
+        /// <summary>
+        /// 触发给界面的
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
+        public void ReturnDataToForm()
+        {
+            returnData = dt;
+            DbChange?.Invoke(new object(), new EventArgs());
+        }
+
+        private void TextBox_Enter(object sender, EventArgs e)
+        {
+            TextBox.BackColor = System.Drawing.Color.GreenYellow;
+        }
+
+        /// <summary>
+        /// 重新刷新数据
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
+        public void RefreshDB(object sender, EventArgs e)
+        {
+            TextBox_Leave(sender, e);
+            GetData();
+        }
+
+        public void TextBox_Leave(object sender, EventArgs e)
+        {
+            TextBox.BackColor = System.Drawing.Color.White;
+            GetData();
+        }
+
+        private void SearchTextBox_Load(object sender, EventArgs e)
+        {
+            if (!TextBoxEnable1)
+                TextBox.BackColor = System.Drawing.Color.White;
+            TextBox.Enabled = TextBoxEnable1;
+        }
+
+        private void SearchTextBox_SizeChanged(object sender, EventArgs e)
+        {
+            TextBox.Width = this.Width - Search_Icon.Width - 3;
+        }
+
+        public void GetData()
+        {
+            string sql = "";
+            //将查询到的结果返回界面
+            if (TextBox.Text != "")
+            {
+                sql = "select " + BaseUtil.AddField(setValueField) + " from " + tableName + " where " + Name + "='" + TextBox.Text + "'";
+            }
+            else if (db != null)
+            {
+                sql = "select " + BaseUtil.AddField(setValueField) + " from " + tableName + " where " + Name + "='" + db.TextBoxValue1 + "'";
+            }
+            if (condition != null)
+            {
+                sql += " and " + condition;
+            }
+            try
+            {
+                Console.WriteLine(sql);
+                dt = (DataTable)dh.ExecuteSql(sql, "select");
+                if (dt.Rows.Count > 0)
+                    ReturnDataToForm();
+            }
+            catch (Exception e)
+            {
+                LogManager.DoLog(e.Message);
+            }
+        }
+    }
+}

+ 120 - 0
UAS-出货标签管理(泽天)/CustomControl/SearchTextBox.resx

@@ -0,0 +1,120 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+</root>

+ 84 - 0
UAS-出货标签管理(泽天)/DbFind.Designer.cs

@@ -0,0 +1,84 @@
+namespace UAS_LabelMachine
+{
+    partial class DbFind
+    {
+        /// <summary>
+        /// Required designer variable.
+        /// </summary>
+        private System.ComponentModel.IContainer components = null;
+
+        /// <summary>
+        /// Clean up any resources being used.
+        /// </summary>
+        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+        protected override void Dispose(bool disposing)
+        {
+            if (disposing && (components != null))
+            {
+                components.Dispose();
+            }
+            base.Dispose(disposing);
+        }
+
+        #region Windows Form Designer generated code
+
+        /// <summary>
+        /// Required method for Designer support - do not modify
+        /// the contents of this method with the code editor.
+        /// </summary>
+        private void InitializeComponent()
+        {
+            this.DbFindGridView = new System.Windows.Forms.DataGridView();
+            this.pagination1 = new UAS_LabelMachine.CustomControl.Pagination();
+            ((System.ComponentModel.ISupportInitialize)(this.DbFindGridView)).BeginInit();
+            this.SuspendLayout();
+            // 
+            // DbFindGridView
+            // 
+            this.DbFindGridView.AllowUserToAddRows = false;
+            this.DbFindGridView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
+            | System.Windows.Forms.AnchorStyles.Left) 
+            | System.Windows.Forms.AnchorStyles.Right)));
+            this.DbFindGridView.BackgroundColor = System.Drawing.SystemColors.Window;
+            this.DbFindGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
+            this.DbFindGridView.Location = new System.Drawing.Point(0, 22);
+            this.DbFindGridView.Name = "DbFindGridView";
+            this.DbFindGridView.ReadOnly = true;
+            this.DbFindGridView.RowTemplate.Height = 23;
+            this.DbFindGridView.Size = new System.Drawing.Size(806, 410);
+            this.DbFindGridView.TabIndex = 0;
+            this.DbFindGridView.CellDoubleClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.DbFindGridView_CellDoubleClick);
+            this.DbFindGridView.ColumnWidthChanged += new System.Windows.Forms.DataGridViewColumnEventHandler(this.DbFindGridView_ColumnWidthChanged);
+            this.DbFindGridView.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.DbFindGridView_KeyPress);
+            // 
+            // pagination1
+            // 
+            this.pagination1.Cursor = System.Windows.Forms.Cursors.Hand;
+            this.pagination1.Location = new System.Drawing.Point(0, 432);
+            this.pagination1.Name = "pagination1";
+            this.pagination1.Size = new System.Drawing.Size(806, 32);
+            this.pagination1.TabIndex = 1;
+            // 
+            // DbFind
+            // 
+            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+            this.ClientSize = new System.Drawing.Size(806, 464);
+            this.Controls.Add(this.pagination1);
+            this.Controls.Add(this.DbFindGridView);
+            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
+            this.Name = "DbFind";
+            this.Text = "DbFind";
+            this.Load += new System.EventHandler(this.DbFind_Load);
+            this.SizeChanged += new System.EventHandler(this.DbFind_SizeChanged);
+            ((System.ComponentModel.ISupportInitialize)(this.DbFindGridView)).EndInit();
+            this.ResumeLayout(false);
+
+        }
+
+        #endregion
+
+        private System.Windows.Forms.DataGridView DbFindGridView;
+        private CustomControl.Pagination pagination1;
+    }
+}

+ 202 - 0
UAS-出货标签管理(泽天)/DbFind.cs

@@ -0,0 +1,202 @@
+using System;
+using System.Data;
+using System.Drawing;
+using System.Windows.Forms;
+using UAS_LabelMachine.CustomControl;
+using UAS_LabelMachine.Entity;
+using UAS_LabelMachine.PublicMethod;
+
+namespace UAS_LabelMachine
+{
+    public partial class DbFind : Form
+    {
+        bool IsAbleDbFind;
+        string BindTable;
+        DataHelper dh = SystemInf.dh;
+        DataTable dt = new DataTable();
+        AutoSizeFormClass asc = new AutoSizeFormClass();
+
+
+        string TextBoxValue = "";
+        Control[] ctl;
+        //DBFind查询的字段
+        string Field;
+        //需要赋值的字段
+        string[] SetValueField;
+        //需要查询的全部字段
+        string SelectField;
+        //发起DbFind请求的窗口
+        string FormName;
+        //是否配置了DBfind
+        string Caller;
+
+        string Condition;
+
+        public bool IsAbleDbFind1
+        {
+            get
+            {
+                return IsAbleDbFind;
+            }
+
+            set
+            {
+                IsAbleDbFind = value;
+            }
+        }
+
+        public string TextBoxValue1
+        {
+            get
+            {
+                return TextBoxValue;
+            }
+
+            set
+            {
+                TextBoxValue = value;
+            }
+        }
+
+        /// <summary>
+        /// 
+        /// </summary>
+        /// <param name="field"></param>
+        /// <param name="setValueField"></param>
+        /// <param name="caller"></param>
+        /// <param name="formname"></param>
+        public DbFind(string field, string tablename, string selectfield, string[] setValueField, string caller, string formname, string condition)
+        {
+            InitializeComponent();
+            StartPosition = FormStartPosition.CenterParent;
+            Field = field;
+            FormName = formname;
+            SetValueField = setValueField;
+            Caller = caller;
+            Condition = condition;
+            BindTable = tablename;
+            SelectField = selectfield.Replace("#", "as");
+            //返回一个带有结构的空的DataTable
+            dt = (DataTable)dh.ExecuteSql("select " + SelectField + " from " + tablename + " where rownum<20", "select");
+            //设置DataTable的描述和列名,为了字段赋值
+            selectfield = selectfield.Replace(",", "#");
+            string[] NameAndCapation = selectfield.Split('#');
+            int index = 0;
+            for (int i = 0; i < dt.Columns.Count; i++)
+            {
+                dt.Columns[i].Caption = NameAndCapation[index].Trim();
+                index = index + 1;
+                dt.Columns[i].ColumnName = NameAndCapation[index].Trim();
+                index = index + 1;
+            }
+            if (dt != null)
+            {
+                //先绑定空的结构
+                DbFindGridView.DataSource = dt;
+                for (int i = 0; i < DbFindGridView.Columns.Count; i++)
+                {
+                    DbFindGridView.Columns[i].AutoSizeMode = DataGridViewAutoSizeColumnMode.DisplayedCells;
+                }
+                //获取查询的字段的拼接语句
+                pagination1.BindDataToNavigator(DbFindGridView, tablename, SelectField, "ID", caller, Condition == null ? "" : Condition);
+                IsAbleDbFind = true;
+            }
+        }
+
+        protected override void WndProc(ref Message m)
+        {
+            //拦截双击标题栏、移动窗体的系统消息  
+            if (m.Msg != 0xA3)
+            {
+                base.WndProc(ref m);
+            }
+        }
+
+        private void DbFind_Load(object sender, EventArgs e)
+        {
+            asc.controllInitializeSize(this);
+            //用来存放过滤的TextBox的控件
+            ctl = new Control[dt.Columns.Count];
+            //Dock是添加的越后面展示时越前面,所以需要从大到小排放
+            for (int i = dt.Columns.Count - 1; i >= 0; i--)
+            {
+                EnterTextBox etb = new EnterTextBox();
+                etb.Dock = DockStyle.Left;
+                etb.Location = new Point(DbFindGridView.RowHeadersWidth, DbFindGridView.Columns[i].Width);
+                etb.Name = dt.Columns[i].Caption;
+                etb.Tag = dt.Columns[i].Caption;
+                etb.Size = new Size(DbFindGridView.Columns[i].Width, 22);
+                etb.KeyDown += FilterData;
+                this.Controls.Add(etb);
+                //记录这个生成的控件,后续用于拼接条件
+                ctl[i] = etb;
+            }
+            //最后用一个不可编辑的占住头部长度
+            EnterTextBox Head = new EnterTextBox();
+            Head.Enabled = false;
+            Head.Dock = DockStyle.Left;
+            Head.Location = new Point(0, DbFindGridView.RowHeadersWidth);
+            Head.Size = new Size(DbFindGridView.RowHeadersWidth, 22);
+            this.Controls.Add(Head);
+        }
+
+        /// <summary>
+        /// 过滤条件
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
+        private void FilterData(object sender, KeyEventArgs e)
+        {
+            if (e.KeyCode == Keys.Enter)
+                pagination1.BindDataToNavigator(DbFindGridView, BindTable, SelectField, "ID", Caller, BaseUtil.GetScreenSqlCondition(ctl).Replace("where", "") + ((Condition == "" || Condition == null) ? "" : " and " + Condition));
+        }
+
+        private void DbFindGridView_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
+        {
+            try
+            {
+                //先判断DataTable里面是否有这个字段,然后从打开的窗口里面去获取到这个Form,从Form中的指定Panel获取到指定字段的控件
+                for (int i = 0; i < dt.Columns.Count; i++)
+                {
+                    for (int j = 0; j < SetValueField.Length; j++)
+                    {
+                        if (SetValueField[j] == dt.Columns[i].Caption || SetValueField[j] == dt.Columns[i].ColumnName || dt.Columns[i].Caption.Contains(SetValueField[j]))
+                        {
+                            FormCollection fmCollection = Application.OpenForms;
+                            fmCollection[FormName].Controls[SetValueField[j]].Text = DbFindGridView.Rows[e.RowIndex].Cells[dt.Columns[i].ColumnName].Value.ToString();
+                        }
+                    }
+                }
+                Dispose();
+                Close();
+            }
+            catch (Exception)
+            {
+                Dispose();
+                Close();
+            }
+        }
+
+        //按下Esc键的时候关闭当前的界面,用于DbFind
+        private void DbFindGridView_KeyPress(object sender, KeyPressEventArgs e)
+        {
+            if (e.KeyChar == (char)Keys.Escape)
+            {
+                Dispose();
+                Close();
+            }
+        }
+
+        private void DbFind_SizeChanged(object sender, EventArgs e)
+        {
+            asc.controlAutoSize(this);
+        }
+
+        //列宽发生变化的时候TextBox的宽度也发生变化
+        private void DbFindGridView_ColumnWidthChanged(object sender, DataGridViewColumnEventArgs e)
+        {
+            if (ctl != null)
+                ctl[DbFindGridView.Columns.IndexOf(e.Column)].Width = e.Column.Width;
+        }
+    }
+}

+ 120 - 0
UAS-出货标签管理(泽天)/DbFind.resx

@@ -0,0 +1,120 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+</root>

+ 12 - 0
UAS-出货标签管理(泽天)/Entity/SystemInf.cs

@@ -0,0 +1,12 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace UAS_LabelMachine.Entity
+{
+    class SystemInf
+    {
+       public static DataHelper dh;
+    }
+}

+ 46 - 0
UAS-出货标签管理(泽天)/Entity/User.cs

@@ -0,0 +1,46 @@
+namespace UAS_LabelMachine.Entity
+{
+    class User
+    {
+        /// <summary>
+        /// 用户姓名
+        /// </summary>
+        public static string UserName; //  姓名 em_name
+        /// <summary>
+        /// 用户编号 
+        /// </summary>
+        public static string UserCode; //  工号 em_code
+        ///// <summary>
+        ///// 用户岗位
+        ///// </summary>
+        //public static string UserPosition;// 岗位 em_position
+        ///// <summary>
+        ///// 当前岗位工序
+        ///// </summary>
+        //public static string CurrentStep;  //工序 sc_stepcode
+        ///// <summary>
+        ///// 用户部门
+        ///// </summary>
+        //public static string UserDepartment;//部门 em_depart
+        ///// <summary>
+        ///// 职称
+        ///// </summary>
+        //public static string UserProfessName;//职称 em_professname
+        ///// <summary>
+        ///// 用户类型,admin表示超级管理员,normal表示普通用户
+        ///// </summary>
+        public static string UserAccountType;  //用户类型  em_type
+        ///// <summary>
+        ///// 岗位资源编号
+        ///// </summary>
+        //public static string UserSourceCode; //岗位资源   ur_resourecode
+        ///// <summary>
+        ///// 用户分组
+        ///// </summary>
+        //public static string UserGroup;  //用户分组  ug_name
+        ///// <summary>
+        /////  用户分组编码
+        ///// </summary>
+        //public static string UserGroupCode;  //用户分组编码   ug_code
+    }
+}

+ 209 - 0
UAS-出货标签管理(泽天)/Login.Designer.cs

@@ -0,0 +1,209 @@
+namespace UAS_LabelMachine
+{
+    partial class Login
+    {
+        /// <summary>
+        /// Required designer variable.
+        /// </summary>
+        private System.ComponentModel.IContainer components = null;
+
+        /// <summary>
+        /// Clean up any resources being used.
+        /// </summary>
+        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+        protected override void Dispose(bool disposing)
+        {
+            if (disposing && (components != null))
+            {
+                components.Dispose();
+            }
+            base.Dispose(disposing);
+        }
+
+        #region Windows Form Designer generated code
+
+        /// <summary>
+        /// Required method for Designer support - do not modify
+        /// the contents of this method with the code editor.
+        /// </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();
+            this.PassWord = new System.Windows.Forms.TextBox();
+            this.LoginIcon = new System.Windows.Forms.PictureBox();
+            this.label2 = new System.Windows.Forms.Label();
+            this.label3 = new System.Windows.Forms.Label();
+            this.MasterCombox = new System.Windows.Forms.ComboBox();
+            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
+            // 
+            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(234, 181);
+            this.pictureBox1.Name = "pictureBox1";
+            this.pictureBox1.Size = new System.Drawing.Size(72, 72);
+            this.pictureBox1.TabIndex = 0;
+            this.pictureBox1.TabStop = false;
+            // 
+            // label1
+            // 
+            this.label1.AutoSize = true;
+            this.label1.BackColor = System.Drawing.Color.Transparent;
+            this.label1.Font = new System.Drawing.Font("微软雅黑", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label1.ForeColor = System.Drawing.SystemColors.Desktop;
+            this.label1.Location = new System.Drawing.Point(342, 125);
+            this.label1.Name = "label1";
+            this.label1.Size = new System.Drawing.Size(243, 28);
+            this.label1.TabIndex = 1;
+            this.label1.Text = "优软-出货标签管理系统1";
+            // 
+            // UserName
+            // 
+            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(369, 168);
+            this.UserName.Name = "UserName";
+            this.UserName.Size = new System.Drawing.Size(196, 29);
+            this.UserName.TabIndex = 2;
+            // 
+            // PassWord
+            // 
+            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(369, 206);
+            this.PassWord.Name = "PassWord";
+            this.PassWord.PasswordChar = '*';
+            this.PassWord.Size = new System.Drawing.Size(196, 29);
+            this.PassWord.TabIndex = 3;
+            this.PassWord.KeyDown += new System.Windows.Forms.KeyEventHandler(this.PassWord_KeyDown);
+            // 
+            // LoginIcon
+            // 
+            this.LoginIcon.BackColor = System.Drawing.Color.Transparent;
+            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(423, 323);
+            this.LoginIcon.Name = "LoginIcon";
+            this.LoginIcon.Size = new System.Drawing.Size(72, 26);
+            this.LoginIcon.TabIndex = 4;
+            this.LoginIcon.TabStop = false;
+            this.LoginIcon.Click += new System.EventHandler(this.LoginIcon_Click);
+            // 
+            // label2
+            // 
+            this.label2.AutoSize = true;
+            this.label2.BackColor = System.Drawing.Color.Transparent;
+            this.label2.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label2.Location = new System.Drawing.Point(321, 171);
+            this.label2.Name = "label2";
+            this.label2.Size = new System.Drawing.Size(42, 21);
+            this.label2.TabIndex = 5;
+            this.label2.Text = "账号";
+            // 
+            // label3
+            // 
+            this.label3.AutoSize = true;
+            this.label3.BackColor = System.Drawing.Color.Transparent;
+            this.label3.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label3.Location = new System.Drawing.Point(321, 209);
+            this.label3.Name = "label3";
+            this.label3.Size = new System.Drawing.Size(42, 21);
+            this.label3.TabIndex = 6;
+            this.label3.Text = "密码";
+            // 
+            // MasterCombox
+            // 
+            this.MasterCombox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+            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(369, 247);
+            this.MasterCombox.Name = "MasterCombox";
+            this.MasterCombox.Size = new System.Drawing.Size(196, 29);
+            this.MasterCombox.TabIndex = 7;
+            // 
+            // Master
+            // 
+            this.Master.AutoSize = true;
+            this.Master.BackColor = System.Drawing.Color.Transparent;
+            this.Master.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.Master.Location = new System.Drawing.Point(321, 250);
+            this.Master.Name = "Master";
+            this.Master.Size = new System.Drawing.Size(42, 21);
+            this.Master.TabIndex = 8;
+            this.Master.Text = "账套";
+            // 
+            // label4
+            // 
+            this.label4.AutoSize = true;
+            this.label4.BackColor = System.Drawing.Color.Transparent;
+            this.label4.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label4.Location = new System.Drawing.Point(321, 288);
+            this.label4.Name = "label4";
+            this.label4.Size = new System.Drawing.Size(25, 21);
+            this.label4.TabIndex = 10;
+            this.label4.Text = "IP";
+            // 
+            // IP
+            // 
+            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(369, 285);
+            this.IP.Name = "IP";
+            this.IP.Size = new System.Drawing.Size(196, 29);
+            this.IP.TabIndex = 9;
+            // 
+            // Login
+            // 
+            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+            this.BackgroundImage = global::UAS_LabelMachine.Properties.Resources.timg;
+            this.ClientSize = new System.Drawing.Size(884, 461);
+            this.Controls.Add(this.label4);
+            this.Controls.Add(this.IP);
+            this.Controls.Add(this.Master);
+            this.Controls.Add(this.MasterCombox);
+            this.Controls.Add(this.label3);
+            this.Controls.Add(this.label2);
+            this.Controls.Add(this.LoginIcon);
+            this.Controls.Add(this.PassWord);
+            this.Controls.Add(this.UserName);
+            this.Controls.Add(this.label1);
+            this.Controls.Add(this.pictureBox1);
+            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
+            this.Name = "Login";
+            this.Text = "出货标签管理系统";
+            this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.Login_FormClosing);
+            this.Load += new System.EventHandler(this.Login_Load);
+            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();
+
+        }
+
+        #endregion
+
+        private System.Windows.Forms.PictureBox pictureBox1;
+        private System.Windows.Forms.Label label1;
+        private System.Windows.Forms.TextBox UserName;
+        private System.Windows.Forms.TextBox PassWord;
+        private System.Windows.Forms.PictureBox LoginIcon;
+        private System.Windows.Forms.Label label2;
+        private System.Windows.Forms.Label label3;
+        private System.Windows.Forms.ComboBox MasterCombox;
+        private System.Windows.Forms.Label Master;
+        private System.Windows.Forms.Label label4;
+        private System.Windows.Forms.TextBox IP;
+        private System.Windows.Forms.BindingSource ComData;
+    }
+}

+ 131 - 0
UAS-出货标签管理(泽天)/Login.cs

@@ -0,0 +1,131 @@
+using System;
+using System.Data;
+using System.Drawing;
+using System.Drawing.Drawing2D;
+using System.IO;
+using System.Windows.Forms;
+using UAS_LabelMachine.Entity;
+using UAS_LabelMachine.PublicMethod;
+
+namespace UAS_LabelMachine
+{
+    public partial class Login : Form
+    {
+        DataHelper dh;
+        DataTable dt;
+
+        public Login()
+        {
+            InitializeComponent();
+            StartPosition = FormStartPosition.CenterScreen;
+        }
+
+        protected override void WndProc(ref Message m)
+        {
+            //拦截双击标题栏、移动窗体的系统消息  
+            if (m.Msg != 0xA3)
+                base.WndProc(ref m);
+        }
+
+        private void Login_Load(object sender, EventArgs e)
+        {
+            dh = new DataHelper();
+            SystemInf.dh = dh;
+            //获取账套信息
+            dt = (DataTable)dh.ExecuteSql("select ma_function,ms_pwd,ma_user from master ", "select");
+            DataTable MasterDB = dt.Clone();
+            for (int i = 0; i < dt.Rows.Count; i++)
+            {
+                if (DataHelper.Masters.Contains(dt.Rows[i]["ma_user"].ToString()))
+                {
+                    DataRow dr = MasterDB.NewRow();
+                    dr["ma_user"] = dt.Rows[i]["ma_user"];
+                    dr["ma_function"] = dt.Rows[i]["ma_function"];
+                    MasterDB.Rows.Add(dr);
+                }
+            }
+            MasterCombox.DisplayMember = "ma_function";
+            MasterCombox.ValueMember = "ma_user";
+            MasterCombox.DataSource = MasterDB;
+            //读取上次登陆时的用户名和选择的账套
+            UserName.Text = Properties.Settings.Default.LastLoginUser;
+            MasterCombox.Text = Properties.Settings.Default.LastLoginMaster;
+            IP.Text = Properties.Settings.Default.IPAddress;
+            //如果上次的用户名不为空则直接跳到密码输入框
+            if (UserName.Text != "")
+                PassWord.Select();
+            if (!Directory.Exists("Log"))//若文件夹不存在则新建文件夹   
+                Directory.CreateDirectory("Log"); //新建文件夹   
+            string sysdisc = Environment.GetEnvironmentVariable("windir").Substring(0, 1);
+            if (!Directory.Exists(sysdisc + @":\打印标签"))
+                Directory.CreateDirectory(sysdisc + @":\打印标签");
+            FileStream fs = new FileStream("Log/" + DateTime.Now.ToString("yyyy-MM-dd") + ".txt", FileMode.OpenOrCreate, FileAccess.ReadWrite);
+        }
+
+        private void LoginIcon_Click(object sender, EventArgs e)
+        {
+            //根据匹配的账套在DataTable查找到对应的密码
+            string Ms_Pwd = "";
+            for (int i = 0; i < dt.Rows.Count; i++)
+            {
+                if (MasterCombox.SelectedValue == dt.Rows[i]["ma_user"])
+                    Ms_Pwd = dt.Rows[i]["ms_pwd"].ToString();
+            }
+            //切换至用户选择的数据源
+            string ConnectionString = "Connection Timeout=0;Pooling=false;Password=" + Ms_Pwd + ";User ID=" + MasterCombox.SelectedValue.ToString() + ";Pooling=false;Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=" + IP.Text + ")(PORT=" + DataHelper.OraclePort + ")))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)));";
+            DataHelper.DBConnectionString = ConnectionString;
+            //设置了Connection,重新执行构造函数,重置数据库连接
+            dh = new DataHelper();
+            string oMsg = "";
+            if (HttpHandler.CheckUserLogin(UserName.Text, PassWord.Text, MasterCombox.SelectedValue.ToString(), out oMsg))
+            {
+                dt = (DataTable)dh.ExecuteSql("select em_name,em_type from employee where em_code='" + UserName.Text + "'", "select");
+                User.UserName = dt.Rows[0]["em_name"].ToString();
+                User.UserCode = UserName.Text;
+                User.UserAccountType = dt.Rows[0]["em_type"].ToString();
+                //保存此次登陆的用户名和密码
+                Properties.Settings.Default.LastLoginUser = UserName.Text;
+                Properties.Settings.Default.LastLoginMaster = MasterCombox.Text;
+                Properties.Settings.Default.IPAddress = IP.Text;
+                Properties.Settings.Default.Save();
+                //弹出标签打印的主界面
+                UAS_出货标签打印 main = new UAS_出货标签打印(MasterCombox.Text);
+                main.StartPosition = FormStartPosition.CenterScreen;
+                Hide();
+                main.ShowDialog();
+                Close();
+            }
+            else MessageBox.Show(oMsg);
+        }
+
+        /// <summary>
+        /// 绘制蓝色的背景图
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
+        private void Login_Paint(object sender, PaintEventArgs e)
+        {
+            //简单的画一个浅蓝色的背景
+            Graphics g = e.Graphics;
+            GraphicsPath Rect = new GraphicsPath();
+            Pen p = new Pen(Color.CadetBlue, 2);
+            Rectangle rect = new Rectangle(141, 80, 600, 300);
+            LinearGradientBrush b3 = new LinearGradientBrush(rect, Color.AliceBlue, Color.LightBlue, LinearGradientMode.Vertical);
+            g.FillRectangle(b3, rect);
+            e.Graphics.DrawRectangle(p, rect);
+        }
+
+        private void PassWord_KeyDown(object sender, KeyEventArgs e)
+        {
+            if (e.KeyCode == Keys.Enter)
+            {
+                LoginIcon_Click(sender, e);
+            }
+        }
+
+        private void Login_FormClosing(object sender, FormClosingEventArgs e)
+        {
+            Application.Exit();
+        }
+    }
+}

+ 123 - 0
UAS-出货标签管理(泽天)/Login.resx

@@ -0,0 +1,123 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <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>

+ 284 - 0
UAS-出货标签管理(泽天)/PowerSetting.Designer.cs

@@ -0,0 +1,284 @@
+namespace UAS_LabelMachine
+{
+    partial class PowerSetting
+    {
+        /// <summary>
+        /// Required designer variable.
+        /// </summary>
+        private System.ComponentModel.IContainer components = null;
+
+        /// <summary>
+        /// Clean up any resources being used.
+        /// </summary>
+        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+        protected override void Dispose(bool disposing)
+        {
+            if (disposing && (components != null))
+            {
+                components.Dispose();
+            }
+            base.Dispose(disposing);
+        }
+
+        #region Windows Form Designer generated code
+
+        /// <summary>
+        /// Required method for Designer support - do not modify
+        /// the contents of this method with the code editor.
+        /// </summary>
+        private void InitializeComponent()
+        {
+            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(PowerSetting));
+            this.PowerSetDGV = new UAS_LabelMachine.CustomControl.DataGridViewWithSerialNum();
+            this.Choose = new System.Windows.Forms.DataGridViewCheckBoxColumn();
+            this.lpp_emcode = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.lpp_id = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.em_na = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.lpp_cleandetail = new System.Windows.Forms.DataGridViewCheckBoxColumn();
+            this.lpp_savedetail = new System.Windows.Forms.DataGridViewCheckBoxColumn();
+            this.lpp_gencode = new System.Windows.Forms.DataGridViewCheckBoxColumn();
+            this.lpp_collectstrategy = new System.Windows.Forms.DataGridViewCheckBoxColumn();
+            this.lpp_allcollect = new System.Windows.Forms.DataGridViewCheckBoxColumn();
+            this.lpp_labelmatain = new System.Windows.Forms.DataGridViewCheckBoxColumn();
+            this.SaveGrid = new UAS_LabelMachine.CustomControl.NormalButton();
+            this.AddRow = new UAS_LabelMachine.CustomControl.NormalButton();
+            this.Delete = new UAS_LabelMachine.CustomControl.NormalButton();
+            this.ChooseAll = new UAS_LabelMachine.CustomControl.ChooseAllButton();
+            this.em_name = new UAS_LabelMachine.CustomControl.EnterTextBox();
+            this.si_expression4_label = new System.Windows.Forms.Label();
+            this.em_code = new UAS_LabelMachine.CustomControl.EnterTextBox();
+            this.label1 = new System.Windows.Forms.Label();
+            this.Screen = new UAS_LabelMachine.CustomControl.ChooseAllButton();
+            ((System.ComponentModel.ISupportInitialize)(this.PowerSetDGV)).BeginInit();
+            this.SuspendLayout();
+            // 
+            // PowerSetDGV
+            // 
+            this.PowerSetDGV.AllowUserToAddRows = false;
+            this.PowerSetDGV.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
+            this.PowerSetDGV.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
+            this.Choose,
+            this.lpp_emcode,
+            this.lpp_id,
+            this.em_na,
+            this.lpp_cleandetail,
+            this.lpp_savedetail,
+            this.lpp_gencode,
+            this.lpp_collectstrategy,
+            this.lpp_allcollect,
+            this.lpp_labelmatain});
+            this.PowerSetDGV.Location = new System.Drawing.Point(0, 55);
+            this.PowerSetDGV.Name = "PowerSetDGV";
+            this.PowerSetDGV.RowTemplate.Height = 23;
+            this.PowerSetDGV.Size = new System.Drawing.Size(1056, 441);
+            this.PowerSetDGV.TabIndex = 0;
+            // 
+            // Choose
+            // 
+            this.Choose.HeaderText = "勾选";
+            this.Choose.Name = "Choose";
+            this.Choose.Width = 50;
+            // 
+            // lpp_emcode
+            // 
+            this.lpp_emcode.DataPropertyName = "lpp_emcode";
+            this.lpp_emcode.HeaderText = "员工编号";
+            this.lpp_emcode.Name = "lpp_emcode";
+            // 
+            // lpp_id
+            // 
+            this.lpp_id.DataPropertyName = "lpp_id";
+            this.lpp_id.HeaderText = "lpp_id";
+            this.lpp_id.Name = "lpp_id";
+            this.lpp_id.Visible = false;
+            // 
+            // em_na
+            // 
+            this.em_na.DataPropertyName = "em_name";
+            this.em_na.HeaderText = "员工姓名";
+            this.em_na.Name = "em_na";
+            this.em_na.ReadOnly = true;
+            // 
+            // lpp_cleandetail
+            // 
+            this.lpp_cleandetail.DataPropertyName = "lpp_cleandetail";
+            this.lpp_cleandetail.HeaderText = "清除明细";
+            this.lpp_cleandetail.Name = "lpp_cleandetail";
+            // 
+            // lpp_savedetail
+            // 
+            this.lpp_savedetail.DataPropertyName = "lpp_savedetail";
+            this.lpp_savedetail.HeaderText = "保存明细";
+            this.lpp_savedetail.Name = "lpp_savedetail";
+            // 
+            // lpp_gencode
+            // 
+            this.lpp_gencode.DataPropertyName = "lpp_gencode";
+            this.lpp_gencode.HeaderText = "生成条码";
+            this.lpp_gencode.Name = "lpp_gencode";
+            // 
+            // lpp_collectstrategy
+            // 
+            this.lpp_collectstrategy.DataPropertyName = "lpp_collectstrategy";
+            this.lpp_collectstrategy.HeaderText = "查看采集策略";
+            this.lpp_collectstrategy.Name = "lpp_collectstrategy";
+            this.lpp_collectstrategy.Width = 110;
+            // 
+            // lpp_allcollect
+            // 
+            this.lpp_allcollect.DataPropertyName = "lpp_allcollect";
+            this.lpp_allcollect.HeaderText = "全部采集";
+            this.lpp_allcollect.Name = "lpp_allcollect";
+            // 
+            // lpp_labelmatain
+            // 
+            this.lpp_labelmatain.DataPropertyName = "lpp_labelmatain";
+            this.lpp_labelmatain.HeaderText = "标签维护";
+            this.lpp_labelmatain.Name = "lpp_labelmatain";
+            // 
+            // SaveGrid
+            // 
+            this.SaveGrid.Image = ((System.Drawing.Image)(resources.GetObject("SaveGrid.Image")));
+            this.SaveGrid.Location = new System.Drawing.Point(578, 503);
+            this.SaveGrid.Name = "SaveGrid";
+            this.SaveGrid.Size = new System.Drawing.Size(75, 29);
+            this.SaveGrid.TabIndex = 1;
+            this.SaveGrid.Text = "保存";
+            this.SaveGrid.UseVisualStyleBackColor = true;
+            this.SaveGrid.Click += new System.EventHandler(this.SaveGrid_Click);
+            // 
+            // AddRow
+            // 
+            this.AddRow.Image = ((System.Drawing.Image)(resources.GetObject("AddRow.Image")));
+            this.AddRow.Location = new System.Drawing.Point(407, 503);
+            this.AddRow.Name = "AddRow";
+            this.AddRow.Size = new System.Drawing.Size(75, 29);
+            this.AddRow.TabIndex = 2;
+            this.AddRow.Text = "新增";
+            this.AddRow.UseVisualStyleBackColor = true;
+            this.AddRow.Click += new System.EventHandler(this.AddRow_Click);
+            // 
+            // Delete
+            // 
+            this.Delete.Image = ((System.Drawing.Image)(resources.GetObject("Delete.Image")));
+            this.Delete.Location = new System.Drawing.Point(491, 503);
+            this.Delete.Name = "Delete";
+            this.Delete.Size = new System.Drawing.Size(75, 29);
+            this.Delete.TabIndex = 3;
+            this.Delete.Text = "删除";
+            this.Delete.UseVisualStyleBackColor = true;
+            this.Delete.Click += new System.EventHandler(this.Delete_Click);
+            // 
+            // ChooseAll
+            // 
+            this.ChooseAll.Location = new System.Drawing.Point(1, 55);
+            this.ChooseAll.Name = "ChooseAll";
+            this.ChooseAll.Size = new System.Drawing.Size(40, 22);
+            this.ChooseAll.TabIndex = 4;
+            this.ChooseAll.Text = "全选";
+            this.ChooseAll.UseVisualStyleBackColor = true;
+            // 
+            // em_name
+            // 
+            this.em_name.ID = null;
+            this.em_name.Location = new System.Drawing.Point(366, 20);
+            this.em_name.Name = "em_name";
+            this.em_name.Size = new System.Drawing.Size(157, 21);
+            this.em_name.Str = null;
+            this.em_name.Str1 = null;
+            this.em_name.Str2 = null;
+            this.em_name.TabIndex = 58;
+            this.em_name.Tag = "em_name";
+            // 
+            // si_expression4_label
+            // 
+            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(286, 20);
+            this.si_expression4_label.Name = "si_expression4_label";
+            this.si_expression4_label.Size = new System.Drawing.Size(74, 21);
+            this.si_expression4_label.TabIndex = 57;
+            this.si_expression4_label.Text = "员工姓名";
+            // 
+            // em_code
+            // 
+            this.em_code.ID = null;
+            this.em_code.Location = new System.Drawing.Point(107, 20);
+            this.em_code.Name = "em_code";
+            this.em_code.Size = new System.Drawing.Size(157, 21);
+            this.em_code.Str = null;
+            this.em_code.Str1 = null;
+            this.em_code.Str2 = null;
+            this.em_code.TabIndex = 60;
+            this.em_code.Tag = "em_code";
+            // 
+            // label1
+            // 
+            this.label1.AutoSize = true;
+            this.label1.BackColor = System.Drawing.Color.Transparent;
+            this.label1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label1.Location = new System.Drawing.Point(9, 20);
+            this.label1.Name = "label1";
+            this.label1.Size = new System.Drawing.Size(74, 21);
+            this.label1.TabIndex = 59;
+            this.label1.Text = "员工编号";
+            // 
+            // Screen
+            // 
+            this.Screen.Location = new System.Drawing.Point(550, 20);
+            this.Screen.Name = "Screen";
+            this.Screen.Size = new System.Drawing.Size(40, 22);
+            this.Screen.TabIndex = 61;
+            this.Screen.Text = "筛选";
+            this.Screen.UseVisualStyleBackColor = true;
+            this.Screen.Click += new System.EventHandler(this.Screen_Click);
+            // 
+            // PowerSetting
+            // 
+            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+            this.ClientSize = new System.Drawing.Size(1057, 541);
+            this.Controls.Add(this.Screen);
+            this.Controls.Add(this.em_code);
+            this.Controls.Add(this.label1);
+            this.Controls.Add(this.em_name);
+            this.Controls.Add(this.si_expression4_label);
+            this.Controls.Add(this.ChooseAll);
+            this.Controls.Add(this.Delete);
+            this.Controls.Add(this.AddRow);
+            this.Controls.Add(this.SaveGrid);
+            this.Controls.Add(this.PowerSetDGV);
+            this.Name = "PowerSetting";
+            this.Text = "权限设置";
+            this.Load += new System.EventHandler(this.PowerSetting_Load);
+            ((System.ComponentModel.ISupportInitialize)(this.PowerSetDGV)).EndInit();
+            this.ResumeLayout(false);
+            this.PerformLayout();
+
+        }
+
+        #endregion
+
+        private CustomControl.DataGridViewWithSerialNum PowerSetDGV;
+        private CustomControl.NormalButton SaveGrid;
+        private CustomControl.NormalButton AddRow;
+        private CustomControl.NormalButton Delete;
+        private CustomControl.ChooseAllButton ChooseAll;
+        private CustomControl.EnterTextBox em_name;
+        private System.Windows.Forms.Label si_expression4_label;
+        private CustomControl.EnterTextBox em_code;
+        private System.Windows.Forms.Label label1;
+        private CustomControl.ChooseAllButton Screen;
+        private System.Windows.Forms.DataGridViewCheckBoxColumn Choose;
+        private System.Windows.Forms.DataGridViewTextBoxColumn lpp_emcode;
+        private System.Windows.Forms.DataGridViewTextBoxColumn lpp_id;
+        private System.Windows.Forms.DataGridViewTextBoxColumn em_na;
+        private System.Windows.Forms.DataGridViewCheckBoxColumn lpp_cleandetail;
+        private System.Windows.Forms.DataGridViewCheckBoxColumn lpp_savedetail;
+        private System.Windows.Forms.DataGridViewCheckBoxColumn lpp_gencode;
+        private System.Windows.Forms.DataGridViewCheckBoxColumn lpp_collectstrategy;
+        private System.Windows.Forms.DataGridViewCheckBoxColumn lpp_allcollect;
+        private System.Windows.Forms.DataGridViewCheckBoxColumn lpp_labelmatain;
+    }
+}

+ 77 - 0
UAS-出货标签管理(泽天)/PowerSetting.cs

@@ -0,0 +1,77 @@
+using System;
+using System.Collections.Generic;
+using System.Data;
+using System.Windows.Forms;
+using UAS_LabelMachine.Entity;
+
+namespace UAS_LabelMachine
+{
+    public partial class PowerSetting : Form
+    {
+        public PowerSetting()
+        {
+            InitializeComponent();
+        }
+
+        DataHelper dh;
+
+        DataTable dt;
+
+        string condition = "";
+
+        private void PowerSetting_Load(object sender, EventArgs e)
+        {
+            dh = SystemInf.dh;
+            LoadData();
+            ChooseAll.ChooseAll(PowerSetDGV);
+        }
+
+        private void AddRow_Click(object sender, EventArgs e)
+        {
+            if (PowerSetDGV.DataSource as DataTable != null)
+                (PowerSetDGV.DataSource as DataTable).Rows.Add();
+        }
+
+        private void SaveGrid_Click(object sender, EventArgs e)
+        {
+            dt = (DataTable)PowerSetDGV.DataSource;
+            string sql = "insert into labelprintpower(lpp_id,lpp_emcode,LPP_CLEANDETAIL,LPP_GENCODE,LPP_LABELMATAIN,LPP_SAVEDETAIL,LPP_COLLECTSTRATEGY,";
+            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();
+        }
+
+        private void Delete_Click(object sender, EventArgs e)
+        {
+            dt = (DataTable)PowerSetDGV.DataSource;
+            List<string> deleteid = new List<string>();
+            for (int i = 0; i < dt.Rows.Count; i++)
+            {
+                if (PowerSetDGV.Rows[i].Cells["Choose"].FormattedValue.ToString() == "True")
+                {
+                    deleteid.Add(PowerSetDGV.Rows[i].Cells["lpp_id"].Value.ToString());
+                }
+            }
+            if (deleteid.ToArray().Length > 0)
+            {
+                dh.DeleteDataByID("labelprintpower", "lpp_id", deleteid.ToArray());
+                LoadData();
+            }
+        }
+
+        private void LoadData()
+        {
+            string sql = " select lpp_emcode,em_name,lpp_id,LPP_CLEANDETAIL,LPP_GENCODE,LPP_LABELMATAIN,LPP_SAVEDETAIL,LPP_COLLECTSTRATEGY,LPP_ALLCOLLECT from labelprintpower left join employee on em_code = lpp_emcode " + condition;
+            dt = (DataTable)dh.ExecuteSql(sql.ToString(), "select");
+            BaseUtil.FillDgvWithDataTable(PowerSetDGV, dt);
+        }
+
+        private void Screen_Click(object sender, EventArgs e)
+        {
+            condition = BaseUtil.GetScreenSqlCondition(em_code, em_name);
+            LoadData();
+        }
+    }
+}

+ 187 - 0
UAS-出货标签管理(泽天)/PowerSetting.resx

@@ -0,0 +1,187 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <metadata name="Choose.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="lpp_emcode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="lpp_id.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="em_na.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="lpp_cleandetail.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="lpp_savedetail.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="lpp_gencode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="lpp_collectstrategy.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="lpp_allcollect.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="lpp_labelmatain.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="SaveGrid.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        R0lGODlhUgAXAIQAAK/G1qjB1dzn6bTK2MfZ46rE1arD1/D4+/n//d/o7/X6/ez1/K7D1tLj6+Pt9ubx
+        877S3fT09DxZeQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH/C05FVFNDQVBF
+        Mi4wAwEBAAAh+QQAAAAAACwAAAAAUgAXAAAI/wAlCBxIsKDBgwgTKlzIsGCEhxAjSpxIsaLFixgzPhQY
+        AYHHjyBDihxJsqTJkygjcFTAsqXLlzBjypxJs6ZNlRIiHNjJs6fPn0CDCh1KtCjOCAuSKl3KtKnTp1Cj
+        Sp169IHVq1izat3KtavXr2Crgh1LtqzZrUcdqF3Ltq3bt3Djyp1L92iCu3jz6t3Lt6/fv4ADHxVAuLDh
+        w4gTK17MuLHjow0iS55MubLly5gza958lIHnz6BDix5NurTp06iPGljNurXr17Bjy55Nu/bRALhz697N
+        u7fv38CDCz9aoLjx48iTK1/OvLnz50cBSJ9Ovbr169iza9/O/eiA7+DDi0EfT768+fPo0x+FwL69+/fw
+        48ufT7++/fX28+vfzz/+UQIABijggAQWaOCBCCao4FEaNejggxBG1NCEFFZoIUIBAQA7
+</value>
+  </data>
+  <data name="AddRow.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        R0lGODlhUgAXAIQAAK/G1qjB1dzn6bTK2MfZ46rE1arD1/D4+/n//d/o7/X6/ez1/K7D1tLj6+Pt9ubx
+        877S3fT09DxZeQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH/C05FVFNDQVBF
+        Mi4wAwEBAAAh+QQAAAAAACwAAAAAUgAXAAAI/wAlCBxIsKDBgwgTKlzIsGCEhxAjSpxIsaLFixgzPhQY
+        AYHHjyBDihxJsqTJkygjcFTAsqXLlzBjypxJs6ZNlRIiHNjJs6fPn0CDCh1KtCjOCAuSKl3KtKnTp1Cj
+        Sp169IHVq1izat3KtavXr2Crgh1LtqzZrUcdqF3Ltq3bt3Djyp1L92iCu3jz6t3Lt6/fv4ADHxVAuLDh
+        w4gTK17MuLHjow0iS55MubLly5gza958lIHnz6BDix5NurTp06iPGljNurXr17Bjy55Nu/bRALhz697N
+        u7fv38CDCz9aoLjx48iTK1/OvLnz50cBSJ9Ovbr169iza9/O/eiA7+DDi0EfT768+fPo0x+FwL69+/fw
+        48ufT7++/fX28+vfzz/+UQIABijggAQWaOCBCCao4FEaNejggxBG1NCEFFZoIUIBAQA7
+</value>
+  </data>
+  <data name="Delete.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        R0lGODlhUgAXAIQAAK/G1qjB1dzn6bTK2MfZ46rE1arD1/D4+/n//d/o7/X6/ez1/K7D1tLj6+Pt9ubx
+        877S3fT09DxZeQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH/C05FVFNDQVBF
+        Mi4wAwEBAAAh+QQAAAAAACwAAAAAUgAXAAAI/wAlCBxIsKDBgwgTKlzIsGCEhxAjSpxIsaLFixgzPhQY
+        AYHHjyBDihxJsqTJkygjcFTAsqXLlzBjypxJs6ZNlRIiHNjJs6fPn0CDCh1KtCjOCAuSKl3KtKnTp1Cj
+        Sp169IHVq1izat3KtavXr2Crgh1LtqzZrUcdqF3Ltq3bt3Djyp1L92iCu3jz6t3Lt6/fv4ADHxVAuLDh
+        w4gTK17MuLHjow0iS55MubLly5gza958lIHnz6BDix5NurTp06iPGljNurXr17Bjy55Nu/bRALhz697N
+        u7fv38CDCz9aoLjx48iTK1/OvLnz50cBSJ9Ovbr169iza9/O/eiA7+DDi0EfT768+fPo0x+FwL69+/fw
+        48ufT7++/fX28+vfzz/+UQIABijggAQWaOCBCCao4FEaNejggxBG1NCEFFZoIUIBAQA7
+</value>
+  </data>
+</root>

+ 94 - 0
UAS-出货标签管理(泽天)/Program.cs

@@ -0,0 +1,94 @@
+using System;
+using System.Text;
+using System.Windows.Forms;
+using System.Security.Principal;
+using UAS_LabelMachine.PublicMethod;
+using UAS_Labeling.PublicMethod;
+
+namespace UAS_LabelMachine
+{
+    static class Program
+    {
+        /// <summary>
+        /// 应用程序的主入口点。
+        /// </summary>
+        [STAThread]
+        static void Main(string[] Args)
+        {
+            try
+            {
+                WindowsIdentity identity = WindowsIdentity.GetCurrent();
+                WindowsPrincipal principal = new WindowsPrincipal(identity);
+                //设置应用程序处理异常方式:ThreadException处理
+                Application.SetUnhandledExceptionMode(UnhandledExceptionMode.CatchException);
+                //处理UI线程异常
+                Application.ThreadException += new System.Threading.ThreadExceptionEventHandler(Application_ThreadException);
+                //处理非UI线程异常
+                AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException);
+                #region 应用程序的主入口点
+                Application.EnableVisualStyles();
+                Application.SetCompatibleTextRenderingDefault(false);
+                //启用异常记录日志的操作
+                GlobalEventsHandler g = new GlobalEventsHandler();
+                //添加全局事件的监听
+                Application.AddMessageFilter(g);
+                //如果是管理员的身份
+                if (principal.IsInRole(WindowsBuiltInRole.Administrator))
+                {
+                    Application.Run(new Login());
+                }
+                else
+                {
+                    //创建启动对象 
+                    System.Diagnostics.ProcessStartInfo startInfo = new System.Diagnostics.ProcessStartInfo();
+                    // 设置运行文件
+                    startInfo.FileName = Application.ExecutablePath;
+                    //设置启动动作,确保以管理员身份运行
+                    startInfo.Verb = "runas"; 
+                    //如果不是管理员,则启动UAC 
+                    System.Diagnostics.Process.Start(startInfo);
+                    //退出 System.Windows.Forms.Application.Exit(); 
+                }
+                #endregion
+            }
+            catch (Exception ex) 
+            {
+                string str = GetExceptionMsg(ex, string.Empty);
+                MessageBox.Show(str, "系统错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
+            }
+        }
+
+        static void Application_ThreadException(object sender, System.Threading.ThreadExceptionEventArgs e)
+        {
+            string str = GetExceptionMsg(e.Exception, e.ToString());
+            MessageBox.Show(str, "操作异常", MessageBoxButtons.OK, MessageBoxIcon.Stop);
+        }
+        //未处理的异常统一通过这里返回
+        static void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e)
+        {
+            string str = GetExceptionMsg(e.ExceptionObject as Exception, e.ToString());
+            MessageBox.Show(str, "操作异常", MessageBoxButtons.OK, MessageBoxIcon.Stop);
+        }
+
+        /// <summary>
+        /// 生成自定义异常消息
+        /// </summary>
+        /// <param name="ex">异常对象</param>
+        /// <param name="backStr">备用异常消息:当ex为null时有效</param>
+        /// <returns>异常字符串文本</returns>
+        static string GetExceptionMsg(Exception ex, string backStr)
+        {
+            StringBuilder sb = new StringBuilder();
+            if (ex != null)
+            {
+                sb.AppendLine(ex.Message);
+                LogManager.DoLog(ex.StackTrace);
+                LogManager.DoLog(ex.TargetSite.ToString());
+                //sb.AppendLine(ex.StackTrace);
+                //sb.AppendLine("【异常方法】:" + ex.TargetSite);
+            }
+            LogManager.DoLog(sb.ToString());
+            return sb.ToString();
+        }
+    }
+}

+ 36 - 0
UAS-出货标签管理(泽天)/Properties/AssemblyInfo.cs

@@ -0,0 +1,36 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// 有关程序集的一般信息由以下
+// 控制。更改这些特性值可修改
+// 与程序集关联的信息。
+[assembly: AssemblyTitle("贴标机标签打印")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("贴标机标签打印")]
+[assembly: AssemblyCopyright("Copyright ©  2017")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+//将 ComVisible 设置为 false 将使此程序集中的类型
+//对 COM 组件不可见。  如果需要从 COM 访问此程序集中的类型,
+//请将此类型的 ComVisible 特性设置为 true。
+[assembly: ComVisible(false)]
+
+// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
+[assembly: Guid("af6321b6-3b55-4756-8b0b-110354a7bc1e")]
+
+// 程序集的版本信息由下列四个值组成: 
+//
+//      主版本
+//      次版本
+//      生成号
+//      修订号
+//
+//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值,
+// 方法是按如下所示使用“*”: :
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]

+ 273 - 0
UAS-出货标签管理(泽天)/Properties/Resources.Designer.cs

@@ -0,0 +1,273 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+//     此代码由工具生成。
+//     运行时版本:4.0.30319.42000
+//
+//     对此文件的更改可能会导致不正确的行为,并且如果
+//     重新生成代码,这些更改将会丢失。
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace UAS_LabelMachine.Properties {
+    using System;
+    
+    
+    /// <summary>
+    ///   一个强类型的资源类,用于查找本地化的字符串等。
+    /// </summary>
+    // 此类是由 StronglyTypedResourceBuilder
+    // 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
+    // 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen
+    // (以 /str 作为命令选项),或重新生成 VS 项目。
+    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
+    [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+    [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+    internal class Resources {
+        
+        private static global::System.Resources.ResourceManager resourceMan;
+        
+        private static global::System.Globalization.CultureInfo resourceCulture;
+        
+        [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
+        internal Resources() {
+        }
+        
+        /// <summary>
+        ///   返回此类使用的缓存的 ResourceManager 实例。
+        /// </summary>
+        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+        internal static global::System.Resources.ResourceManager ResourceManager {
+            get {
+                if (object.ReferenceEquals(resourceMan, null)) {
+                    global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("UAS_LabelMachine.Properties.Resources", typeof(Resources).Assembly);
+                    resourceMan = temp;
+                }
+                return resourceMan;
+            }
+        }
+        
+        /// <summary>
+        ///   使用此强类型资源类,为所有资源查找
+        ///   重写当前线程的 CurrentUICulture 属性。
+        /// </summary>
+        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+        internal static global::System.Globalization.CultureInfo Culture {
+            get {
+                return resourceCulture;
+            }
+            set {
+                resourceCulture = value;
+            }
+        }
+        
+        /// <summary>
+        ///   查找 System.Drawing.Bitmap 类型的本地化资源。
+        /// </summary>
+        internal static System.Drawing.Bitmap _1__4_ {
+            get {
+                object obj = ResourceManager.GetObject("_1__4_", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+        
+        /// <summary>
+        ///   查找 System.Drawing.Bitmap 类型的本地化资源。
+        /// </summary>
+        internal static System.Drawing.Bitmap _46 {
+            get {
+                object obj = ResourceManager.GetObject("_46", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+        
+        /// <summary>
+        ///   查找 System.Drawing.Bitmap 类型的本地化资源。
+        /// </summary>
+        internal static System.Drawing.Bitmap bindingNavigatorAddNewItem_Image {
+            get {
+                object obj = ResourceManager.GetObject("bindingNavigatorAddNewItem_Image", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+        
+        /// <summary>
+        ///   查找 System.Drawing.Bitmap 类型的本地化资源。
+        /// </summary>
+        internal static System.Drawing.Bitmap bindingNavigatorDeleteItem_Image {
+            get {
+                object obj = ResourceManager.GetObject("bindingNavigatorDeleteItem_Image", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+        
+        /// <summary>
+        ///   查找 System.Drawing.Bitmap 类型的本地化资源。
+        /// </summary>
+        internal static System.Drawing.Bitmap bindingNavigatorMoveFirstItem_Image {
+            get {
+                object obj = ResourceManager.GetObject("bindingNavigatorMoveFirstItem_Image", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+        
+        /// <summary>
+        ///   查找 System.Drawing.Bitmap 类型的本地化资源。
+        /// </summary>
+        internal static System.Drawing.Bitmap bindingNavigatorMoveLastItem_Image {
+            get {
+                object obj = ResourceManager.GetObject("bindingNavigatorMoveLastItem_Image", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+        
+        /// <summary>
+        ///   查找 System.Drawing.Bitmap 类型的本地化资源。
+        /// </summary>
+        internal static System.Drawing.Bitmap bindingNavigatorMoveNextItem_Image {
+            get {
+                object obj = ResourceManager.GetObject("bindingNavigatorMoveNextItem_Image", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+        
+        /// <summary>
+        ///   查找 System.Drawing.Bitmap 类型的本地化资源。
+        /// </summary>
+        internal static System.Drawing.Bitmap bindingNavigatorMovePreviousItem_Image {
+            get {
+                object obj = ResourceManager.GetObject("bindingNavigatorMovePreviousItem_Image", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+        
+        /// <summary>
+        ///   查找 System.Drawing.Bitmap 类型的本地化资源。
+        /// </summary>
+        internal static System.Drawing.Bitmap close_32px_1181428_easyicon_net {
+            get {
+                object obj = ResourceManager.GetObject("close_32px_1181428_easyicon_net", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+        
+        /// <summary>
+        ///   查找 System.Drawing.Bitmap 类型的本地化资源。
+        /// </summary>
+        internal static System.Drawing.Bitmap close_up_32px_1181430_easyicon_net {
+            get {
+                object obj = ResourceManager.GetObject("close_up_32px_1181430_easyicon_net", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+        
+        /// <summary>
+        ///   查找 System.Drawing.Bitmap 类型的本地化资源。
+        /// </summary>
+        internal static System.Drawing.Bitmap download_17_519713261649px_1200629_easyicon_net__1_ {
+            get {
+                object obj = ResourceManager.GetObject("download_17_519713261649px_1200629_easyicon_net__1_", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+        
+        /// <summary>
+        ///   查找 System.Drawing.Bitmap 类型的本地化资源。
+        /// </summary>
+        internal static System.Drawing.Bitmap Excel_2010_16px_1180011_easyicon_net {
+            get {
+                object obj = ResourceManager.GetObject("Excel_2010_16px_1180011_easyicon_net", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+        
+        /// <summary>
+        ///   查找 System.Drawing.Bitmap 类型的本地化资源。
+        /// </summary>
+        internal static System.Drawing.Bitmap Login_Icon {
+            get {
+                object obj = ResourceManager.GetObject("Login_Icon", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+        
+        /// <summary>
+        ///   查找类似于 (Icon) 的 System.Drawing.Icon 类型的本地化资源。
+        /// </summary>
+        internal static System.Drawing.Icon matte_white_square_icon_business_tool_hammer_96px_571061_easyicon_net {
+            get {
+                object obj = ResourceManager.GetObject("matte_white_square_icon_business_tool_hammer_96px_571061_easyicon_net", resourceCulture);
+                return ((System.Drawing.Icon)(obj));
+            }
+        }
+        
+        /// <summary>
+        ///   查找 System.Drawing.Bitmap 类型的本地化资源。
+        /// </summary>
+        internal static System.Drawing.Bitmap preview_16px_25980_easyicon_net {
+            get {
+                object obj = ResourceManager.GetObject("preview_16px_25980_easyicon_net", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+        
+        /// <summary>
+        ///   查找 System.Drawing.Bitmap 类型的本地化资源。
+        /// </summary>
+        internal static System.Drawing.Bitmap search_16px_1202802_easyicon_net {
+            get {
+                object obj = ResourceManager.GetObject("search_16px_1202802_easyicon_net", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+        
+        /// <summary>
+        ///   查找 System.Drawing.Bitmap 类型的本地化资源。
+        /// </summary>
+        internal static System.Drawing.Bitmap timg {
+            get {
+                object obj = ResourceManager.GetObject("timg", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+        
+        /// <summary>
+        ///   查找 System.Drawing.Bitmap 类型的本地化资源。
+        /// </summary>
+        internal static System.Drawing.Bitmap upload_17_459649122807px_1200703_easyicon_net__1_ {
+            get {
+                object obj = ResourceManager.GetObject("upload_17_459649122807px_1200703_easyicon_net__1_", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+        
+        /// <summary>
+        ///   查找 System.Drawing.Bitmap 类型的本地化资源。
+        /// </summary>
+        internal static System.Drawing.Bitmap users {
+            get {
+                object obj = ResourceManager.GetObject("users", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+        
+        /// <summary>
+        ///   查找 System.Drawing.Bitmap 类型的本地化资源。
+        /// </summary>
+        internal static System.Drawing.Bitmap users_user_72px_523311_easyicon_net {
+            get {
+                object obj = ResourceManager.GetObject("users_user_72px_523311_easyicon_net", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+        
+        /// <summary>
+        ///   查找 System.Drawing.Bitmap 类型的本地化资源。
+        /// </summary>
+        internal static System.Drawing.Bitmap write_15_893687707641px_1181413_easyicon_net {
+            get {
+                object obj = ResourceManager.GetObject("write_15_893687707641px_1181413_easyicon_net", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+    }
+}

+ 184 - 0
UAS-出货标签管理(泽天)/Properties/Resources.resx

@@ -0,0 +1,184 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
+  <data name="bindingNavigatorAddNewItem_Image" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Resources\bindingNavigatorAddNewItem.Image.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
+  <data name="bindingNavigatorDeleteItem_Image" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Resources\bindingNavigatorDeleteItem.Image.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
+  <data name="bindingNavigatorMoveFirstItem_Image" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Resources\bindingNavigatorMoveFirstItem.Image.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
+  <data name="bindingNavigatorMoveLastItem_Image" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Resources\bindingNavigatorMoveLastItem.Image.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
+  <data name="bindingNavigatorMoveNextItem_Image" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Resources\bindingNavigatorMoveNextItem.Image.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
+  <data name="bindingNavigatorMovePreviousItem_Image" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Resources\bindingNavigatorMovePreviousItem.Image.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
+  <data name="close_32px_1181428_easyicon_net" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Resources\close_32px_1181428_easyicon.net.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
+  <data name="close_up_32px_1181430_easyicon_net" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Resources\close_up_32px_1181430_easyicon.net.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
+  <data name="download_17_519713261649px_1200629_easyicon_net__1_" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Resources\download_17.519713261649px_1200629_easyicon.net (1).png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
+  <data name="Excel_2010_16px_1180011_easyicon_net" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Resources\Excel_2010_16px_1180011_easyicon.net.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
+  <data name="Login_Icon" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Resources\Login_Icon.gif;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
+  <data name="preview_16px_25980_easyicon_net" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Resources\preview_16px_25980_easyicon.net.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
+  <data name="search_16px_1202802_easyicon_net" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Resources\search_16px_1202802_easyicon.net.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
+  <data name="timg" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Resources\timg.jpg;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
+  <data name="upload_17_459649122807px_1200703_easyicon_net__1_" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Resources\upload_17.459649122807px_1200703_easyicon.net (1).png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
+  <data name="users" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Resources\users.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
+  <data name="users_user_72px_523311_easyicon_net" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Resources\users_user_72px_523311_easyicon.net.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
+  <data name="_1__4_" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Resources\1 (4).gif;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
+  <data name="_46" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Resources\46.gif;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
+  <data name="matte_white_square_icon_business_tool_hammer_96px_571061_easyicon_net" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Resources\matte_white_square_icon_business_tool_hammer_96px_571061_easyicon.net.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
+  <data name="write_15_893687707641px_1181413_easyicon_net" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Resources\write_15.893687707641px_1181413_easyicon.net.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
+</root>

+ 27 - 0
UAS-出货标签管理(泽天)/Properties/Settings.settings

@@ -0,0 +1,27 @@
+<?xml version='1.0' encoding='utf-8'?>
+<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" GeneratedClassNamespace="UAS_LabelMachine.Properties" GeneratedClassName="Settings">
+  <Profiles />
+  <Settings>
+    <Setting Name="ShareUrl" Type="System.String" Scope="User">
+      <Value Profile="(Default)" />
+    </Setting>
+    <Setting Name="LastLoginMaster" Type="System.String" Scope="User">
+      <Value Profile="(Default)" />
+    </Setting>
+    <Setting Name="IPAddress" Type="System.String" Scope="User">
+      <Value Profile="(Default)" />
+    </Setting>
+    <Setting Name="LastLoginUser" Type="System.String" Scope="User">
+      <Value Profile="(Default)" />
+    </Setting>
+    <Setting Name="FTPAddress" Type="System.String" Scope="User">
+      <Value Profile="(Default)">ftp://218.18.115.198:21|Print|Administrator1@#</Value>
+    </Setting>
+    <Setting Name="MidBoxCapacity" Type="System.Decimal" Scope="User">
+      <Value Profile="(Default)">0</Value>
+    </Setting>
+    <Setting Name="OutboxCapacity" Type="System.Decimal" Scope="User">
+      <Value Profile="(Default)">0</Value>
+    </Setting>
+  </Settings>
+</SettingsFile>

+ 110 - 0
UAS-出货标签管理(泽天)/Properties/Settings1.Designer.cs

@@ -0,0 +1,110 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+//     此代码由工具生成。
+//     运行时版本:4.0.30319.42000
+//
+//     对此文件的更改可能会导致不正确的行为,并且如果
+//     重新生成代码,这些更改将会丢失。
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace UAS_LabelMachine.Properties {
+    
+    
+    [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "14.0.0.0")]
+    internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
+        
+        private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
+        
+        public static Settings Default {
+            get {
+                return defaultInstance;
+            }
+        }
+        
+        [global::System.Configuration.UserScopedSettingAttribute()]
+        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+        [global::System.Configuration.DefaultSettingValueAttribute("")]
+        public string ShareUrl {
+            get {
+                return ((string)(this["ShareUrl"]));
+            }
+            set {
+                this["ShareUrl"] = value;
+            }
+        }
+        
+        [global::System.Configuration.UserScopedSettingAttribute()]
+        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+        [global::System.Configuration.DefaultSettingValueAttribute("")]
+        public string LastLoginMaster {
+            get {
+                return ((string)(this["LastLoginMaster"]));
+            }
+            set {
+                this["LastLoginMaster"] = value;
+            }
+        }
+        
+        [global::System.Configuration.UserScopedSettingAttribute()]
+        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+        [global::System.Configuration.DefaultSettingValueAttribute("")]
+        public string IPAddress {
+            get {
+                return ((string)(this["IPAddress"]));
+            }
+            set {
+                this["IPAddress"] = value;
+            }
+        }
+        
+        [global::System.Configuration.UserScopedSettingAttribute()]
+        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+        [global::System.Configuration.DefaultSettingValueAttribute("")]
+        public string LastLoginUser {
+            get {
+                return ((string)(this["LastLoginUser"]));
+            }
+            set {
+                this["LastLoginUser"] = value;
+            }
+        }
+        
+        [global::System.Configuration.UserScopedSettingAttribute()]
+        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+        [global::System.Configuration.DefaultSettingValueAttribute("ftp://218.18.115.198:21|Print|Administrator1@#")]
+        public string FTPAddress {
+            get {
+                return ((string)(this["FTPAddress"]));
+            }
+            set {
+                this["FTPAddress"] = value;
+            }
+        }
+        
+        [global::System.Configuration.UserScopedSettingAttribute()]
+        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+        [global::System.Configuration.DefaultSettingValueAttribute("0")]
+        public decimal MidBoxCapacity {
+            get {
+                return ((decimal)(this["MidBoxCapacity"]));
+            }
+            set {
+                this["MidBoxCapacity"] = value;
+            }
+        }
+        
+        [global::System.Configuration.UserScopedSettingAttribute()]
+        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+        [global::System.Configuration.DefaultSettingValueAttribute("0")]
+        public decimal OutboxCapacity {
+            get {
+                return ((decimal)(this["OutboxCapacity"]));
+            }
+            set {
+                this["OutboxCapacity"] = value;
+            }
+        }
+    }
+}

+ 69 - 0
UAS-出货标签管理(泽天)/Properties/app.manifest

@@ -0,0 +1,69 @@
+<?xml version="1.0" encoding="utf-8"?>
+<assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1">
+  <assemblyIdentity version="1.0.0.0" name="MyApplication.app" />
+  <trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
+    <security>
+      <requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
+        <!-- UAC 清单选项
+             如果想要更改 Windows 用户帐户控制级别,请使用
+             以下节点之一替换 requestedExecutionLevel 节点。n
+        <requestedExecutionLevel  level="asInvoker" uiAccess="false" />
+        <requestedExecutionLevel  level="requireAdministrator" uiAccess="false" />
+        <requestedExecutionLevel  level="highestAvailable" uiAccess="false" />
+
+            指定 requestedExecutionLevel 元素将禁用文件和注册表虚拟化。
+            如果你的应用程序需要此虚拟化来实现向后兼容性,则删除此
+            元素。
+        -->
+        <requestedExecutionLevel level="asInvoker" uiAccess="false" />
+      </requestedPrivileges>
+      <applicationRequestMinimum>
+        <defaultAssemblyRequest permissionSetReference="Custom" />
+        <PermissionSet class="System.Security.PermissionSet" version="1" Unrestricted="true" ID="Custom" SameSite="site" />
+      </applicationRequestMinimum>
+    </security>
+  </trustInfo>
+  <compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
+    <application>
+      <!-- 设计此应用程序与其一起工作且已针对此应用程序进行测试的
+           Windows 版本的列表。取消评论适当的元素,Windows 将
+           自动选择最兼容的环境。 -->
+      <!-- Windows Vista -->
+      <!--<supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}" />-->
+      <!-- Windows 7 -->
+      <!--<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}" />-->
+      <!-- Windows 8 -->
+      <!--<supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}" />-->
+      <!-- Windows 8.1 -->
+      <!--<supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}" />-->
+      <!-- Windows 10 -->
+      <!--<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}" />-->
+    </application>
+  </compatibility>
+  <!-- 指示该应用程序可以感知 DPI 且 Windows 在 DPI 较高时将不会对其进行
+       自动缩放。Windows Presentation Foundation (WPF)应用程序自动感知 DPI,无需
+       选择加入。选择加入此设置的 Windows 窗体应用程序(目标设定为 .NET Framework 4.6 )还应
+       在其 app.config 中将 "EnableWindowsFormsHighDpiAutoResizing" 设置设置为 "true"。-->
+  <!--
+  <application xmlns="urn:schemas-microsoft-com:asm.v3">
+    <windowsSettings>
+      <dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true</dpiAware>
+    </windowsSettings>
+  </application>
+  -->
+  <!-- 启用 Windows 公共控件和对话框的主题(Windows XP 和更高版本) -->
+  <!--
+  <dependency>
+    <dependentAssembly>
+      <assemblyIdentity
+          type="win32"
+          name="Microsoft.Windows.Common-Controls"
+          version="6.0.0.0"
+          processorArchitecture="*"
+          publicKeyToken="6595b64144ccf1df"
+          language="*"
+        />
+    </dependentAssembly>
+  </dependency>
+  -->
+</assembly>

+ 8 - 0
UAS-出货标签管理(泽天)/PublicMethod/ArrayList.cs

@@ -0,0 +1,8 @@
+using System.Collections;
+
+namespace UAS_LabelMachine
+{
+    internal class ArrayList<T> : ArrayList
+    {
+    }
+}

+ 118 - 0
UAS-出货标签管理(泽天)/PublicMethod/AutoSizeFormClass.cs

@@ -0,0 +1,118 @@
+using System.Collections.Generic;
+using System.Windows.Forms;
+using UAS_LabelMachine.CustomControl;
+
+namespace UAS_LabelMachine.PublicMethod
+{
+    class AutoSizeFormClass
+    {
+        //(1).声明结构,只记录窗体和其控件的初始位置和大小。
+        public struct controlRect
+        {
+            public int Left;
+            public int Top;
+            public int Width;
+            public int Height;
+        }
+        //(2).声明 1个对象
+        //注意这里不能使用控件列表记录 List nCtrl;,因为控件的关联性,记录的始终是当前的大小。
+        //      public List oldCtrl= new List();//这里将西文的大于小于号都过滤掉了,只能改为中文的,使用中要改回西文
+        public List<controlRect> oldCtrl = new List<controlRect>();
+        int ctrlNo = 0;//1;
+        //(3). 创建两个函数
+        //(3.1)记录窗体和其控件的初始位置和大小,
+        public void controllInitializeSize(Control mForm)
+        {
+            controlRect cR;
+            cR.Left = mForm.Left; cR.Top = mForm.Top; cR.Width = mForm.Width; cR.Height = mForm.Height;
+            oldCtrl.Add(cR);//第一个为"窗体本身",只加入一次即可
+            AddControl(mForm);//窗体内其余控件还可能嵌套控件(比如panel),要单独抽出,因为要递归调用
+                              //this.WindowState = (FormWindowState)(2);//记录完控件的初始位置和大小后,再最大化
+                              //0 - Normalize , 1 - Minimize,2- Maximize
+
+        }
+
+        private void AddControl(Control ctl)
+        {
+            foreach (Control c in ctl.Controls)
+            {  //**放在这里,是先记录控件的子控件,后记录控件本身
+               //if (c.Controls.Count > 0)
+               //    AddControl(c);//窗体内其余控件还可能嵌套控件(比如panel),要单独抽出,因为要递归调用
+                controlRect objCtrl;
+                objCtrl.Left = c.Left; objCtrl.Top = c.Top; objCtrl.Width = c.Width; objCtrl.Height = c.Height;
+                oldCtrl.Add(objCtrl);
+                //**放在这里,是先记录控件本身,后记录控件的子控件
+                if (c.Controls.Count > 0)
+                    AddControl(c);//窗体内其余控件还可能嵌套控件(比如panel),要单独抽出,因为要递归调用
+            }
+        }
+        //(3.2)控件自适应大小,
+        public void controlAutoSize(Control mForm)
+        {
+            if (ctrlNo == 0)
+            { //*如果在窗体的Form1_Load中,记录控件原始的大小和位置,正常没有问题,但要加入皮肤就会出现问题,因为有些控件如dataGridView的的子控件还没有完成,个数少
+              //*要在窗体的Form1_SizeChanged中,第一次改变大小时,记录控件原始的大小和位置,这里所有控件的子控件都已经形成
+                controlRect cR;
+                //  cR.Left = mForm.Left; cR.Top = mForm.Top; cR.Width = mForm.Width; cR.Height = mForm.Height;
+                cR.Left = 0; cR.Top = 0; cR.Width = mForm.PreferredSize.Width; cR.Height = mForm.PreferredSize.Height;
+                oldCtrl.Add(cR);//第一个为"窗体本身",只加入一次即可
+                AddControl(mForm);//窗体内其余控件可能嵌套其它控件(比如panel),故单独抽出以便递归调用
+            }
+
+            float wScale = (float)mForm.Width / (float)oldCtrl[0].Width;//新旧窗体之间的比例,与最早的旧窗体
+            float hScale = (float)mForm.Height / (float)oldCtrl[0].Height;//.Height;
+            ctrlNo = 1;//进入=1,第0个为窗体本身,窗体内的控件,从序号1开始
+            AutoScaleControl(mForm, wScale, hScale);//窗体内其余控件还可能嵌套控件(比如panel),要单独抽出,因为要递归调用
+
+        }
+
+        private void AutoScaleControl(Control ctl, float wScale, float hScale)
+        {
+            int ctrLeft0, ctrTop0, ctrWidth0, ctrHeight0;
+            //int ctrlNo = 1;//第1个是窗体自身的 Left,Top,Width,Height,所以窗体控件从ctrlNo=1开始
+            foreach (Control c in ctl.Controls)
+            {
+                //**放在这里,是先缩放控件的子控件,后缩放控件本身
+                //if (c.Controls.Count > 0)
+                //AutoScaleControl(c, wScale, hScale);//窗体内其余控件还可能嵌套控件(比如panel),要单独抽出,因为要递归调用
+                ctrLeft0 = oldCtrl[ctrlNo].Left;
+                ctrTop0 = oldCtrl[ctrlNo].Top;
+                ctrWidth0 = oldCtrl[ctrlNo].Width;
+                ctrHeight0 = oldCtrl[ctrlNo].Height;
+                //c.Left = (int)((ctrLeft0 - wLeft0) * wScale) + wLeft1;//新旧控件之间的线性比例
+                //c.Top = (int)((ctrTop0 - wTop0) * h) + wTop1;
+
+                c.Left = (int)((ctrLeft0) * wScale);//新旧控件之间的线性比例。控件位置只相对于窗体,所以不能加 + wLeft1
+                c.Top = (int)((ctrTop0) * hScale);//
+                //设置指定的类型不进行宽高的变化
+                if (!(c is Button || c is HeadBar||c is Pagination))
+                {
+                    c.Width = (int)(ctrWidth0 * wScale);//只与最初的大小相关,所以不能与现在的宽度相乘 (int)(c.Width * w);
+                    c.Height = (int)(ctrHeight0 * hScale);//
+                }
+                ctrlNo++;//累加序号
+                //**放在这里,是先缩放控件本身,后缩放控件的子控件
+                if (c.Controls.Count > 0)
+                {
+                    AutoScaleControl(c, wScale, hScale);//窗体内其余控件还可能嵌套控件(比如panel),要单独抽出,因为要递归调用
+                }
+            }
+            if (ctl is DataGridView)
+            {
+                DataGridView dgv = ctl as DataGridView;
+                Cursor.Current = Cursors.WaitCursor;
+                int widths = 0;
+                for (int i = 0; i < dgv.Columns.Count; i++)
+                {
+                    dgv.AutoResizeColumn(i, DataGridViewAutoSizeColumnMode.AllCells);  // 自动调整列宽  
+                    widths += dgv.Columns[i].Width;   // 计算调整列后单元列的宽度和                       
+                }
+                if (widths >= ctl.Size.Width)  // 如果调整列的宽度大于设定列宽  
+                    dgv.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.DisplayedCells;  // 调整列的模式 自动  
+                else
+                    dgv.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill;  // 如果小于 则填充  
+                Cursor.Current = Cursors.Default;
+            }
+        }
+    }
+}

+ 771 - 0
UAS-出货标签管理(泽天)/PublicMethod/BaseUtil.cs

@@ -0,0 +1,771 @@
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using System.Data;
+using System.Text;
+using System.Windows.Forms;
+using UAS_LabelMachine.CustomControl;
+using UAS_LabelMachine.CustomControl.GroupBoxWithBorder;
+using static System.Windows.Forms.Control;
+using System.Text.RegularExpressions;
+
+namespace UAS_LabelMachine
+{
+    class BaseUtil
+    {
+
+        static string SysDisc;
+
+        public static string SysDisc1
+        {
+            get
+            {
+                return SysDisc = Environment.GetEnvironmentVariable("windir").Substring(0, 1);
+            }
+
+            set
+            {
+                SysDisc = value;
+            }
+        }
+
+        public static string DToAny(double DB, int Type)
+        {
+            string H = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";
+            long D;
+            double B;
+            string tempD = "", tempB = "";
+            D = (long)DB;
+            B = DB - D;
+            if (D == 0)
+            {
+                tempD = "0";
+            }
+            while (D != 0)
+            {
+                tempD = H[(((int)D % Type))] + tempD;
+                D = D / Type;
+            }
+            for (int i = 0; i < 7; i++)
+            {
+                if (B == 0)
+                {
+                    break;
+                }
+                tempB += H[((int)(B * Type))];
+                B = B * Type - (int)(B * Type);
+            }
+            if (tempB == "")
+            {
+                return tempD;
+            }
+            else
+            {
+                return tempD + "." + tempB;
+            }
+        }
+
+        public static DataTable GetExportDataTable(DataGridView dgv)
+        {
+            DataTable dt = ((DataTable)dgv.DataSource).Copy();
+            for (int i = 0; i < dt.Columns.Count; i++)
+            {
+                for (int j = 0; j < dgv.Columns.Count; j++)
+                {
+                    if (dt.Columns[i].ColumnName.ToLower() == dgv.Columns[j].DataPropertyName.ToLower())
+                    {
+                        dt.Columns[i].ColumnName = dgv.Columns[j].HeaderText;
+                    }
+                }
+            }
+            return dt;
+        }
+
+        /// <summary>
+        /// 通过DataTable的ColumnName和Caption来拼接一条语句
+        /// </summary>
+        /// <param name=""></param>
+        /// <returns></returns>
+        public static string GetGridViewSelectContent(DataGridView d)
+        {
+            StringBuilder selectConetnt = new StringBuilder();
+            DataTable dt = (DataTable)d.DataSource;
+            if (dt == null)
+            {
+                foreach (DataGridViewColumn dc in d.Columns)
+                {
+                    if (dc.DataPropertyName != "" && dc.DataPropertyName != null)
+                    {
+                        selectConetnt.Append(dc.DataPropertyName + " as " + dc.DataPropertyName + ",");
+                    }
+                }
+            }
+            else
+            {
+                foreach (DataColumn dc in dt.Columns)
+                {
+                    selectConetnt.Append(dc.Caption + " as " + dc.ColumnName + ",");
+                }
+            }
+            return selectConetnt.Remove(selectConetnt.Length - 1, 1).ToString();
+        }
+        /// <summary>
+        /// 通过字段和其展示的中文值获取查询的内容
+        /// </summary>
+        /// <param name="field"></param>
+        /// <param name="cnfield"></param>
+        /// <returns></returns>
+        public static string GetSelectContentByStringArray(string[] field, string[] cnfield)
+        {
+            StringBuilder sb = new StringBuilder();
+            for (int i = 0; i < field.Length; i++)
+            {
+                sb.Append(field[i] + " as " + cnfield[i] + ",");
+            }
+            //去掉多余的逗号
+            sb.Remove(sb.Length - 1, 1);
+            return sb.ToString();
+        }
+        /// <summary>
+        ///  传入控件的集合和DataTable,通过判断控件的名称和数据源的列的描述来匹配,支持单层的GroupBox和Panel
+        /// </summary>
+        /// <param name="collection"></param>
+        /// <param name="dt"></param>
+        public static void SetFormValue(ControlCollection collection, DataTable dt)
+        {
+            //DataTable存在数据才进行赋值操作
+            if (dt.Rows.Count > 0)
+            {
+                for (int i = 0; i < collection.Count; i++)
+                {
+                    string controlName = collection[i].Name;
+                    //默认给TextBox和Label赋值
+                    if (collection[i] is TextBox || collection[i] is Label || collection[i] is SearchTextBox)
+                    {
+                        for (int j = 0; j < dt.Columns.Count; j++)
+                        {
+                            if (controlName.ToUpper() == dt.Columns[j].Caption.ToUpper())
+                            {
+                                //字段含有Status内容的才进行转换
+                                if (controlName.ToUpper().Contains("STATUS"))
+                                {
+                                    //对审批状态进行判断
+                                    switch (dt.Rows[0][j].ToString().ToUpper())
+                                    {
+                                        case "ENTERING":
+                                            collection[i].Text = "在录入";
+                                            break;
+                                        case "UNAPPROVED":
+                                            collection[i].Text = "未批准";
+                                            break;
+                                        case "COMMITED":
+                                            collection[i].Text = "已提交";
+                                            break;
+                                        case "APPROVE":
+                                            collection[i].Text = "已批准";
+                                            break;
+                                        case "AUDITED":
+                                            collection[i].Text = "已审核";
+                                            break;
+                                        case "STARTED":
+                                            collection[i].Text = "已下发";
+                                            break;
+                                        case "UNCHECK":
+                                            collection[i].Text = "待检验";
+                                            break;
+                                        case "CHECKING":
+                                            collection[i].Text = "检验中";
+                                            break;
+                                        default:
+                                            collection[i].Text = dt.Rows[0][j].ToString();
+                                            break;
+                                    }
+                                }
+                                else
+                                {
+                                    collection[i].Text = dt.Rows[0][j].ToString();
+                                }
+                            }
+                        }
+                    }
+                    //对封装在GroupBox的和Panel的控件进行批量赋值
+                    if (collection[i] is GroupBox || collection[i] is Panel || collection[i] is GroupBoxWithBorder)
+                    {
+                        for (int j = 0; j < collection[i].Controls.Count; j++)
+                        {
+                            controlName = collection[i].Controls[j].Name;
+                            if (collection[i].Controls[j] is TextBox || collection[i].Controls[j] is Label || collection[i].Controls[j] is SearchTextBox)
+                            {
+                                for (int k = 0; k < dt.Columns.Count; k++)
+                                {
+                                    if (controlName.ToUpper() == dt.Columns[k].Caption.ToUpper())
+                                    {
+                                        collection[i].Controls[j].Text = dt.Rows[0][k].ToString();
+                                    }
+                                }
+                            }
+                        }
+                    }
+                }
+            }
+            //如果没有记录的话,将dt中含有的列的对应值设置为空
+            else
+            {
+                for (int i = 0; i < collection.Count; i++)
+                {
+                    if (collection[i] is TextBox || collection[i] is Label || collection[i] is SearchTextBox)
+                    {
+                        for (int j = 0; j < dt.Columns.Count; j++)
+                        {
+                            if (collection[i].Name.ToUpper() == dt.Columns[j].Caption.ToUpper())
+                            {
+                                collection[i].Text = "";
+                            }
+                        }
+                    }
+                }
+            }
+        }
+
+        /// <summary>
+        /// 获取标签的路径
+        /// </summary>
+        /// <param name="URL"></param>
+        /// <param name="LabelName"></param>
+        /// <returns></returns>
+        public static string GetLabelUrl(string URL, string LabelName, DateTime time)
+        {
+            //如果是传入的数据是从FTP取的文件
+            if (URL.Contains("ftp:"))
+            {
+                ftpOperater ftp = new ftpOperater();
+                return ftp.Download(LabelName, time);
+            }
+            else
+            {
+                return URL;
+            }
+        }
+
+        /// <summary>
+        /// 从DGV获取指定的列的数据形式是数组的形式
+        /// </summary>
+        public static ArrayList[] GetColumnDataFromDGV(DataGridView dgv, string[] ColumnName)
+        {
+            ArrayList[] array = new ArrayList[ColumnName.Length];
+            //实例化和查询参数个数一样的ArrayList
+            for (int i = 0; i < ColumnName.Length; i++)
+            {
+                array[i] = new ArrayList();
+            }
+            DataTable dt = (DataTable)dgv.DataSource;
+            //如果第一列是否选框的话
+            if (dgv.Columns[0] is DataGridViewCheckBoxColumn)
+            {
+                for (int i = 0; i < dt.Rows.Count; i++)
+                {
+                    if (dgv.Rows[i].Cells[0].FormattedValue.ToString() == "True")
+                    {
+
+                        for (int j = 0; j < ColumnName.Length; j++)
+                        {
+                            array[j].Add(dt.Rows[i][ColumnName[j]]);
+                        }
+                    }
+                }
+            }
+            //否则直接获取全部的数据
+            else
+            {
+                for (int i = 0; i < dgv.RowCount; i++)
+                {
+                    for (int j = 0; j < ColumnName.Length; j++)
+                    {
+                        array[j].Add(dt.Rows[i][ColumnName[j]]);
+                    }
+                }
+            }
+            return array;
+        }
+
+        /// <summary>
+        /// 通过DataGridView和需要隐藏的字段的数组来对字段进行隐藏
+        /// </summary>
+        /// <param name="dgv"></param>
+        /// <param name="field"></param>
+        public static void HideField(DataGridView dgv, string[] field)
+        {
+            DataTable dt = (DataTable)dgv.DataSource;
+            foreach (DataColumn dc in dt.Columns)
+            {
+                foreach (string s in field)
+                {
+                    if (dc.Caption == s)
+                    {
+                        dgv.Columns[dc.ColumnName].Visible = false;
+                    }
+                }
+            }
+        }
+
+        /// <summary>
+        /// 通过查询的内容获取到字段的描述
+        /// </summary>
+        /// <param name="field"></param>
+        /// <returns></returns>
+        public static string[] GetCaptionFromField(string field)
+        {
+            string[] caption = field.Split(',');
+            for (int i = 0; i < caption.Length; i++)
+            {
+                caption[i] = caption[i].Substring(0, caption[i].LastIndexOf("as")).Trim();
+            }
+            return caption;
+        }
+
+        /// <summary>
+        /// 通过查询的语句获取查询的字段
+        /// </summary>
+        /// <param name="field"></param>
+        /// <returns></returns>
+        public static string[] GetField(string field)
+        {
+            string[] fields = field.Split(',');
+            for (int i = 0; i < fields.Length; i++)
+            {
+                fields[i] = fields[i].Substring(fields[i].LastIndexOf("as") + 2, fields[i].Length - fields[i].LastIndexOf("as") - 2).Trim();
+            }
+            return fields;
+        }
+
+
+        /// <summary>
+        /// 将DataTable转换为List的键值对
+        /// </summary>
+        /// <param name="dt"></param>
+        /// <returns></returns>
+        public static List<Dictionary<string, string>> DataTableToListDictionary(DataTable dt)
+        {
+            List<Dictionary<string, string>> list = new List<Dictionary<string, string>>();
+            foreach (DataRow dr in dt.Rows)
+            {
+                Dictionary<string, string> dictionary = new Dictionary<string, string>();
+                foreach (DataColumn dc in dt.Columns)
+                {
+                    dictionary.Add(dc.Caption, dr[dt.Columns.IndexOf(dc)].ToString());
+                }
+                list.Add(dictionary);
+            }
+            return list;
+        }
+
+        /// <summary>
+        /// 通过描述取DataTable的列名,主要用于从配置中取数据
+        /// </summary>
+        /// <param name="dt"></param>
+        /// <param name="caption"></param>
+        /// <returns></returns>
+        public static string GetColumnNameByCaption(DataTable dt, string caption)
+        {
+            foreach (DataColumn dc in dt.Columns)
+            {
+                if (dc.Caption.ToLower() == caption)
+                {
+                    return dc.ColumnName;
+                }
+            }
+            return null;
+        }
+
+        //用于封装异常,也可以用于错误的提示
+        public static void ShowError(string errorMessage)
+        {
+            throw new Exception(errorMessage);
+        }
+
+        /// <summary>
+        /// 清除DataTable的结构和数据,清除列结构时需要从最后的一列开始删
+        /// </summary>
+        /// <param name="dt"></param>
+        public static void CleanDataTable(DataTable dt)
+        {
+            for (int i = dt.Columns.Count - 1; i >= 0; i--)
+            {
+                dt.Columns.Remove(dt.Columns[i]);
+            }
+        }
+
+        /// <summary>
+        /// 不清楚表结构,只清楚数据
+        /// </summary>
+        /// <param name="dt"></param>
+        public static void CleanDataTableData(DataTable dt)
+        {
+            for (int i = dt.Rows.Count - 1; i >= 0; i--)
+            {
+                dt.Rows.Remove(dt.Rows[i]);
+            }
+        }
+        /// <summary>
+        /// 获取拼接的字段
+        /// </summary>
+        /// <param name="dt"></param>
+        /// <returns></returns>
+        public static string GetFieldFromDataTable(DataTable dt)
+        {
+            StringBuilder sb = new StringBuilder();
+            foreach (DataColumn dc in dt.Columns)
+            {
+                sb.Append(dc.Caption + ",");
+            }
+            return sb.ToString().Substring(sb.ToString().Length - 1, 1);
+        }
+
+        /// <summary>
+        /// 已经定义好的DataGridView绑定数据,operate是用来添加操作列的
+        /// </summary>
+        /// <param name="dgv"></param>
+        /// <param name="dt"></param>
+        /// <param name="AddOpetateColumn"></param>
+        /// <param name="operate"></param>
+        public static void FillDgvWithDataTable(DataGridView dgv, DataTable dt, params DataGridViewImageColumn[] operate)
+        {
+            dgv.AutoGenerateColumns = false;
+            dgv.DataSource = dt;
+            if (operate.Length > 0)
+            {
+                if (dgv.Columns[operate[0].Name] != null)
+                {
+                    dgv.Columns.Remove(dgv.Columns[operate[0].Name]);
+                }
+                dgv.Columns.Add(operate[0]);
+            }
+            //纯英文的列不予展示
+            //Regex regEnglish = new Regex("^[_][a-z]$");
+            //foreach (DataGridViewColumn dgvc in dgv.Columns)
+            //{
+            //    if (dgvc.HeaderText.IndexOf("_id") > 0)
+            //    {
+            //        dgvc.Visible = false;
+            //    }
+            //}
+        }
+        /// <summary>
+        /// 清除DataGridView的数据
+        /// </summary>
+        /// <param name="dgv"></param>
+        public static void CleanDGVData(DataGridView dgv)
+        {
+            for (int i = dgv.Rows.Count - 1; i >= 0; i--)
+            {
+                dgv.Rows.RemoveAt(i);
+            }
+        }
+
+        /// <summary>
+        /// 清除Form的指定类型的数据
+        /// </summary>
+        /// <param name="Form"></param>
+        public static void CleanForm(Form Form)
+        {
+            for (int i = 0; i < Form.Controls.Count; i++)
+            {
+                if (Form.Controls[i] is EnterTextBox || Form.Controls[i] is TextBox || Form.Controls[i] is RichTextBox || Form.Controls[i] is SearchTextBox)
+                    Form.Controls[i].Text = "";
+                if (Form.Controls[i] is DataGridView)
+                    CleanDGVData((DataGridView)Form.Controls[i]);
+            }
+        }
+
+
+
+        /// <summary>
+        /// 用于给DGV中的Combox列赋静态值
+        /// </summary>
+        /// <param name="dgvc"></param>
+        /// <param name="displayField"></param>
+        /// <param name="valueField"></param>
+        /// <param name="Value"></param>
+        /// <returns></returns>
+        public static void SetDgvColumnComboxData(DataGridViewComboBoxColumn dgvc, string DataPropertyName, string displayField, string valueField, string[] Value)
+        {
+            DataTable dt = new DataTable();
+            dt.Columns.Add(displayField);
+            dt.Columns.Add(valueField);
+            for (int i = 0; i < Value.Length; i++)
+            {
+                DataGridViewRow row = new DataGridViewRow();
+                dt.Rows.Add(row);
+                dt.Rows[i][displayField] = Value[i].Split('#')[0];
+                dt.Rows[i][valueField] = Value[i].Split('#')[1];
+            }
+            dgvc.DataPropertyName = DataPropertyName;
+            dgvc.DataSource = dt;
+            dgvc.DisplayMember = displayField;
+            dgvc.ValueMember = valueField;
+        }
+
+        /// <summary>
+        /// 用于给DGV中的ComboxCell赋静态值
+        /// </summary>
+        /// <param name="dgvcc"></param>
+        /// <param name="displayField"></param>
+        /// <param name="valueField"></param>
+        /// <param name="Value"></param>
+        public static void SetDGVCellComboxData(DataGridViewComboBoxCell dgvcc, string displayField, string valueField, string[] Value)
+        {
+            DataTable dt = new DataTable();
+            dt.Columns.Add(displayField);
+            dt.Columns.Add(valueField);
+            for (int i = 0; i < Value.Length; i++)
+            {
+                DataRow dr = dt.NewRow();
+                dr[displayField] = Value[i].Split('#')[0];
+                dr[valueField] = Value[i].Split('#')[1];
+                dt.Rows.Add(dr);
+            }
+            dgvcc.DisplayMember = displayField;
+            dgvcc.ValueMember = valueField;
+            dgvcc.DataSource = dt;
+        }
+
+        /// <summary>
+        /// 用于给DGV中的ComboxCell赋静态值
+        /// </summary>
+        /// <param name="dgvcc"></param>
+        /// <param name="displayField"></param>
+        /// <param name="valueField"></param>
+        /// <param name="Value"></param>
+        public static void SetComboxData(ComboBox dgvcc, string displayField, string valueField, string[] Value)
+        {
+            DataTable dt = new DataTable();
+            dt.Columns.Add(displayField);
+            dt.Columns.Add(valueField);
+            for (int i = 0; i < Value.Length; i++)
+            {
+                DataRow dr = dt.NewRow();
+                dr[displayField] = Value[i].Split('#')[0];
+                dr[valueField] = Value[i].Split('#')[1];
+                dt.Rows.Add(dr);
+            }
+            dgvcc.DisplayMember = displayField;
+            dgvcc.ValueMember = valueField;
+            dgvcc.DataSource = dt;
+        }
+
+        /// <summary>
+        /// 获取刷选的SQL语句,传入的是TextBox的Control,传入的SQL不带Where条件
+        /// </summary>
+        /// <param name="SQL"></param>
+        /// <param name="Condition"></param>
+        /// <returns></returns>
+        public static string GetScreenSqlCondition(params Control[] Condition)
+        {
+            string condition = " where ";
+            for (int i = 0; i < Condition.Length; i++)
+            {
+                if (i != Condition.Length - 1)
+                {
+                    if (Condition[i] is ComboBox)
+                    {
+                        condition += "(" + Condition[i].Tag + " like " + "'%" + (Condition[i] as ComboBox).SelectedValue + "%' or " + Condition[i].Tag + " is null)  and ";
+                    }
+                    else
+                    {
+                        condition += "(" + Condition[i].Tag + " like " + "'%" + Condition[i].Text + "%' or " + Condition[i].Tag + " is null) and ";
+                    }
+                }
+                else
+                {
+                    if (Condition[i] is ComboBox)
+                    {
+                        condition += "(" + Condition[i].Tag + " like " + "'%" + (Condition[i] as ComboBox).SelectedValue + "%' or " + Condition[i].Tag + " is null)";
+                    }
+                    else
+                    {
+                        condition += "(" + Condition[i].Tag + " like " + "'%" + Condition[i].Text + "%' or " + Condition[i].Tag + " is null)";
+                    }
+                }
+            }
+            return condition;
+        }
+
+        public static void CleanDataGridView(DataGridView dgv)
+        {
+            for (int i = dgv.Columns.Count - 1; i >= 0; i--)
+            {
+                dgv.Columns.RemoveAt(i);
+            }
+        }
+
+        /// <summary>
+        /// 取出SQL中的参数占位符
+        /// </summary>
+        /// <param name="SQL"></param>
+        /// <returns></returns>
+        public static string[] GetParamFromSQL(string SQL)
+        {
+            string[] par = SQL.Split(':');
+            //用来存参数的数组
+            StringBuilder[] addpar = new StringBuilder[par.Length - 1];
+            string[] param = new string[par.Length - 1];
+            for (int i = 0; i < par.Length - 1; i++)
+            {
+                //新建一个char类型的数组用来存储每个字节的变量
+                char[] c = par[i + 1].ToCharArray();
+                addpar[i] = new StringBuilder();
+                for (int j = 0; j < c.Length; j++)
+                {
+                    if (c[j] != ' ' && c[j] != ',' && c[j] != ')')
+                    {
+                        addpar[i].Append(c[j]);
+                    }
+                    else
+                    {
+                        break;
+                    }
+                }
+            }
+
+            for (int i = 0; i < par.Length - 1; i++)
+            {
+                param[i] = addpar[i].ToString();
+            }
+            return param;
+        }
+
+        public static void SetFormCenter(Form form)
+        {
+            form.StartPosition = FormStartPosition.CenterParent;
+        }
+
+        /// <summary>
+        /// 设置DataGridView的指定列可编辑
+        /// </summary>
+        /// <param name="DGV"></param>
+        /// <param name="EditAbleField"></param>
+        public static void SetDataGridViewReadOnly(DataGridView DGV, string[] EditAbleField)
+        {
+            foreach (DataGridViewColumn dc in DGV.Columns)
+            {
+                dc.ReadOnly = true;
+                foreach (string s in EditAbleField)
+                {
+                    if (dc.Name.ToLower() == s.ToLower())
+                    {
+                        DGV.Columns[dc.Name].ReadOnly = false;
+                    }
+                }
+            }
+        }
+
+        //判断带有CheckBox的DGV是否有项目勾选了
+        public static DataTable DGVIfChecked(DataGridView dgv)
+        {
+            int CheckCount = 0;
+            DataTable dt = new DataTable();
+            //第一列是勾选框,排除在循环之外
+            for (int i = 1; i < dgv.Columns.Count; i++)
+            {
+                dt.Columns.Add(dgv.Columns[i].Name);
+            }
+            for (int i = 0; i < dgv.RowCount; i++)
+            {
+                if (dgv.Rows[i].Cells[0].Value != null)
+                {
+                    if (dgv.Rows[i].Cells[0].Value.ToString() == "True")
+                    {
+                        if (dgv.Rows[i].Tag.ToString() == "SonRow")
+                        {
+                            DataRow dr = dt.NewRow();
+                            for (int j = 1; j < dgv.ColumnCount; j++)
+                            {
+                                dr[dgv.Columns[j].Name] = dgv.Rows[i].Cells[j].FormattedValue;
+                            }
+                            dt.Rows.Add(dr);
+                            CheckCount++;
+                        }
+                    }
+                }
+            }
+            //判断是否勾选了明细
+            if (CheckCount == 0)
+            {
+                return null;
+            }
+            return dt;
+        }
+
+        /// <summary>
+        /// 设置只允许输入数字
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
+        public static void NumOnly(object sender, KeyPressEventArgs e)
+        {
+            if (e.KeyChar != '\b')//这是允许输入退格键
+            {
+                if ((e.KeyChar < '0') || (e.KeyChar > '9'))//这是允许输入0-9数字
+                {
+                    e.Handled = true;
+                }
+            }
+        }
+
+        public static Dictionary<string, object> ToDictionary(string JsonData)
+        {
+            object Data = null;
+            Dictionary<string, object> Dic = new Dictionary<string, object>();
+            if (JsonData.StartsWith("["))
+            {
+                //如果目标直接就为数组类型,则将会直接输出一个Key为List的List<Dictionary<string, object>>集合 
+                //使用示例List<Dictionary<string, object>> ListDic = (List<Dictionary<string, object>>)Dic["List"]; 
+                List<Dictionary<string, object>> List = new List<Dictionary<string, object>>();
+                MatchCollection ListMatch = Regex.Matches(JsonData, @"{[\s\S]+?}");//使用正则表达式匹配出JSON数组 
+                foreach (Match ListItem in ListMatch)
+                {
+                    List.Add(ToDictionary(ListItem.ToString()));//递归调用 
+                }
+                Data = List;
+                Dic.Add("List", Data);
+            }
+            else
+            {
+                MatchCollection Match = Regex.Matches(JsonData, @"""(.+?)"": {0,1}(\[[\s\S]+?\]|null|"".+?""|-{0,1}\d*)");//使用正则表达式匹配出JSON数据中的键与值 
+                foreach (Match item in Match)
+                {
+                    try
+                    {
+                        if (item.Groups[2].ToString().StartsWith("["))
+                        {
+                            //如果目标是数组,将会输出一个Key为当前Json的List<Dictionary<string, object>>集合 
+                            //使用示例List<Dictionary<string, object>> ListDic = (List<Dictionary<string, object>>)Dic["Json中的Key"]; 
+                            List<Dictionary<string, object>> List = new List<Dictionary<string, object>>();
+                            MatchCollection ListMatch = Regex.Matches(item.Groups[2].ToString(), @"{[\s\S]+?}");//使用正则表达式匹配出JSON数组 
+                            foreach (Match ListItem in ListMatch)
+                            {
+                                List.Add(ToDictionary(ListItem.ToString()));//递归调用 
+                            }
+                            Data = List;
+                        }
+                        else if (item.Groups[2].ToString().ToLower() == "null") Data = null;//如果数据为null(字符串类型),直接转换成null
+                        else Data = item.Groups[2].ToString(); //数据为数字、字符串中的一类,直接写入 
+                        Dic.Add(item.Groups[1].ToString(), Data);
+                    }
+                    catch { }
+                }
+            }
+            return Dic;
+        }
+
+        public static string AddField(string[] Fields)
+        {
+            string sql = " ";
+            foreach (string field in Fields)
+            {
+                sql += field + ",";
+            }
+            return sql.Substring(0, sql.Length - 1);
+        }
+    }
+}

+ 1202 - 0
UAS-出货标签管理(泽天)/PublicMethod/DataHelper.cs

@@ -0,0 +1,1202 @@
+using Oracle.ManagedDataAccess.Client;
+using System;
+using System.Data;
+using System.Text;
+using System.Collections;
+using UAS_LabelMachine.PublicMethod;
+using System.Collections.Generic;
+
+namespace UAS_LabelMachine
+{
+    public class DataHelper
+    {
+
+        ////富为外网地址
+        //private readonly string ConnectionStrings = "Data Source=richwellgroup.com.cn/orcl;User ID=DATACENTER;PassWord=select!#%*(";
+        ////富为ERP地址
+        //public static readonly string ERPAddesss = "http://richwellgroup.com.cn:8099/ERP/";
+        ////富为FTP
+        //public static readonly string FTPAdress = "ftp://richwellgroup.com.cn|printuser|printuser";
+        ////Oracle端口
+        //public static readonly string OraclePort = "1521";
+        ////需要显示的账套
+        //public static readonly string Masters = "JDTSY,FW_JDT,N_DATACENTER,FY_TEST,JD_TEST,XY_TEST,FW_TEST,DATACENTER,FW,XY,FY";
+
+        ////怡海能达外网地址
+        //private readonly string ConnectionStrings = "Connection Timeout=0;Pooling=false;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)));";
+        ////怡海能达ERP地址
+        //public static readonly string ERPAddesss = "http://sz.hi-mantech.com:8099/ERP/";
+        ////怡海能达FTP
+        //public static readonly string FTPAdress = "ftp://sz.hi-mantech.com:46688|yhndftp|Stga28ytG8";
+        ////Oracle端口
+        //public static readonly string OraclePort = "1521";
+        ////需要显示的账套
+        //public static readonly string Masters = "YHND_SZ,YHND_HK,DATACENTER";
+
+        ////华商龙外网地址
+        //private readonly string ConnectionStrings = "Connection Timeout=0;Pooling=false;Password=select!#%*(;User ID=YITOA_DATACENTER;Pooling=false;Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=218.18.115.198)(PORT=1523)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)));";
+        ////华商龙ERP地址
+        //public static readonly string ERPAddesss = "http://218.18.115.198:8888/ERP/";
+        ////华商龙FTP
+        //public static readonly string FTPAdress = "ftp://218.18.115.198:21|Print|Administrator1@#";
+        ////Oracle端口
+        //public static readonly string OraclePort = "1523";
+        ////需要显示的账套
+        //public static readonly string Masters = "XSQ,N_YITOA_YWC,ZXN,N_YITOA_LHCT,N_YITOA_CT,N_CHL,N_YITOA_HK,N_HUASL_SHTL,N_WILICHK,N_WILIC,N_E_SHINE_SH,N_SHBJ,N_BJKG,N_HUASL,N_HUASL_QD,N_HUASL_XM,N_HUASL_SZ";
+
+        //泽天外网地址
+        private readonly string ConnectionStrings = "Connection Timeout=0;Pooling=false;Password=select!#%*(;User ID=ZT_TEST;Pooling=false;Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=183.47.41.2)(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)));";
+        //泽天ERP地址
+        public static readonly string ERPAddesss = "http://183.47.41.2:8099/ERP/";
+        //泽天FTP
+        public static readonly string FTPAdress = "ftp://183.47.41.3:21|uas|Zt2018";
+        //Oracle端口
+        public static readonly string OraclePort = "1521";
+        //需要显示的账套
+        public static readonly string Masters = "ZT_TEST";
+        //用户选择的数据库的连接字符串
+        public static string DBConnectionString;
+        static OracleConnection connection = null;
+        static OracleCommand command = null;
+        /// <summary>
+        /// 重置连接的次数
+        /// </summary>
+        int ReconnectTime = 0;
+        /// <summary>
+        /// 执行构造函数的时候打开数据库的链接
+        /// </summary>
+        public DataHelper()
+        {
+            try
+            {
+                //如果选择的是默认数据则直接用配置文件的信息连接,否则选择数据库的账套信息
+                if (DBConnectionString == null || DBConnectionString == ConnectionStrings)
+                {
+                    DBConnectionString = ConnectionStrings;
+                    connection = new OracleConnection(ConnectionStrings);
+                }
+                else
+                {
+                    connection = new OracleConnection(DBConnectionString);
+                }
+                connection.Open();
+            }
+            catch (Exception e) { LogManager.DoLog(e.Message); }
+        }
+
+        /// <summary>
+        /// 
+        /// </summary>
+        public void Dispose()
+        {
+            connection.Dispose();
+        }
+
+        /// <summary>
+        /// 根据表名获取该表字段数据类型
+        /// </summary>
+        public DataTable GetColumnDataType(string TableName)
+        {
+            DataTable dt = new DataTable();
+            command = new OracleCommand("select Column_Name,Data_Type from cols where TABLE_name=upper('" + TableName + "')", connection);
+            OracleDataAdapter ad = new OracleDataAdapter(command);
+            ad.Fill(dt);
+            ad.Dispose();
+            command.Dispose();
+            return dt;
+        }
+
+        public object GetLabelParam(string sql)
+        {
+            DataTable dt = new DataTable();
+            command = new OracleCommand(sql, connection);
+            OracleDataAdapter ad = new OracleDataAdapter();
+            ad.SelectCommand = command;
+            ad.Fill(dt);
+            if (dt.Rows.Count > 0)
+            {
+                ad.Dispose();
+                command.Dispose();
+                return dt.Rows[0][0];
+            }
+            else { command.Dispose(); return ""; }
+        }
+
+        /// <summary>
+        /// 获取第一行第一列的信息
+        /// </summary>
+        public object getFieldDataByCondition(string TableName, string Field, string Condition)
+        {
+            DataTable dt = new DataTable();
+            string sql = "select " + Field + " from " + TableName + " where " + Condition;
+            command = new OracleCommand(sql, connection);
+            OracleDataAdapter ad = new OracleDataAdapter();
+            ad.SelectCommand = command;
+            try
+            {
+                ad.Fill(dt);
+                ReconnectTime = 0;
+            }
+            catch (Exception)
+            {
+                if (ReconnectTime == 0)
+                {
+                    ReconnectTime++;
+                    connection = new OracleConnection(DBConnectionString);
+                    //成功执行后将重复连接数置为0
+                    dt = (DataTable)getFieldDataByCondition(TableName, Field, Condition);
+                }
+            }
+
+            if (dt.Rows.Count > 0)
+            {
+                ad.Dispose();
+                command.Dispose();
+                return dt.Rows[0][0];
+            }
+            else
+            {
+                ad.Dispose();
+                command.Dispose();
+                return "";
+            }
+        }
+
+        /// <summary>
+        /// 执行打印的SQL
+        /// </summary>
+        /// <param name="SQL">SQL语句</param>
+        /// <param name="Parameters">动态添加的参数,主要根据条码枪扫描获取</param>
+        /// <returns></returns>
+        public object ExecutePrintSQL(string SQL, params string[] Parameters)
+        {
+            //按照?拆分数据,然后以:Param替换问号,同时添加参数
+            string[] Param = SQL.Split('?');
+            int ParamNum = Param.Length - 1;
+            //条码打印必然存在需要维护的参数
+            if (ParamNum > 0)
+            {
+                StringBuilder sb = new StringBuilder();
+                for (int i = 0; i < ParamNum; i++)
+                {
+                    sb.Append(Param[i] + ":Param" + i);
+                }
+                command = new OracleCommand(sb.ToString(), connection);
+
+                for (int i = 0; i < ParamNum; i++)
+                {
+                    command.Parameters.Add("Param" + i, OracleDbType.Varchar2, Parameters[i], ParameterDirection.Input);
+                }
+
+                OracleDataAdapter ad = new OracleDataAdapter(command);
+                DataTable dt = new DataTable();
+                ad.Fill(dt);
+                ad.Dispose();
+                command.Dispose();
+                return dt;
+            }
+            return "参数错误,请检查SQL语句";
+        }
+
+        /// <summary>
+        /// 获取指定表的记录的条数 ,带条件
+        /// </summary>
+        /// <returns></returns>
+        public int getRowCount(string TableName, string Condition)
+        {
+            DataTable dt = new DataTable();
+            string sql = "select count(1) from " + TableName + " where " + Condition;
+            command = new OracleCommand(sql, connection);
+            OracleDataAdapter ad = new OracleDataAdapter(command);
+            ad.Fill(dt);
+            int count = int.Parse(dt.Rows[0][0].ToString());
+            command.Dispose();
+            return count;
+        }
+
+        /// <summary>
+        /// 获取指定表的记录的条数 ,不带条件
+        /// </summary>
+        /// <param name="TableName"></param>
+        /// <returns></returns>
+        public int getRowCount(string TableName)
+        {
+            DataTable dt = new DataTable();
+            string sql = "select count(1) from " + TableName;
+            command = new OracleCommand(sql, connection);
+            OracleDataAdapter ad = new OracleDataAdapter(command);
+            ad.Fill(dt);
+            int count = int.Parse(dt.Rows[0][0].ToString());
+            command.Dispose();
+            return count;
+        }
+
+        /// <summary>
+        /// 通过表名和获取单行的记录
+        /// </summary>
+        public DataTable getFieldsDataByCondition(string TableName, string[] Fields, string Condition)
+        {
+            DataTable dt = new DataTable();
+            string sql = "select ";
+            sql += AddField(Fields);
+            sql += " from " + TableName + " where " + Condition + " and rownum=1";
+            command = new OracleCommand(sql, connection);
+            OracleDataAdapter ad = new OracleDataAdapter(command);
+            ad.Fill(dt);
+            command.Dispose();
+            return dt;
+        }
+
+        /// <summary>
+        /// 通过表名和获取单行的记录
+        /// </summary>
+        public DataTable getFieldsDatasByCondition(string sql)
+        {
+            DataTable dt = new DataTable();
+            command = new OracleCommand(sql, connection);
+            OracleDataAdapter ad = new OracleDataAdapter(command);
+            ad.Fill(dt);
+            command.Dispose();
+            return dt;
+        }
+
+        /// <summary>
+        /// 将DataTable导入到指定的表中
+        /// </summary>
+        /// <param name="DataTable"></param>
+        /// <param name="TableName"></param>
+        public void InsertDataTable(DataTable DataTable, string TableName)
+        {
+            for (int i = 0; i < DataTable.Rows.Count; i++)
+            {
+                for (int j = 0; j < DataTable.Columns.Count; j++)
+                {
+
+                }
+            }
+        }
+
+        /// <summary>
+        /// 按分页获取数据
+        /// </summary>
+        /// <param name="TableName">表名</param>
+        /// <param name="Fields">查询字段</param>
+        /// <param name="CurrentPage">当前页面</param>
+        /// <param name="PageSize">页面展示条数</param>
+        /// <param name="Caller"></param>
+        /// <returns></returns>
+        // SELECT * FROM (SELECT   A.*  FROM (SELECT* FROM datalist) A WHERE ROWNUM <= 50) WHERE ROWNUM >= 21
+        public DataTable getFieldsDatasByPageing(string TableName, string Fields, int CurrentPage, int PageSize, string Caller, params string[] condition)
+        {
+            DataTable dt = new DataTable();
+            StringBuilder sql = new StringBuilder();
+            //先查询出配置出去的列
+            //获取查询的列
+            string[] caption = GetCaptionFromField(Fields);
+            //获取对应列的描述
+            string[] field = GetField(Fields);
+            sql.Append(" select * from (select RowNum RN, A.* from (select ");
+            sql.Append(AddField(caption));
+            if (condition.Length > 0)
+            {
+                if (condition[0].Trim() != "")
+                {
+                    sql.Append(" from " + TableName + " where " + condition[0] + " ) A where ROWNUM <=" + CurrentPage * PageSize + ") where RN>" + (CurrentPage - 1) * PageSize);
+                }
+                else
+                {
+                    sql.Append(" from " + TableName + ") A where ROWNUM <= " + CurrentPage * PageSize + ") where RN> " + (CurrentPage - 1) * PageSize);
+                }
+            }
+            command = new OracleCommand(sql.ToString(), connection);
+            OracleDataAdapter ad = new OracleDataAdapter(command);
+            ad.Fill(dt);
+            dt.Columns.RemoveAt(0);
+            foreach (DataColumn dc in dt.Columns)
+            {
+                dc.ColumnName = field[dt.Columns.IndexOf(dc)];
+                dc.Caption = caption[dt.Columns.IndexOf(dc)];
+            }
+            command.Dispose();
+            return dt;
+        }
+
+        /// <summary>
+        /// 通过表名,字段和条件获取DataTable类型的数据
+        /// </summary>
+        public DataTable getFieldsDatasByCondition(string TableName, string[] Fields, string Condition)
+        {
+            DataTable dt = new DataTable();
+            string sql = "select ";
+            sql += AddField(Fields);
+            sql += " from " + TableName + " where " + Condition;
+            command = new OracleCommand(sql, connection);
+            OracleDataAdapter ad = new OracleDataAdapter(command);
+            ad.Fill(dt);
+            command.Dispose();
+            return dt;
+        }
+
+        /// <summary>
+        /// 通过表名,字段获取DataTable类型的数据
+        /// </summary>
+        public string[] getFieldsDatas(string TableName, string Fields)
+        {
+            ArrayList arr = new ArrayList();
+            DataTable dt = new DataTable();
+            string sql = "select ";
+            sql += Fields;
+            sql += " from " + TableName;
+            command = new OracleCommand(sql, connection);
+            OracleDataAdapter ad = new OracleDataAdapter(command);
+            ad.SelectCommand = command;
+            ad.Fill(dt);
+            foreach (DataRow dc in dt.Rows)
+            {
+                arr.Add(dc[Fields]);
+            }
+            ad.Dispose();
+            command.Dispose();
+            return (string[])arr.ToArray(typeof(string));
+        }
+
+        /// <summary>
+        /// 通过表名,字段获取DataTable类型的数据
+        /// </summary>
+        public string[] getFieldsDatas(string TableName, string Fields, string Condition)
+        {
+            ArrayList arr = new ArrayList();
+            DataTable dt = new DataTable();
+            string sql = "select ";
+            sql += Fields;
+            sql += " from " + TableName + " where " + Condition;
+            command = new OracleCommand(sql, connection);
+            OracleDataAdapter ad = new OracleDataAdapter(command);
+            ad.SelectCommand = command;
+            ad.Fill(dt);
+            foreach (DataRow dc in dt.Rows)
+            {
+                arr.Add(dc[Fields]);
+            }
+            ad.Dispose();
+            command.Dispose();
+            return (string[])arr.ToArray(typeof(string));
+        }
+
+        /// <summary>
+        /// 根据DataTable和指定的表名更新数据,如果需要保存新增的数据则需要传递一条Insert的SQL
+        /// </summary>
+        /// <param name="DataTable"></param>
+        /// <param name="TableName"></param>
+        /// <param name="Condition"></param>
+        public void UpDateTableByCondition(DataTable DataTable, string TableName, string PrimaryKey, params string[] sql)
+        {
+            if (DataTable == null)
+            {
+                return;
+            }
+            StringBuilder sb = new StringBuilder();
+            //预防插入的DataTable中存在不属于该表的列,在进行下一步操作之前全部剔除
+            DataTable data = (DataTable)ExecuteSql("select Column_Name,Data_Type from cols where TABLE_name=upper('" + TableName + "')", "select");
+            //将所有的字段拼接起来
+            for (int i = 0; i < data.Rows.Count; i++)
+            {
+                sb.Append("#" + data.Rows[i]["Column_Name"].ToString());
+            }
+            //移除掉所有不属于该表的列
+            for (int i = DataTable.Columns.Count - 1; i >= 0; i--)
+            {
+                if (!sb.ToString().Contains(DataTable.Columns[i].ColumnName.ToUpper()))
+                {
+                    DataTable.Columns.RemoveAt(i);
+                }
+            }
+            sb.Clear();
+            //计算有多少个是新加的行,根据主键为空来进行判断
+            int NewRowCount = 0;
+            for (int i = 0; i < DataTable.Rows.Count; i++)
+            {
+                if (DataTable.Rows[i][PrimaryKey] == null || DataTable.Rows[i][PrimaryKey].ToString() == "")
+                {
+                    NewRowCount = NewRowCount + 1;
+                }
+            }
+            if (sql.Length > 0)
+            {
+                if (NewRowCount > 0)
+                {
+                    //获取参数的个数
+                    int paramsNum = sql[0].Split(':').Length - 1;
+
+                    //解析参数的数据
+                    string[] param = GetParamFromSQL(sql[0]);
+                    //新建一个二维数组去
+                    string[][] param_array = new string[paramsNum][];
+                    //实例化每个一维数组
+                    for (int i = 0; i < paramsNum; i++)
+                    {
+                        param_array[i] = new string[NewRowCount];
+                    }
+                    //设置每列参数的索引
+                    int num = 0;
+                    //变量所有的行,如果有主键为空的则移除,不为空的进行参数的拼接
+                    for (int i = DataTable.Rows.Count - 1; i >= 0; i--)
+                    {
+                        if (DataTable.Rows[i][PrimaryKey] == null || DataTable.Rows[i][PrimaryKey].ToString() == "")
+                        {
+                            //当为新添加行的时候才去设置参数,设置过后索引+1
+                            for (int j = 0; j < paramsNum; j++)
+                            {
+                                param_array[j][num] = DataTable.Rows[i][param[j]].ToString();
+                            }
+                            DataTable.Rows.RemoveAt(i);
+                            num++;
+                        }
+                    }
+                    BatchInsertDataTable(sql[0], param, param_array);
+                }
+            }
+            //不是新增行的启用更新的方法
+            sb.Append("update " + TableName + " set ");
+            //拼接语句,特殊处理日期
+            foreach (DataColumn dc in DataTable.Columns)
+            {
+                if (!dc.DataType.ToString().Equals("System.DateTime"))
+                {
+                    sb.Append(dc.Caption + "=:" + dc.Caption + ",");
+                }
+                else
+                {
+                    sb.Append(dc.Caption + "=:" + dc.Caption + ",");
+                }
+            }
+            sb.Remove(sb.Length - 1, 1);
+            sb.Append(" where " + PrimaryKey + "=:" + PrimaryKey);
+            command = new OracleCommand(sb.ToString(), connection);
+            OracleDataAdapter ad = new OracleDataAdapter(command);
+
+            // 参数的长度是DataTable的行数决定的
+            command.ArrayBindCount = DataTable.Rows.Count;
+            //默认全部是Varchar2类型的
+            OracleDbType ob = OracleDbType.Varchar2;
+            for (int i = 0; i < DataTable.Columns.Count; i++)
+            {
+                object[] param = new object[DataTable.Rows.Count];
+                for (int j = 0; j < DataTable.Rows.Count; j++)
+                {
+                    DateTime dt = DateTime.Now;
+                    //if (DateTime.TryParse(DataTable.Rows[j][i].ToString(), out dt))
+                    //{
+                    //    param[j] = dt;
+                    //    ob = OracleDbType.Date;
+                    //}
+                    //else
+                    //{
+                    ob = OracleDbType.Varchar2;
+                    param[j] = DataTable.Rows[j][i];
+                    //}
+                }
+                //添加批量更新的参数
+                command.Parameters.Add(new OracleParameter(DataTable.Columns[i].Caption, ob, param, ParameterDirection.Input));
+            }
+            ad.UpdateCommand = command;
+            ad.Update(DataTable);
+            command.Dispose();
+            ad.Dispose();
+        }
+
+        public void SaveDataTable(DataTable dt, string TableName, string ID, params string[] sql)
+        {
+            if (dt == null)
+            {
+                return;
+            }
+            StringBuilder sb = new StringBuilder();
+            //预防插入的DataTable中存在不属于该表的列,在进行下一步操作之前全部剔除
+            DataTable data = (DataTable)ExecuteSql("select Column_Name,Data_Type from cols where TABLE_name=upper('" + TableName + "')", "select");
+            //将所有的字段拼接起来
+            for (int i = 0; i < data.Rows.Count; i++)
+            {
+                sb.Append("#" + data.Rows[i]["Column_Name"].ToString());
+            }
+            //移除掉所有不属于该表的列
+            for (int i = dt.Columns.Count - 1; i >= 0; i--)
+            {
+                if (!sb.ToString().Contains(dt.Columns[i].ColumnName.ToUpper()))
+                {
+                    dt.Columns.RemoveAt(i);
+                }
+            }
+            sb.Clear();
+            //计算有多少个是新加的行,根据主键为空来进行判断
+            int NewRowCount = 0;
+            for (int i = 0; i < dt.Rows.Count; i++)
+            {
+                if (dt.Rows[i][ID] == null || dt.Rows[i][ID].ToString() == "")
+                {
+                    NewRowCount = NewRowCount + 1;
+                }
+            }
+            if (sql.Length > 0)
+            {
+                if (NewRowCount > 0)
+                {
+                    //获取参数的个数
+                    int paramsNum = sql[0].Split(':').Length - 1;
+
+                    //解析参数的数据
+                    string[] param = GetParamFromSQL(sql[0]);
+                    //新建一个二维数组去
+                    string[][] param_array = new string[paramsNum][];
+                    //实例化每个一维数组
+                    for (int i = 0; i < paramsNum; i++)
+                    {
+                        param_array[i] = new string[NewRowCount];
+                    }
+                    //设置每列参数的索引
+                    int num = 0;
+                    //变量所有的行,如果有主键为空的则移除,不为空的进行参数的拼接
+                    for (int i = dt.Rows.Count - 1; i >= 0; i--)
+                    {
+                        if (dt.Rows[i][ID] == null || dt.Rows[i][ID].ToString() == "")
+                        {
+                            //当为新添加行的时候才去设置参数,设置过后索引+1
+                            for (int j = 0; j < paramsNum; j++)
+                            {
+                                param_array[j][num] = dt.Rows[i][param[j]].ToString();
+                            }
+                            dt.Rows.RemoveAt(i);
+                            num++;
+                        }
+                    }
+                    BatchInsertDataTable(sql[0], param, param_array);
+                }
+            }
+            sb.Clear();
+            sb.Append("update " + TableName + " set ");
+            int ColumnCount = dt.Columns.Count;
+            int RowCount = dt.Rows.Count;
+            //存数据的参数
+            List<string[]> Parameter = new List<string[]>();
+            //存参数名的参数
+            string[] ParName = new string[ColumnCount];
+            for (int i = 0; i < ColumnCount; i++)
+            {
+                ParName[i] = dt.Columns[i].ColumnName;
+                if (i == dt.Columns.Count - 1)
+                    sb.Append(dt.Columns[i].ColumnName + "=:" + dt.Columns[i].ColumnName);
+                else
+                    sb.Append(dt.Columns[i].ColumnName + "=:" + dt.Columns[i].ColumnName + ",");
+            }
+            sb.Append(" where " + ID + " =:" + ID);
+            //先添加参数
+            Parameter.Add(ParName);
+            //添加参数的具体内容
+            for (int i = 0; i < ColumnCount; i++)
+            {
+                string[] par = new string[RowCount];
+                for (int j = 0; j < RowCount; j++)
+                {
+                    par[j] = dt.Rows[j][i].ToString();
+                }
+                Parameter.Add(par);
+            }
+            BatchInsert(sb.ToString(), Parameter.ToArray());
+        }
+
+        /// <summary>
+        /// 获取DbFind的数据的DataTable的结构
+        /// </summary>
+        /// <param name="field"></param>
+        /// <param name="caller"></param>
+        /// <returns></returns>
+        public DataTable GetDbFindDataTable(string field, string caller)
+        {
+            string sql = "select * from dbfindsetui where ds_caller='" + caller + "' and ds_whichui='" + field + "'";
+            DataTable dt = (DataTable)ExecuteSql(sql, "select");
+            if (dt.Rows.Count != 0)
+            {
+                //通过#号分割字段
+                string[] dbfield = dt.Rows[0]["ds_findtoui"].ToString().Split('#');
+                string[] cnfield = dt.Rows[0]["ds_dbcaption"].ToString().Split('#');
+                //获取查询要查询的Table
+                string dbtable = dt.Rows[0]["ds_tables"].ToString();
+                //拼接查询的字段
+                for (int i = 0; i < dbfield.Length; i++)
+                {
+                    dbfield[i] = dbfield[i].Split(',')[0];
+                }
+                //新建一个空的DataTable
+                DataTable dt1 = new DataTable();
+                //往空的DataTable添加结构,ColumnName是中文,Caption是实际的字段名称
+                for (int i = 0; i < cnfield.Length; i++)
+                {
+                    dt1.Columns.Add(cnfield[i]);
+                    dt1.Columns[i].Caption = dbfield[i];
+                }
+                //返回一个带有结构的空的DataTable
+                // DbFind.BindTable1 = dbtable;
+                return dt1;
+            }
+            else
+            {
+                return null;
+            }
+        }
+
+        /// <summary>
+        ///  获取配置列表中的数据,支持DaatList,Form,DetailGrid
+        /// </summary>
+        /// <param name="Caller"></param>
+        /// <param name="Type"></param>
+        /// <param name="condition"></param>
+        /// <returns></returns>
+        public DataTable GetConfigureData(string Caller, string Type, string condition)
+        {
+            DataTable dt = new DataTable();
+            //用于拼接SQL语句
+            StringBuilder Sql = new StringBuilder();
+            //用于设置不同Type时设置对应表的字段
+            string getField = "";
+            string getCaption = "";
+            string getTable = "";
+            switch (Type.ToUpper())
+            {
+                case "DATALIST":
+                    getField = "dld_field"; getCaption = "dld_caption"; getTable = "dld_table";
+                    Sql.Append("select * from datalistdetail where dld_caller='" + Caller + "'");
+                    break;
+                case "FORM":
+                    getField = "fd_field"; getCaption = "fd_caption"; getTable = "fd_table";
+                    Sql.Append("select * from formdetail where fd_foid=( select fo_id from form where fo_caller='" + Caller + "')");
+                    break;
+                case "DETAILGRID":
+                    getField = "dg_field"; getCaption = "dg_caption"; getTable = "dg_table";
+                    Sql.Append("select * from detailgrid  where dg_caller='" + Caller + "'");
+                    break;
+            }
+            command = new OracleCommand(Sql.ToString(), connection);
+            OracleDataAdapter ad = new OracleDataAdapter(command);
+            ad.Fill(dt);
+            //清除掉之前的内容重新拼接
+            Sql.Clear();
+            Sql.Append("select ");
+            string[] field = new string[dt.Rows.Count];
+            string[] caption = new string[dt.Rows.Count];
+            DataTable dt1 = new DataTable();
+            //记录描述和字段名称
+            foreach (DataRow dr in dt.Rows)
+            {
+                field[dt.Rows.IndexOf(dr)] = dr[getCaption].ToString();
+                caption[dt.Rows.IndexOf(dr)] = dr[getField].ToString();
+                Sql.Append(dr[getField] + ",");
+            }
+            //调用substring是为了去除之前拼接多出来的一个逗号
+            string sql = Sql.Remove(Sql.Length - 1, 1).ToString() + " from " + dt.Rows[0][getTable] + " where " + condition;
+            //调用一个新的构造DataTable用来存放返回的数据
+            dt1 = (DataTable)ExecuteSql(sql, "select");
+            //给DataTable加上列名和描述,列名是中文字段,描述是数据库实际的字段名称
+            for (int i = 0; i < field.Length; i++)
+            {
+                dt1.Columns[i].ColumnName = field[i];
+                dt1.Columns[i].Caption = caption[i];
+            }
+            //返回的第一条数据是SQL,后面的是实际的列名
+            command.Dispose();
+            return dt1;
+        }
+
+        /// <summary>
+        /// 查询配置的字段,Type是查询DataList,Form还是DetailGrid
+        /// </summary>
+        /// <param name="Caller"></param>
+        /// <param name="Type"></param>
+        /// <returns></returns>
+        public DataTable GetConfigureData(string Caller, string Type)
+        {
+            DataTable dt = new DataTable();
+            //用于拼接SQL语句
+            StringBuilder Sql = new StringBuilder();
+            //用于设置不同Type时设置对应表的字段
+            string getField = "";
+            string getCaption = "";
+            string getTable = "";
+            switch (Type.ToUpper())
+            {
+                case "DATALIST":
+                    getField = "dld_field"; getCaption = "dld_caption"; getTable = "dld_table";
+                    Sql.Append("select * from datalistdetail where dld_caller='" + Caller + "'");
+                    break;
+                case "FORM":
+                    getField = "fd_field"; getCaption = "fd_caption"; getTable = "fd_table";
+                    Sql.Append("select * from formdetail where fd_foid=( select fo_id from form where fo_caller='" + Caller + "')");
+                    break;
+                case "DETAILGRID":
+                    getField = "dg_field"; getCaption = "dg_caption"; getTable = "dg_table";
+                    Sql.Append("select * from detailgrid  where dg_caller='" + Caller + "'");
+                    break;
+            }
+            command = new OracleCommand(Sql.ToString(), connection);
+            OracleDataAdapter ad = new OracleDataAdapter(command);
+            ad.Fill(dt);
+            //清除掉之前的内容重新拼接
+            Sql.Clear();
+            Sql.Append("select ");
+            //用于记录实际的列名,+1的目的是为了存放SQL
+            string[] field = new string[dt.Rows.Count];
+            string[] caption = new string[dt.Rows.Count];
+            DataTable dt1 = new DataTable();
+            foreach (DataRow dr in dt.Rows)
+            {
+                field[dt.Rows.IndexOf(dr)] = dr[getCaption].ToString();
+                caption[dt.Rows.IndexOf(dr)] = dr[getField].ToString();
+                Sql.Append(dr[getField] + ",");
+            }
+            string sql = Sql.Remove(Sql.Length - 1, 1).ToString() + " from " + dt.Rows[0][getTable];
+            dt1 = (DataTable)ExecuteSql(sql, "select");
+            //设置DataTable的列名和描述
+            for (int i = 0; i < field.Length; i++)
+            {
+                dt1.Columns[i].ColumnName = field[i];
+                dt1.Columns[i].Caption = caption[i];
+            }
+            ad.Dispose();
+            command.Dispose();
+            return dt1;
+        }
+
+        /// <summary>
+        /// 检测内容是否存在
+        /// </summary>
+        /// <param name="TableName"></param>
+        /// <param name="Condition"></param>
+        /// <returns></returns>
+        public bool CheckExist(string TableName, string Condition)
+        {
+            string sql = "select count(1) from " + TableName + " where " + Condition;
+            command = new OracleCommand(sql, connection);
+            OracleDataAdapter ad = new OracleDataAdapter(command);
+            DataTable dt = new DataTable();
+            ad.Fill(dt);
+            if (int.Parse(dt.Rows[0][0].ToString()) > 0)
+            {
+                command.Dispose();
+                ad.Dispose();
+                return true;
+            }
+            else
+            {
+                command.Dispose();
+                ad.Dispose();
+                return false;
+            }
+        }
+
+        /// <summary>
+        /// 直接执行SQL,同时传入SQL的类型
+        /// </summary>
+        /// <param name="SQL"></param>
+        /// <param name="Type"></param>
+        /// <returns></returns>
+        public object ExecuteSql(string SQL, string Type, params object[] names)
+        {
+            object result = null;
+            command = new OracleCommand(SQL, connection);
+            //用来拼接参数的
+            if (names.Length > 0)
+            {
+                string[] par = SQL.Split(':');
+                //用来存参数的数组
+                StringBuilder[] addpar = new StringBuilder[par.Length - 1];
+                for (int i = 0; i < par.Length - 1; i++)
+                {
+                    //新建一个char类型的数组用来存储每个字节的变量
+                    char[] c = par[i + 1].ToCharArray();
+                    addpar[i] = new StringBuilder();
+                    for (int j = 0; j < c.Length; j++)
+                    {
+                        if (c[j] != ' ' && c[j] != ',' && c[j] != ')')
+                        {
+                            addpar[i].Append(c[j]);
+                        }
+                        else
+                        {
+                            break;
+                        }
+                    }
+                }
+                for (int i = 0; i < addpar.Length; i++)
+                {
+                    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();
+                    //成功执行后将重复连接数置为0
+                    break;
+                case "DELETE":
+                    result = command.ExecuteNonQuery();
+                    break;
+                case "UPDATE":
+                    result = command.ExecuteNonQuery();
+                    break;
+                case "INSERT":
+                    command.ExecuteNonQuery();
+                    break;
+            }
+
+            command.Dispose();
+            return result;
+        }
+
+        /// <summary>
+        /// 为了同步BS端的条码维护,检测时允许问号的存在,在检测时默认将问号换成:Param参数
+        /// </summary>
+        /// <param name="SQL"></param>
+        public bool CheckSQL(string SQL, out string ErrorMessage)
+        {
+            ErrorMessage = "";
+            try
+            {
+                SQL = SQL.Replace("?", ":Param");
+                command = new OracleCommand(SQL, connection);
+                command.ExecuteNonQuery();
+                command.Dispose();
+                return true;
+            }
+            catch (Exception e)
+            {
+                command.Dispose();
+                ErrorMessage = e.Message;
+                return false;
+            }
+        }
+
+
+
+        public int GetDistinctRowCount(string TableName, string Field)
+        {
+            DataTable dt = new DataTable();
+            string sql = "select distinct count('" + Field + "') from " + TableName;
+            OracleDataAdapter ad = new OracleDataAdapter(new OracleCommand(sql, connection));
+            ad.Fill(dt);
+            command.Dispose();
+            return int.Parse(dt.Rows[0][0].ToString());
+        }
+
+        /// <summary>
+        /// 根据Caller获取流水号
+        /// </summary>
+        /// <param name="Caller"></param>
+        /// <returns></returns>
+        public string GetSerialNumberByCaller(string Caller)
+        {
+            string SerialNumber = getFieldDataByCondition("MaxNumbers", "mn_number", "mn_tablename='" + Caller + "'").ToString();
+            UpdateByCondition("MaxNumbers", "mn_number=mn_number+1", "mn_tablename='" + Caller + "'");
+            return SerialNumber;
+        }
+
+        /// <summary>
+        /// 根据主键ID删除表的数据
+        /// </summary>
+        /// <param name="TableName">表名</param>
+        /// <param name="ID">主键</param>
+        /// <param name="DeleteID">需要删除主键ID的数组</param>
+        public void DeleteDataByID(string TableName, string ID, string[] DeleteID)
+        {
+            string sql = "delete from " + TableName + " where " + ID + " =:DeleteID";
+            command = new OracleCommand(sql, connection);
+            command.ArrayBindCount = DeleteID.Length;
+            command.Parameters.Add(new OracleParameter("DeleteID", OracleDbType.Long, DeleteID, ParameterDirection.Input));
+            command.ExecuteNonQuery();
+            command.Dispose();
+        }
+
+        /// <summary>
+        /// 通过序列的名称获取序列
+        /// </summary>
+        /// <param name="SeqName"></param>
+        /// <returns></returns>
+        public string GetSEQ(string SeqName)
+        {
+            DataTable dt = new DataTable();
+            dt = (DataTable)ExecuteSql("SELECT " + SeqName + ".NEXTVAL FROM DUAL", "select");
+            return dt.Rows[0][0].ToString();
+        }
+
+        /// <summary>
+        /// 通过序列的名称获取序列
+        /// </summary>
+        /// <param name="SeqName"></param>
+        /// <returns></returns>
+        public string[] GetSEQ(string SeqName, int Num)
+        {
+            DataTable dt = new DataTable();
+            dt = (DataTable)ExecuteSql("SELECT " + SeqName + ".nextval  FROM DUAL CONNECT BY LEVEL<=" + Num, "select");
+            string[] SerialNum = new string[dt.Rows.Count];
+            for (int i = 0; i < dt.Rows.Count; i++)
+            {
+                SerialNum[i] = dt.Rows[i][0].ToString();
+            }
+            return SerialNum;
+        }
+
+        /// <summary>
+        /// 批量通过SQL来执行插入操作 ,参数的第一个数一个string[]数组,用来传递需要添加的参数的名称
+        /// 之后的是名称参数数组对应的 ,所有的插入参数数据长度必须是一致的
+        /// </summary>
+        /// <param name="sql"></param>
+        /// <param name="names"></param>
+        public void BatchInsert(string sql, params object[][] names)
+        {
+            command = new OracleCommand(sql, connection);
+            command.ArrayBindCount = names[1].Length;
+            //因为第一个数组保存的是参数的名称,所以循环从1而不是0开始
+            //将第一个数组的下标固定为0作为循环添加的参数的名称
+            for (int i = 1; i <= names[0].Length; i++)
+            {
+                command.Parameters.Add(new OracleParameter(names[0][i - 1].ToString(), OracleDbType.Varchar2, names[i], ParameterDirection.Input));
+            }
+            command.ExecuteNonQuery();
+            command.Dispose();
+        }
+
+        public void BatchInsertDataTable(string sql, string[] param, params object[][] param1)
+        {
+            command = new OracleCommand(sql, connection);
+            command.ArrayBindCount = param1[0].Length;
+            //因为第一个数组保存的是参数的名称,所以循环从1而不是0开始
+            //将第一个数组的下标固定为0作为循环添加的参数的名称
+            for (int i = 0; i < param.Length; i++)
+            {
+                command.Parameters.Add(new OracleParameter(param[i].ToString(), OracleDbType.Varchar2, param1[i], ParameterDirection.Input));
+            }
+            command.ExecuteNonQuery();
+            command.Dispose();
+        }
+
+
+        /// <summary>
+        /// 查询DataList配置的字段
+        /// </summary>
+        /// <param name="TableName"></param>
+        /// <param name="Caller"></param>
+        /// <returns></returns>
+        public string GetDataList(string TableName, string Caller)
+        {
+            DataTable dt = new DataTable();
+            string SQL = " select listagg(dld_field,',') within group (order by dld_id)  from datalistdetail where dld_caller='" + Caller + "'";
+            command = new OracleCommand(SQL, connection);
+            OracleDataAdapter ad = new OracleDataAdapter(command);
+            ad.Fill(dt);
+            command.Dispose();
+            return dt.Rows[0][0].ToString();
+        }
+
+        /// <summary>
+        /// 取Configs表中的配置,进行该客户是否执行某个操作
+        /// </summary>
+        /// <param name="Code"></param>
+        /// <param name="Caller"></param>
+        /// <returns></returns>
+        public object GetConfig(string Code, string Caller)
+        {
+            DataTable dt = new DataTable();
+            string sql = "select * from configs where code='" + Code + "' and caller='" + Caller + "'";
+            dt = (DataTable)ExecuteSql(sql, "select");
+            if (dt.Rows.Count == 0)
+            {
+                return "";
+            }
+            else
+            {
+                return dt.Rows[0]["Data"];
+            }
+        }
+
+
+        //将数据类型的列类型转换为DataTable
+        public DataTable DataTypeColumnToDataTable(DataTable dt)
+        {
+            DataTable dt1 = new DataTable();
+            dt1.Rows.Add();
+            foreach (DataRow dr in dt.Rows)
+            {
+                dt1.Columns.Add(dr[0].ToString());
+                int index = dt.Rows.IndexOf(dr);
+                if (dr[1].ToString() == "NUMBER")
+                {
+                    dt1.Rows[0][index] = 0;
+                }
+                if (dr[1].ToString() == "VARCHAR2")
+                {
+                    dt1.Rows[0][index] = "这是一段文字";
+                }
+                if (dr[1].ToString() == "DATE")
+                {
+                    dt1.Rows[0][index] = DateTime.Now.ToString("yyyy-MM-dd");
+                }
+                if (dr[1].ToString() == "FLOAT")
+                {
+                    dt1.Rows[0][index] = 1.0;
+                }
+                if (dr[1].ToString() == "CLOB")
+                {
+                    dt1.Rows[0][index] = "一段长文字";
+                }
+            }
+            return dt1;
+        }
+
+
+        /// <summary>
+        /// 通过条件更新
+        /// </summary>
+        /// <param name="TableName"></param>
+        /// <param name="update"></param>
+        /// <param name="condition"></param>
+        public void UpdateByCondition(string TableName, string update, string condition)
+        {
+            string sql = "update " + TableName + " set " + update + " where " + condition;
+            command = new OracleCommand(sql, connection);
+            command.ExecuteNonQuery();
+            command.Dispose();
+        }
+
+        /// <summary>
+        /// 调用存储过程
+        /// </summary>
+        /// <param name="ProcedureName"></param>
+        /// <param name="param"></param>
+        public void CallProcedure(string ProcedureName, params string[] param)
+        {
+            command = new OracleCommand(ProcedureName);
+            command.Connection = connection;
+            command.CommandText = ProcedureName;
+            command.CommandType = CommandType.StoredProcedure;
+            for (int i = 0; i < param.Length; i++)
+                command.Parameters.Add(new OracleParameter(param[i].ToString(), OracleDbType.Varchar2, 200, param[i], ParameterDirection.InputOutput));
+            try
+            {
+                command.ExecuteNonQuery();
+            }
+            catch (Exception)
+            {
+                command.Connection = new OracleConnection(DBConnectionString);
+                command.Connection.Open();
+                command.ExecuteNonQuery();
+            }
+            for (int i = 0; i < command.Parameters.Count; i++)
+                param[i] = command.Parameters[i].Value.ToString();
+            command.Dispose();
+        }
+
+        /// <summary>
+        /// 出现异常进行回滚的执行方法
+        /// </summary>
+        /// <param name="SQL"></param>
+        public void ExecuteSQLTran(params string[] SQL)
+        {
+            OracleTransaction tx = connection.BeginTransaction();
+            command = new OracleCommand();
+            command.Connection = connection;
+            command.Transaction = tx;
+            try
+            {
+                foreach (string sql in SQL)
+                {
+                    if (!String.IsNullOrEmpty(sql))
+                    {
+                        command.CommandText = sql;
+                        command.ExecuteNonQuery();
+                    }
+                }
+                tx.Commit();
+            }
+            catch (OracleException E)
+            {
+                tx.Rollback();
+                throw new Exception(E.Message);
+            }
+        }
+
+        /// <summary>
+        /// 用于将string 的数组转换成SQL的查询内容
+        /// </summary>
+        /// <param name="Fields"></param>
+        /// <returns></returns>
+        private string AddField(string[] Fields)
+        {
+            string sql = " ";
+            foreach (string field in Fields)
+            {
+                sql += field + ",";
+            }
+            return sql.Substring(0, sql.Length - 1);
+        }
+        /// <summary>
+        /// 通过查询的内容获取到字段的描述
+        /// </summary>
+        /// <param name="field"></param>
+        /// <returns></returns>
+        private static string[] GetCaptionFromField(string field)
+        {
+            string[] caption = field.Split(',');
+            for (int i = 0; i < caption.Length; i++)
+            {
+                caption[i] = caption[i].Substring(0, caption[i].LastIndexOf("as")).Trim();
+            }
+            return caption;
+        }
+
+        /// <summary>
+        /// 通过查询的语句获取查询的字段
+        /// </summary>
+        /// <param name="field"></param>
+        /// <returns></returns>
+        private static string[] GetField(string field)
+        {
+            string[] fields = field.Split(',');
+            for (int i = 0; i < fields.Length; i++)
+            {
+                fields[i] = fields[i].Substring(fields[i].LastIndexOf("as") + 2, fields[i].Length - fields[i].LastIndexOf("as") - 2).Trim();
+            }
+            return fields;
+        }
+
+        public static string[] GetParamFromSQL(string SQL)
+        {
+            string[] par = SQL.Split(':');
+            //用来存参数的数组
+            StringBuilder[] addpar = new StringBuilder[par.Length - 1];
+            string[] param = new string[par.Length - 1];
+            for (int i = 0; i < par.Length - 1; i++)
+            {
+                //新建一个char类型的数组用来存储每个字节的变量
+                char[] c = par[i + 1].ToCharArray();
+                addpar[i] = new StringBuilder();
+                for (int j = 0; j < c.Length; j++)
+                {
+                    if (c[j] != ' ' && c[j] != ',' && c[j] != ')')
+                    {
+                        addpar[i].Append(c[j]);
+                    }
+                    else
+                    {
+                        break;
+                    }
+                }
+            }
+            for (int i = 0; i < par.Length - 1; i++)
+            {
+                param[i] = addpar[i].ToString();
+            }
+            return param;
+        }
+    }
+}

+ 124 - 0
UAS-出货标签管理(泽天)/PublicMethod/ExcelHandler.cs

@@ -0,0 +1,124 @@
+using System.IO;
+using System.Data;
+using System;
+using NPOI.HSSF.UserModel;
+using NPOI.SS.UserModel;
+using NPOI.HSSF.Util;
+
+namespace UAS_LabelMachine
+{
+    class ExcelHandler
+    {
+        DataHelper dh = new DataHelper();
+
+        /// <summary>
+        /// 导出Excel,返回文件在客户端的路径
+        /// </summary>
+        public string ExportExcel(DataTable dt, string FolderPath, string FileName)
+        {
+            //创建一个内存流,用来接收转换成Excel的内容
+            MemoryStream ms;
+            ms = DataTableToExcel(dt);
+            //以系统当前时间命名文件,FileMode.Create表示创建文件,FileAccess.Write表示拥有写的权限
+            string filePath = @FolderPath + "\\" + FileName + ".xls";
+            FileStream fs = new FileStream(filePath, FileMode.Create, FileAccess.Write);
+            byte[] data = ms.ToArray();
+            fs.Write(data, 0, data.Length);
+            fs.Flush();
+            //释放当前Excel文件,否则打开文件的时候会显示文件被占用
+            ms.Dispose();
+            fs.Dispose();
+            return filePath;
+        }
+
+        /// <summary>
+        /// 导入Excel
+        /// </summary>
+        public void ImportExcel(DataTable DataTable, string TableName)
+        {
+            int columnNum = DataTable.Columns.Count;
+            int rowNum = DataTable.Columns.Count;
+            string[] field = new string[columnNum];
+            for (int i = 0; i < columnNum; i++)
+            {
+                field[i] = DataTable.Rows[0][i].ToString();
+            }
+        }
+
+        /// <summary>
+        /// 将DataTable形式的数据转成Excel格式的,然后用字节流的形式写入文件
+        /// </summary>
+        /// <param name="DataTable"></param>
+        /// <returns></returns>
+        public MemoryStream DataTableToExcel(DataTable DataTable)
+        {
+            //创建内存流
+            MemoryStream ms = new MemoryStream();
+            //创建一个Book,相当于一个Excel文件
+            HSSFWorkbook book = new HSSFWorkbook();
+            //Excel中的Sheet
+            ISheet sheet = book.CreateSheet("sheet1");
+            //获取行数量和列数量
+            int rowNum = DataTable.Rows.Count;
+            int columnNum = DataTable.Columns.Count;
+            //设置列的宽度,根据首行的列的内容的长度来设置
+            for (int i = 0; i < columnNum; i++)
+            {
+                int dataLength;
+                //如果内容比标题短则取标题长度
+                if (DataTable.Rows[0][i].ToString().Length < DataTable.Columns[i].ColumnName.Length)
+                {
+                    dataLength = DataTable.Columns[i].ColumnName.Length;
+                    dataLength = dataLength * 600;
+                }
+                else
+                {
+                    dataLength = DataTable.Rows[0][i].ToString().Length;
+                    dataLength = dataLength * 500;
+                }
+                sheet.SetColumnWidth(i, dataLength);
+            }
+            //首先画好第一行带颜色的,单独写出来,避免写在循环里面
+            IRow row = sheet.CreateRow(0);
+            //冻结第一行
+            sheet.CreateFreezePane(0, 1, 0, 1);
+            ICellStyle style = book.CreateCellStyle();
+            style.FillForegroundColor = HSSFColor.PALE_BLUE.index;
+            style.FillPattern = FillPatternType.BIG_SPOTS;
+            style.FillBackgroundColor = HSSFColor.LIGHT_GREEN.index;
+            //设置边框
+            style.BorderBottom = BorderStyle.THICK;
+            style.BorderLeft = BorderStyle.THICK;
+            style.BorderRight = BorderStyle.THICK;
+            style.BorderTop = BorderStyle.THICK;
+            row.HeightInPoints = 20;
+            //固定第一行
+            //row.RowStyle.IsLocked=true;
+            //给第一行的标签赋值样式和值
+            for (int j = 0; j < columnNum; j++)
+            {
+                row.CreateCell(j);
+                row.Cells[j].CellStyle = style;
+                row.Cells[j].CellStyle.VerticalAlignment = VerticalAlignment.CENTER;
+                row.Cells[j].CellStyle.Alignment = HorizontalAlignment.CENTER;
+                row.Cells[j].SetCellValue(DataTable.Columns[j].ColumnName);
+            }
+            //将DataTable的值循环赋值给book,Aligment设置居中
+            //之前已经画了带颜色的第一行,所以从i=1开始画
+            for (int i = 0; i < rowNum; i++)
+            {
+                IRow row1 = sheet.CreateRow(i + 1);
+                row1.HeightInPoints = 20;
+                for (int j = 0; j < columnNum; j++)
+                {
+                    row1.CreateCell(j);
+                    row1.Cells[j].SetCellValue(DataTable.Rows[i][j].ToString());
+                    row1.GetCell(j).CellStyle.VerticalAlignment = VerticalAlignment.CENTER;
+                }
+            }
+            //将book的内容写入内存流中返回
+            book.Write(ms);
+            return ms;
+        }
+    }
+}

+ 110 - 0
UAS-出货标签管理(泽天)/PublicMethod/GlobalEventsHandler.cs

@@ -0,0 +1,110 @@
+using System.Data;
+using System.Windows.Forms;
+using UAS_LabelMachine;
+using UAS_LabelMachine.Entity;
+using UAS_LabelMachine.PublicMethod;
+
+namespace UAS_Labeling.PublicMethod
+{
+    /// <summary>
+    /// Author zhangz   2016/12/30
+    /// 全局事件处理,通过句柄获取触发事件的控件
+    /// 结合捕获的全局的键盘事件来验证用户进行的操作
+    /// </summary>
+    class GlobalEventsHandler : IMessageFilter
+    {
+        DataHelper dh;
+        //鼠标左键点击
+        public const int WM_LBUTTONDOWN = 0x0201;
+        //键盘敲击事件
+        public const int WM_KEYDOWN = 0x100;
+
+        public bool PreFilterMessage(ref Message m)
+        {
+            //通过句柄去获取具体触发事件的控件
+            Control c = Control.FromHandle(m.HWnd);
+            //可进行数据操作的控件需要进行权限的判断,结合WM_LBUTTONDOWN对按钮进行判断
+            if (c != null && m.Msg == WM_LBUTTONDOWN && c is Button)
+            {
+                LogManager.DoLog("点击【" + c.Text+"】");
+                return CheckPower(c);
+            }
+            else
+                return false;
+        }
+
+        /// <summary>
+        /// 返回True表示消息已处理,不再往后传递
+        /// 返回False表示消息未处理,后续程序处理此事件
+        /// </summary>
+        /// <param name="c"></param>
+        /// <returns></returns>
+        private bool CheckPower(Control c)
+        {
+            dh = new DataHelper();
+            if (User.UserAccountType != "admin")
+            {
+                if (dh.getRowCount("labelprintpower") > 0)
+                {
+                    string sql = " select LPP_CLEANDETAIL,LPP_GENCODE,LPP_LABELMATAIN,LPP_SAVEDETAIL,LPP_COLLECTSTRATEGY,LPP_ALLCOLLECT from labelprintpower left join employee on em_code = lpp_emcode where lpp_emcode = '" + User.UserCode + "'";
+                    DataTable dt = (DataTable)dh.ExecuteSql(sql, "select");
+                    if (dt.Rows.Count > 0)
+                    {
+                        switch (c.Text)
+                        {
+                            case "采集策略设置":
+                                if (dt.Rows[0]["LPP_COLLECTSTRATEGY"].ToString() != "1")
+                                {
+                                    MessageBox.Show("没有" + c.Text + "的权限");
+                                    return true;
+                                }
+                                break;
+                            case "生成条码":
+                                if (dt.Rows[0]["LPP_GENCODE"].ToString() != "1")
+                                {
+                                    MessageBox.Show("没有" + c.Text + "的权限");
+                                    return true;
+                                }
+                                break;
+                            case "标签维护":
+                                if (dt.Rows[0]["LPP_LABELMATAIN"].ToString() != "1")
+                                {
+                                    MessageBox.Show("没有" + c.Text + "的权限");
+                                    return true;
+                                }
+                                break;
+                            case "保存明细":
+                                if (dt.Rows[0]["LPP_SAVEDETAIL"].ToString() != "1")
+                                {
+                                    MessageBox.Show("没有" + c.Text + "的权限");
+                                    return true;
+                                }
+                                break;
+                            case "清除明细":
+                                if (dt.Rows[0]["LPP_CLEANDETAIL"].ToString() != "1")
+                                {
+                                    MessageBox.Show("没有" + c.Text + "的权限");
+                                    return true;
+                                }
+                                break;
+                            case "全部已采":
+                                if (dt.Rows[0]["LPP_ALLCOLLECT"].ToString() != "1")
+                                {
+                                    MessageBox.Show("没有" + c.Text + "的权限");
+                                    return true;
+                                }
+                                break;
+                            default:
+                                break;
+                        }
+                    }
+                    else {
+                        MessageBox.Show("尚未配置权限,请与管理员联系");
+                        return true;
+                    }
+                }
+            }
+            return false;
+        }
+    }
+}

+ 86 - 0
UAS-出货标签管理(泽天)/PublicMethod/HttpHandler.cs

@@ -0,0 +1,86 @@
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Net;
+using System.Text;
+using System.Web;
+
+namespace UAS_LabelMachine.PublicMethod
+{
+    public class HttpHandler : IHttpHandler
+    {
+        /// <summary>
+        /// 您将需要在网站的 Web.config 文件中配置此处理程序 
+        /// 并向 IIS 注册它,然后才能使用它。有关详细信息,
+        /// 请参见下面的链接: http://go.microsoft.com/?linkid=8101007
+        /// </summary>
+        public bool IsReusable
+        {
+            // 如果无法为其他请求重用托管处理程序,则返回 false。
+            // 如果按请求保留某些状态信息,则通常这将为 false。
+            get { return true; }
+        }
+        public void ProcessRequest(HttpContext context)
+        {
+
+        }
+
+
+        public static bool CheckUserLogin(string UserName, string PassWord, string Master, out string oMsg)
+        {
+            oMsg = "";
+            try
+            {
+                string url = DataHelper.ERPAddesss + "mobile/login.action";//html调用的地址              
+                HttpWebRequest webrequest = (HttpWebRequest)WebRequest.Create(url);
+                if (webrequest == null)
+                {
+                    return false;
+                }
+                webrequest.Method = "POST";
+                webrequest.Timeout = 1000;
+                webrequest.ContentType = "application/x-www-form-urlencoded";
+                System.Collections.Hashtable pars = new System.Collections.Hashtable();
+                pars.Add("username", UserName);
+                pars.Add("password", PassWord);
+                pars.Add("master", Master);
+                string buffer = "";
+                //发送POST数据 
+                if (!(pars == null || pars.Count == 0))
+                {
+                    foreach (string key in pars.Keys)
+                    {
+                        buffer = buffer + "&" + key + "=" + pars[key].ToString();
+                    }
+                    byte[] data = Encoding.UTF8.GetBytes(buffer);
+                    using (Stream stream = webrequest.GetRequestStream())
+                    {
+                        stream.Write(data, 0, data.Length);
+                    }
+                }
+
+                string[] values = webrequest.Headers.GetValues("Content-Type");
+                WebResponse myResponse = webrequest.GetResponse();
+
+                using (Stream resStream = myResponse.GetResponseStream())//得到回写的流
+                {
+                    StreamReader newReader = new StreamReader(myResponse.GetResponseStream(), Encoding.UTF8);
+                    string Content = newReader.ReadToEnd();
+                    Dictionary<string, object> dic = new Dictionary<string, object>();
+                    dic = BaseUtil.ToDictionary(Content);
+                    if (!dic.ContainsKey("erpaccount"))
+                    {
+                        oMsg = dic["reason"].ToString();
+                        return false;
+                    }
+                    newReader.Close();
+                }
+            }
+            catch (Exception ex)
+            {
+                LogManager.DoLog(ex.Message.ToString());
+            }
+            return true;
+        }
+    }
+}

+ 15 - 0
UAS-出货标签管理(泽天)/PublicMethod/LogManager.cs

@@ -0,0 +1,15 @@
+using System;
+using System.IO;
+
+namespace UAS_LabelMachine.PublicMethod
+{
+    class LogManager
+    {
+        public static void DoLog(string Message)
+        {
+            StreamWriter sw = File.AppendText("Log/" + DateTime.Now.ToString("yyyy-MM-dd") + ".txt");
+            sw.WriteLine("\n" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + " " + Message + "\n");
+            sw.Close();
+        }
+    }
+}

+ 178 - 0
UAS-出货标签管理(泽天)/PublicMethod/ftpOperater.cs

@@ -0,0 +1,178 @@
+using System;
+using System.IO;
+using System.Net;
+using System.Text;
+using System.Windows.Forms;
+
+namespace UAS_LabelMachine
+{
+    class ftpOperater
+    {
+        public static string FTPAddress = DataHelper.FTPAdress.Split('|')[0];
+
+        public static string DownLoadTo = Environment.GetEnvironmentVariable("windir").Substring(0, 1) + @":\" + @"打印标签\";
+
+        private string ftpServerIP;
+        private string ftpUser;
+        private string ftpPwd;
+
+        public ftpOperater()
+        {
+            string[] FTPInf = DataHelper.FTPAdress.Split('|');
+            this.ftpServerIP = FTPInf[0];
+            this.ftpUser = FTPInf[1];
+            this.ftpPwd = FTPInf[2];
+        }
+
+        public void UpLoadFile(string filepath, string filename)
+        {
+            //上传之前判断文件是否存在
+            string[] filelist = GetFileList();
+            if (filelist != null)
+                for (int i = 0; i < filelist.Length; i++)
+                {
+                    if (filelist[i] == filename)
+                    {
+                        string upload = MessageBox.Show("已存在同名文件,是否覆盖", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question).ToString();
+                        if (upload.ToString() != "Yes")
+                        {
+                            return;
+                        }
+                    }
+                }
+            FtpWebRequest reqFTP;
+            reqFTP = (FtpWebRequest)FtpWebRequest.Create(new Uri(ftpServerIP + "/" + filename));
+            reqFTP.UseBinary = true;
+            reqFTP.Credentials = new NetworkCredential(ftpUser, ftpPwd);
+            reqFTP.Method = WebRequestMethods.Ftp.UploadFile;
+            FileInfo file = new FileInfo(filepath + "/" + filename);
+            const int BufferSize = 2048;
+            byte[] content = new byte[BufferSize - 1 + 1];
+            int dataRead;
+            using (FileStream fs = file.OpenRead())
+            {
+                //把上传的文件写入流
+                using (Stream rs = reqFTP.GetRequestStream())
+                {
+                    do
+                    {
+                        //每次读文件流的2KB
+                        dataRead = fs.Read(content, 0, BufferSize);
+                        rs.Write(content, 0, dataRead);
+                    } while (!(dataRead < BufferSize));
+                    rs.Close();
+                }
+                fs.Close();
+            }
+        }
+
+        /// <summary>
+        /// 获取ftp服务器上的文件信息
+        /// </summary>
+        /// <returns>存储了所有文件信息的字符串数组</returns>
+        public string[] GetFileList()
+        {
+            string[] downloadFiles;
+            StringBuilder result = new StringBuilder();
+            FtpWebRequest reqFTP;
+            try
+            {
+                reqFTP = (FtpWebRequest)FtpWebRequest.Create(new Uri(ftpServerIP + "/"));
+                reqFTP.UseBinary = true;
+                reqFTP.Credentials = new NetworkCredential(ftpUser, ftpPwd);
+                reqFTP.Method = WebRequestMethods.Ftp.ListDirectory;
+                WebResponse response = reqFTP.GetResponse();
+                StreamReader reader = new StreamReader(response.GetResponseStream());
+
+                string line = reader.ReadLine();
+                while (line != null)
+                {
+                    result.Append(line);
+                    result.Append("\n");
+                    line = reader.ReadLine();
+                }
+                result.Remove(result.ToString().LastIndexOf('\n'), 1);
+                reader.Close();
+                response.Close();
+
+                return result.ToString().Split('\n');
+            }
+            catch (Exception ex)
+            {
+                System.Windows.Forms.MessageBox.Show("获取文件信息失败:" + ex.Message, "操作失败", MessageBoxButtons.OK, MessageBoxIcon.Error);
+                downloadFiles = null;
+                return downloadFiles;
+            }
+        }
+
+        /// <summary>
+        /// 获取FTP上指定文件的大小
+        /// </summary>
+        /// <param name="filename">文件名</param>
+        /// <returns>文件大小</returns>
+        public long GetFileSize(string filename)
+        {
+            FtpWebRequest reqFTP;
+            long fileSize = 0;
+            try
+            {
+                reqFTP = (FtpWebRequest)FtpWebRequest.Create(new Uri(ftpServerIP + "/" + filename));
+                reqFTP.Method = WebRequestMethods.Ftp.GetFileSize;
+                reqFTP.UseBinary = true;
+                reqFTP.Credentials = new NetworkCredential(ftpUser, ftpPwd);
+                FtpWebResponse response = (FtpWebResponse)reqFTP.GetResponse();
+                Stream ftpStream = response.GetResponseStream();
+                fileSize = response.ContentLength;
+                ftpStream.Close();
+                response.Close();
+            }
+            catch (Exception ex)
+            {
+                MessageBox.Show("获取文件大小时,出现异常:\n" + ex.Message, "获取文件大小失败!", MessageBoxButtons.OK, MessageBoxIcon.Error);
+            }
+            return fileSize;
+        }
+
+        /// <summary>
+        /// 实现ftp下载操作
+        /// </summary>
+        /// <param name="fileName">远程文件名</param>
+        public string Download(string fileName, DateTime time)
+        {
+            FtpWebRequest reqFTP;
+            try
+            {
+                FileStream outputStream = new FileStream(DownLoadTo + @"\" + fileName, FileMode.Create);
+                reqFTP = (FtpWebRequest)FtpWebRequest.Create(new Uri(ftpServerIP + "/" + fileName));
+                reqFTP.Method = WebRequestMethods.Ftp.DownloadFile;
+                reqFTP.UseBinary = true;
+                reqFTP.Credentials = new NetworkCredential(ftpUser, ftpPwd);
+                reqFTP.UsePassive = true;
+                FtpWebResponse response = (FtpWebResponse)reqFTP.GetResponse();
+                Stream ftpStream = response.GetResponseStream();
+                long cl = response.ContentLength;
+                int bufferSize = 4096;
+                int readCount;
+                byte[] buffer = new byte[bufferSize];
+                readCount = ftpStream.Read(buffer, 0, bufferSize);
+                while (readCount > 0)
+                {
+                    outputStream.Write(buffer, 0, readCount);
+                    readCount = ftpStream.Read(buffer, 0, bufferSize);
+                }
+                ftpStream.Close();
+                outputStream.Close();
+                response.Close();
+                //设置最后修改文件时间为服务器时间
+                FileInfo f = new FileInfo(DownLoadTo + @"\" + fileName);
+                f.LastWriteTime = time;
+                return DownLoadTo + @"\" + fileName;
+            }
+            catch (Exception ex)
+            {
+                MessageBox.Show(ex.Message);
+                return "";
+            }
+        }
+    }
+}

BIN
UAS-出货标签管理(泽天)/Resources/1 (4).gif


BIN
UAS-出货标签管理(泽天)/Resources/46.gif


BIN
UAS-出货标签管理(泽天)/Resources/Excel_2010_16px_1180011_easyicon.net.png


BIN
UAS-出货标签管理(泽天)/Resources/Login_Icon.gif


BIN
UAS-出货标签管理(泽天)/Resources/bindingNavigatorAddNewItem.Image.png


BIN
UAS-出货标签管理(泽天)/Resources/bindingNavigatorDeleteItem.Image.png


BIN
UAS-出货标签管理(泽天)/Resources/bindingNavigatorMoveFirstItem.Image.png


BIN
UAS-出货标签管理(泽天)/Resources/bindingNavigatorMoveLastItem.Image.png


BIN
UAS-出货标签管理(泽天)/Resources/bindingNavigatorMoveNextItem.Image.png


BIN
UAS-出货标签管理(泽天)/Resources/bindingNavigatorMovePreviousItem.Image.png


BIN
UAS-出货标签管理(泽天)/Resources/close_32px_1181428_easyicon.net.png


BIN
UAS-出货标签管理(泽天)/Resources/close_up_32px_1181430_easyicon.net.png


BIN
UAS-出货标签管理(泽天)/Resources/delete_128px_1151377_easyicon.net.ico


BIN
UAS-出货标签管理(泽天)/Resources/download_17.519713261649px_1200629_easyicon.net (1).png


BIN
UAS-出货标签管理(泽天)/Resources/matte_white_square_icon_business_tool_hammer_96px_571061_easyicon.net.ico


BIN
UAS-出货标签管理(泽天)/Resources/preview_16px_25980_easyicon.net.png


BIN
UAS-出货标签管理(泽天)/Resources/print_128px_1082624_easyicon.net.ico


BIN
UAS-出货标签管理(泽天)/Resources/search_16px_1202802_easyicon.net.png


BIN
UAS-出货标签管理(泽天)/Resources/timg.jpg


BIN
UAS-出货标签管理(泽天)/Resources/upload_17.459649122807px_1200703_easyicon.net (1).png


BIN
UAS-出货标签管理(泽天)/Resources/users.png


BIN
UAS-出货标签管理(泽天)/Resources/users_user_72px_523311_easyicon.net.png


BIN
UAS-出货标签管理(泽天)/Resources/write_15.893687707641px_1181413_easyicon.net.png


+ 6 - 0
UAS-出货标签管理(泽天)/Service References/Vivo_BoxReelRelation/ReelAPI.disco

@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8"?>
+<discovery xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.xmlsoap.org/disco/">
+  <contractRef ref="http://middle.mes.vivo.xyz:7007/ReelAPI.asmx?wsdl" docRef="http://middle.mes.vivo.xyz:7007/ReelAPI.asmx" xmlns="http://schemas.xmlsoap.org/disco/scl/" />
+  <soap address="http://middle.mes.vivo.xyz:7007/ReelAPI.asmx" xmlns:q1="http://tempuri.org/" binding="q1:Service1Soap" xmlns="http://schemas.xmlsoap.org/disco/soap/" />
+  <soap address="http://middle.mes.vivo.xyz:7007/ReelAPI.asmx" xmlns:q2="http://tempuri.org/" binding="q2:Service1Soap12" xmlns="http://schemas.xmlsoap.org/disco/soap/" />
+</discovery>

+ 527 - 0
UAS-出货标签管理(泽天)/Service References/Vivo_BoxReelRelation/ReelAPI.wsdl

@@ -0,0 +1,527 @@
+<?xml version="1.0" encoding="utf-8"?>
+<wsdl:definitions xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:tns="http://tempuri.org/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" targetNamespace="http://tempuri.org/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
+  <wsdl:types>
+    <s:schema elementFormDefault="qualified" targetNamespace="http://tempuri.org/">
+      <s:element name="HelloWorld">
+        <s:complexType />
+      </s:element>
+      <s:element name="HelloWorldResponse">
+        <s:complexType>
+          <s:sequence>
+            <s:element minOccurs="0" maxOccurs="1" name="HelloWorldResult" type="s:string" />
+          </s:sequence>
+        </s:complexType>
+      </s:element>
+      <s:element name="getCompID">
+        <s:complexType>
+          <s:sequence>
+            <s:element minOccurs="0" maxOccurs="1" name="createcode" type="s:string" />
+            <s:element minOccurs="0" maxOccurs="1" name="boxid" type="s:string" />
+            <s:element minOccurs="0" maxOccurs="1" name="compname" type="s:string" />
+            <s:element minOccurs="0" maxOccurs="1" name="manufacturer" type="s:string" />
+            <s:element minOccurs="0" maxOccurs="1" name="lotno" type="s:string" />
+            <s:element minOccurs="0" maxOccurs="1" name="datecode" type="s:string" />
+            <s:element minOccurs="1" maxOccurs="1" name="amount" type="s:int" />
+            <s:element minOccurs="0" maxOccurs="1" name="ordercode" type="s:string" />
+            <s:element minOccurs="0" maxOccurs="1" name="createuser" type="s:string" />
+            <s:element minOccurs="0" maxOccurs="1" name="remark" type="s:string" />
+          </s:sequence>
+        </s:complexType>
+      </s:element>
+      <s:element name="getCompIDResponse">
+        <s:complexType>
+          <s:sequence>
+            <s:element minOccurs="0" maxOccurs="1" name="getCompIDResult" type="s:string" />
+          </s:sequence>
+        </s:complexType>
+      </s:element>
+      <s:element name="getCompID_V1">
+        <s:complexType>
+          <s:sequence>
+            <s:element minOccurs="0" maxOccurs="1" name="createcode" type="s:string" />
+            <s:element minOccurs="0" maxOccurs="1" name="boxid" type="s:string" />
+            <s:element minOccurs="0" maxOccurs="1" name="compname" type="s:string" />
+            <s:element minOccurs="0" maxOccurs="1" name="manufacturer" type="s:string" />
+            <s:element minOccurs="0" maxOccurs="1" name="lotno" type="s:string" />
+            <s:element minOccurs="0" maxOccurs="1" name="datecode" type="s:string" />
+            <s:element minOccurs="0" maxOccurs="1" name="brand" type="s:string" />
+            <s:element minOccurs="1" maxOccurs="1" name="amount" type="s:int" />
+            <s:element minOccurs="0" maxOccurs="1" name="ordercode" type="s:string" />
+            <s:element minOccurs="0" maxOccurs="1" name="createuser" type="s:string" />
+            <s:element minOccurs="0" maxOccurs="1" name="remark" type="s:string" />
+          </s:sequence>
+        </s:complexType>
+      </s:element>
+      <s:element name="getCompID_V1Response">
+        <s:complexType>
+          <s:sequence>
+            <s:element minOccurs="0" maxOccurs="1" name="getCompID_V1Result" type="s:string" />
+          </s:sequence>
+        </s:complexType>
+      </s:element>
+      <s:element name="insertBoxReelRelation">
+        <s:complexType>
+          <s:sequence>
+            <s:element minOccurs="0" maxOccurs="1" name="createcode" type="s:string" />
+            <s:element minOccurs="0" maxOccurs="1" name="manufacturer" type="s:string" />
+            <s:element minOccurs="0" maxOccurs="1" name="boxID" type="s:string" />
+            <s:element minOccurs="0" maxOccurs="1" name="compid" type="s:string" />
+            <s:element minOccurs="0" maxOccurs="1" name="createuser" type="s:string" />
+            <s:element minOccurs="0" maxOccurs="1" name="remark" type="s:string" />
+          </s:sequence>
+        </s:complexType>
+      </s:element>
+      <s:element name="insertBoxReelRelationResponse">
+        <s:complexType>
+          <s:sequence>
+            <s:element minOccurs="0" maxOccurs="1" name="insertBoxReelRelationResult" type="s:string" />
+          </s:sequence>
+        </s:complexType>
+      </s:element>
+      <s:element name="getReelListByBoxID">
+        <s:complexType>
+          <s:sequence>
+            <s:element minOccurs="0" maxOccurs="1" name="queryCode" type="s:string" />
+            <s:element minOccurs="0" maxOccurs="1" name="boxID" type="s:string" />
+          </s:sequence>
+        </s:complexType>
+      </s:element>
+      <s:element name="getReelListByBoxIDResponse">
+        <s:complexType>
+          <s:sequence>
+            <s:element minOccurs="0" maxOccurs="1" name="getReelListByBoxIDResult" type="tns:ArrayOfReelEntity" />
+          </s:sequence>
+        </s:complexType>
+      </s:element>
+      <s:complexType name="ArrayOfReelEntity">
+        <s:sequence>
+          <s:element minOccurs="0" maxOccurs="unbounded" name="ReelEntity" nillable="true" type="tns:ReelEntity" />
+        </s:sequence>
+      </s:complexType>
+      <s:complexType name="ReelEntity">
+        <s:sequence>
+          <s:element minOccurs="0" maxOccurs="1" name="Boxid" type="s:string" />
+          <s:element minOccurs="0" maxOccurs="1" name="Compid" type="s:string" />
+          <s:element minOccurs="0" maxOccurs="1" name="Compname" type="s:string" />
+          <s:element minOccurs="0" maxOccurs="1" name="Manufacturer" type="s:string" />
+          <s:element minOccurs="0" maxOccurs="1" name="Lotno" type="s:string" />
+          <s:element minOccurs="0" maxOccurs="1" name="Datecode" type="s:string" />
+          <s:element minOccurs="0" maxOccurs="1" name="Amount" type="s:string" />
+          <s:element minOccurs="0" maxOccurs="1" name="Ordercode" type="s:string" />
+          <s:element minOccurs="0" maxOccurs="1" name="Status" type="s:string" />
+          <s:element minOccurs="0" maxOccurs="1" name="Brand" type="s:string" />
+        </s:sequence>
+      </s:complexType>
+      <s:element name="string" nillable="true" type="s:string" />
+      <s:element name="ArrayOfReelEntity" nillable="true" type="tns:ArrayOfReelEntity" />
+    </s:schema>
+  </wsdl:types>
+  <wsdl:message name="HelloWorldSoapIn">
+    <wsdl:part name="parameters" element="tns:HelloWorld" />
+  </wsdl:message>
+  <wsdl:message name="HelloWorldSoapOut">
+    <wsdl:part name="parameters" element="tns:HelloWorldResponse" />
+  </wsdl:message>
+  <wsdl:message name="getCompIDSoapIn">
+    <wsdl:part name="parameters" element="tns:getCompID" />
+  </wsdl:message>
+  <wsdl:message name="getCompIDSoapOut">
+    <wsdl:part name="parameters" element="tns:getCompIDResponse" />
+  </wsdl:message>
+  <wsdl:message name="getCompID_V1SoapIn">
+    <wsdl:part name="parameters" element="tns:getCompID_V1" />
+  </wsdl:message>
+  <wsdl:message name="getCompID_V1SoapOut">
+    <wsdl:part name="parameters" element="tns:getCompID_V1Response" />
+  </wsdl:message>
+  <wsdl:message name="insertBoxReelRelationSoapIn">
+    <wsdl:part name="parameters" element="tns:insertBoxReelRelation" />
+  </wsdl:message>
+  <wsdl:message name="insertBoxReelRelationSoapOut">
+    <wsdl:part name="parameters" element="tns:insertBoxReelRelationResponse" />
+  </wsdl:message>
+  <wsdl:message name="getReelListByBoxIDSoapIn">
+    <wsdl:part name="parameters" element="tns:getReelListByBoxID" />
+  </wsdl:message>
+  <wsdl:message name="getReelListByBoxIDSoapOut">
+    <wsdl:part name="parameters" element="tns:getReelListByBoxIDResponse" />
+  </wsdl:message>
+  <wsdl:message name="HelloWorldHttpGetIn" />
+  <wsdl:message name="HelloWorldHttpGetOut">
+    <wsdl:part name="Body" element="tns:string" />
+  </wsdl:message>
+  <wsdl:message name="getCompIDHttpGetIn">
+    <wsdl:part name="createcode" type="s:string" />
+    <wsdl:part name="boxid" type="s:string" />
+    <wsdl:part name="compname" type="s:string" />
+    <wsdl:part name="manufacturer" type="s:string" />
+    <wsdl:part name="lotno" type="s:string" />
+    <wsdl:part name="datecode" type="s:string" />
+    <wsdl:part name="amount" type="s:string" />
+    <wsdl:part name="ordercode" type="s:string" />
+    <wsdl:part name="createuser" type="s:string" />
+    <wsdl:part name="remark" type="s:string" />
+  </wsdl:message>
+  <wsdl:message name="getCompIDHttpGetOut">
+    <wsdl:part name="Body" element="tns:string" />
+  </wsdl:message>
+  <wsdl:message name="getCompID_V1HttpGetIn">
+    <wsdl:part name="createcode" type="s:string" />
+    <wsdl:part name="boxid" type="s:string" />
+    <wsdl:part name="compname" type="s:string" />
+    <wsdl:part name="manufacturer" type="s:string" />
+    <wsdl:part name="lotno" type="s:string" />
+    <wsdl:part name="datecode" type="s:string" />
+    <wsdl:part name="brand" type="s:string" />
+    <wsdl:part name="amount" type="s:string" />
+    <wsdl:part name="ordercode" type="s:string" />
+    <wsdl:part name="createuser" type="s:string" />
+    <wsdl:part name="remark" type="s:string" />
+  </wsdl:message>
+  <wsdl:message name="getCompID_V1HttpGetOut">
+    <wsdl:part name="Body" element="tns:string" />
+  </wsdl:message>
+  <wsdl:message name="insertBoxReelRelationHttpGetIn">
+    <wsdl:part name="createcode" type="s:string" />
+    <wsdl:part name="manufacturer" type="s:string" />
+    <wsdl:part name="boxID" type="s:string" />
+    <wsdl:part name="compid" type="s:string" />
+    <wsdl:part name="createuser" type="s:string" />
+    <wsdl:part name="remark" type="s:string" />
+  </wsdl:message>
+  <wsdl:message name="insertBoxReelRelationHttpGetOut">
+    <wsdl:part name="Body" element="tns:string" />
+  </wsdl:message>
+  <wsdl:message name="getReelListByBoxIDHttpGetIn">
+    <wsdl:part name="queryCode" type="s:string" />
+    <wsdl:part name="boxID" type="s:string" />
+  </wsdl:message>
+  <wsdl:message name="getReelListByBoxIDHttpGetOut">
+    <wsdl:part name="Body" element="tns:ArrayOfReelEntity" />
+  </wsdl:message>
+  <wsdl:message name="HelloWorldHttpPostIn" />
+  <wsdl:message name="HelloWorldHttpPostOut">
+    <wsdl:part name="Body" element="tns:string" />
+  </wsdl:message>
+  <wsdl:message name="getCompIDHttpPostIn">
+    <wsdl:part name="createcode" type="s:string" />
+    <wsdl:part name="boxid" type="s:string" />
+    <wsdl:part name="compname" type="s:string" />
+    <wsdl:part name="manufacturer" type="s:string" />
+    <wsdl:part name="lotno" type="s:string" />
+    <wsdl:part name="datecode" type="s:string" />
+    <wsdl:part name="amount" type="s:string" />
+    <wsdl:part name="ordercode" type="s:string" />
+    <wsdl:part name="createuser" type="s:string" />
+    <wsdl:part name="remark" type="s:string" />
+  </wsdl:message>
+  <wsdl:message name="getCompIDHttpPostOut">
+    <wsdl:part name="Body" element="tns:string" />
+  </wsdl:message>
+  <wsdl:message name="getCompID_V1HttpPostIn">
+    <wsdl:part name="createcode" type="s:string" />
+    <wsdl:part name="boxid" type="s:string" />
+    <wsdl:part name="compname" type="s:string" />
+    <wsdl:part name="manufacturer" type="s:string" />
+    <wsdl:part name="lotno" type="s:string" />
+    <wsdl:part name="datecode" type="s:string" />
+    <wsdl:part name="brand" type="s:string" />
+    <wsdl:part name="amount" type="s:string" />
+    <wsdl:part name="ordercode" type="s:string" />
+    <wsdl:part name="createuser" type="s:string" />
+    <wsdl:part name="remark" type="s:string" />
+  </wsdl:message>
+  <wsdl:message name="getCompID_V1HttpPostOut">
+    <wsdl:part name="Body" element="tns:string" />
+  </wsdl:message>
+  <wsdl:message name="insertBoxReelRelationHttpPostIn">
+    <wsdl:part name="createcode" type="s:string" />
+    <wsdl:part name="manufacturer" type="s:string" />
+    <wsdl:part name="boxID" type="s:string" />
+    <wsdl:part name="compid" type="s:string" />
+    <wsdl:part name="createuser" type="s:string" />
+    <wsdl:part name="remark" type="s:string" />
+  </wsdl:message>
+  <wsdl:message name="insertBoxReelRelationHttpPostOut">
+    <wsdl:part name="Body" element="tns:string" />
+  </wsdl:message>
+  <wsdl:message name="getReelListByBoxIDHttpPostIn">
+    <wsdl:part name="queryCode" type="s:string" />
+    <wsdl:part name="boxID" type="s:string" />
+  </wsdl:message>
+  <wsdl:message name="getReelListByBoxIDHttpPostOut">
+    <wsdl:part name="Body" element="tns:ArrayOfReelEntity" />
+  </wsdl:message>
+  <wsdl:portType name="Service1Soap">
+    <wsdl:operation name="HelloWorld">
+      <wsdl:input message="tns:HelloWorldSoapIn" />
+      <wsdl:output message="tns:HelloWorldSoapOut" />
+    </wsdl:operation>
+    <wsdl:operation name="getCompID">
+      <wsdl:input message="tns:getCompIDSoapIn" />
+      <wsdl:output message="tns:getCompIDSoapOut" />
+    </wsdl:operation>
+    <wsdl:operation name="getCompID_V1">
+      <wsdl:input message="tns:getCompID_V1SoapIn" />
+      <wsdl:output message="tns:getCompID_V1SoapOut" />
+    </wsdl:operation>
+    <wsdl:operation name="insertBoxReelRelation">
+      <wsdl:input message="tns:insertBoxReelRelationSoapIn" />
+      <wsdl:output message="tns:insertBoxReelRelationSoapOut" />
+    </wsdl:operation>
+    <wsdl:operation name="getReelListByBoxID">
+      <wsdl:input message="tns:getReelListByBoxIDSoapIn" />
+      <wsdl:output message="tns:getReelListByBoxIDSoapOut" />
+    </wsdl:operation>
+  </wsdl:portType>
+  <wsdl:portType name="Service1HttpGet">
+    <wsdl:operation name="HelloWorld">
+      <wsdl:input message="tns:HelloWorldHttpGetIn" />
+      <wsdl:output message="tns:HelloWorldHttpGetOut" />
+    </wsdl:operation>
+    <wsdl:operation name="getCompID">
+      <wsdl:input message="tns:getCompIDHttpGetIn" />
+      <wsdl:output message="tns:getCompIDHttpGetOut" />
+    </wsdl:operation>
+    <wsdl:operation name="getCompID_V1">
+      <wsdl:input message="tns:getCompID_V1HttpGetIn" />
+      <wsdl:output message="tns:getCompID_V1HttpGetOut" />
+    </wsdl:operation>
+    <wsdl:operation name="insertBoxReelRelation">
+      <wsdl:input message="tns:insertBoxReelRelationHttpGetIn" />
+      <wsdl:output message="tns:insertBoxReelRelationHttpGetOut" />
+    </wsdl:operation>
+    <wsdl:operation name="getReelListByBoxID">
+      <wsdl:input message="tns:getReelListByBoxIDHttpGetIn" />
+      <wsdl:output message="tns:getReelListByBoxIDHttpGetOut" />
+    </wsdl:operation>
+  </wsdl:portType>
+  <wsdl:portType name="Service1HttpPost">
+    <wsdl:operation name="HelloWorld">
+      <wsdl:input message="tns:HelloWorldHttpPostIn" />
+      <wsdl:output message="tns:HelloWorldHttpPostOut" />
+    </wsdl:operation>
+    <wsdl:operation name="getCompID">
+      <wsdl:input message="tns:getCompIDHttpPostIn" />
+      <wsdl:output message="tns:getCompIDHttpPostOut" />
+    </wsdl:operation>
+    <wsdl:operation name="getCompID_V1">
+      <wsdl:input message="tns:getCompID_V1HttpPostIn" />
+      <wsdl:output message="tns:getCompID_V1HttpPostOut" />
+    </wsdl:operation>
+    <wsdl:operation name="insertBoxReelRelation">
+      <wsdl:input message="tns:insertBoxReelRelationHttpPostIn" />
+      <wsdl:output message="tns:insertBoxReelRelationHttpPostOut" />
+    </wsdl:operation>
+    <wsdl:operation name="getReelListByBoxID">
+      <wsdl:input message="tns:getReelListByBoxIDHttpPostIn" />
+      <wsdl:output message="tns:getReelListByBoxIDHttpPostOut" />
+    </wsdl:operation>
+  </wsdl:portType>
+  <wsdl:binding name="Service1Soap" type="tns:Service1Soap">
+    <soap:binding transport="http://schemas.xmlsoap.org/soap/http" />
+    <wsdl:operation name="HelloWorld">
+      <soap:operation soapAction="http://tempuri.org/HelloWorld" style="document" />
+      <wsdl:input>
+        <soap:body use="literal" />
+      </wsdl:input>
+      <wsdl:output>
+        <soap:body use="literal" />
+      </wsdl:output>
+    </wsdl:operation>
+    <wsdl:operation name="getCompID">
+      <soap:operation soapAction="http://tempuri.org/getCompID" style="document" />
+      <wsdl:input>
+        <soap:body use="literal" />
+      </wsdl:input>
+      <wsdl:output>
+        <soap:body use="literal" />
+      </wsdl:output>
+    </wsdl:operation>
+    <wsdl:operation name="getCompID_V1">
+      <soap:operation soapAction="http://tempuri.org/getCompID_V1" style="document" />
+      <wsdl:input>
+        <soap:body use="literal" />
+      </wsdl:input>
+      <wsdl:output>
+        <soap:body use="literal" />
+      </wsdl:output>
+    </wsdl:operation>
+    <wsdl:operation name="insertBoxReelRelation">
+      <soap:operation soapAction="http://tempuri.org/insertBoxReelRelation" style="document" />
+      <wsdl:input>
+        <soap:body use="literal" />
+      </wsdl:input>
+      <wsdl:output>
+        <soap:body use="literal" />
+      </wsdl:output>
+    </wsdl:operation>
+    <wsdl:operation name="getReelListByBoxID">
+      <soap:operation soapAction="http://tempuri.org/getReelListByBoxID" style="document" />
+      <wsdl:input>
+        <soap:body use="literal" />
+      </wsdl:input>
+      <wsdl:output>
+        <soap:body use="literal" />
+      </wsdl:output>
+    </wsdl:operation>
+  </wsdl:binding>
+  <wsdl:binding name="Service1Soap12" type="tns:Service1Soap">
+    <soap12:binding transport="http://schemas.xmlsoap.org/soap/http" />
+    <wsdl:operation name="HelloWorld">
+      <soap12:operation soapAction="http://tempuri.org/HelloWorld" style="document" />
+      <wsdl:input>
+        <soap12:body use="literal" />
+      </wsdl:input>
+      <wsdl:output>
+        <soap12:body use="literal" />
+      </wsdl:output>
+    </wsdl:operation>
+    <wsdl:operation name="getCompID">
+      <soap12:operation soapAction="http://tempuri.org/getCompID" style="document" />
+      <wsdl:input>
+        <soap12:body use="literal" />
+      </wsdl:input>
+      <wsdl:output>
+        <soap12:body use="literal" />
+      </wsdl:output>
+    </wsdl:operation>
+    <wsdl:operation name="getCompID_V1">
+      <soap12:operation soapAction="http://tempuri.org/getCompID_V1" style="document" />
+      <wsdl:input>
+        <soap12:body use="literal" />
+      </wsdl:input>
+      <wsdl:output>
+        <soap12:body use="literal" />
+      </wsdl:output>
+    </wsdl:operation>
+    <wsdl:operation name="insertBoxReelRelation">
+      <soap12:operation soapAction="http://tempuri.org/insertBoxReelRelation" style="document" />
+      <wsdl:input>
+        <soap12:body use="literal" />
+      </wsdl:input>
+      <wsdl:output>
+        <soap12:body use="literal" />
+      </wsdl:output>
+    </wsdl:operation>
+    <wsdl:operation name="getReelListByBoxID">
+      <soap12:operation soapAction="http://tempuri.org/getReelListByBoxID" style="document" />
+      <wsdl:input>
+        <soap12:body use="literal" />
+      </wsdl:input>
+      <wsdl:output>
+        <soap12:body use="literal" />
+      </wsdl:output>
+    </wsdl:operation>
+  </wsdl:binding>
+  <wsdl:binding name="Service1HttpGet" type="tns:Service1HttpGet">
+    <http:binding verb="GET" />
+    <wsdl:operation name="HelloWorld">
+      <http:operation location="/HelloWorld" />
+      <wsdl:input>
+        <http:urlEncoded />
+      </wsdl:input>
+      <wsdl:output>
+        <mime:mimeXml part="Body" />
+      </wsdl:output>
+    </wsdl:operation>
+    <wsdl:operation name="getCompID">
+      <http:operation location="/getCompID" />
+      <wsdl:input>
+        <http:urlEncoded />
+      </wsdl:input>
+      <wsdl:output>
+        <mime:mimeXml part="Body" />
+      </wsdl:output>
+    </wsdl:operation>
+    <wsdl:operation name="getCompID_V1">
+      <http:operation location="/getCompID_V1" />
+      <wsdl:input>
+        <http:urlEncoded />
+      </wsdl:input>
+      <wsdl:output>
+        <mime:mimeXml part="Body" />
+      </wsdl:output>
+    </wsdl:operation>
+    <wsdl:operation name="insertBoxReelRelation">
+      <http:operation location="/insertBoxReelRelation" />
+      <wsdl:input>
+        <http:urlEncoded />
+      </wsdl:input>
+      <wsdl:output>
+        <mime:mimeXml part="Body" />
+      </wsdl:output>
+    </wsdl:operation>
+    <wsdl:operation name="getReelListByBoxID">
+      <http:operation location="/getReelListByBoxID" />
+      <wsdl:input>
+        <http:urlEncoded />
+      </wsdl:input>
+      <wsdl:output>
+        <mime:mimeXml part="Body" />
+      </wsdl:output>
+    </wsdl:operation>
+  </wsdl:binding>
+  <wsdl:binding name="Service1HttpPost" type="tns:Service1HttpPost">
+    <http:binding verb="POST" />
+    <wsdl:operation name="HelloWorld">
+      <http:operation location="/HelloWorld" />
+      <wsdl:input>
+        <mime:content type="application/x-www-form-urlencoded" />
+      </wsdl:input>
+      <wsdl:output>
+        <mime:mimeXml part="Body" />
+      </wsdl:output>
+    </wsdl:operation>
+    <wsdl:operation name="getCompID">
+      <http:operation location="/getCompID" />
+      <wsdl:input>
+        <mime:content type="application/x-www-form-urlencoded" />
+      </wsdl:input>
+      <wsdl:output>
+        <mime:mimeXml part="Body" />
+      </wsdl:output>
+    </wsdl:operation>
+    <wsdl:operation name="getCompID_V1">
+      <http:operation location="/getCompID_V1" />
+      <wsdl:input>
+        <mime:content type="application/x-www-form-urlencoded" />
+      </wsdl:input>
+      <wsdl:output>
+        <mime:mimeXml part="Body" />
+      </wsdl:output>
+    </wsdl:operation>
+    <wsdl:operation name="insertBoxReelRelation">
+      <http:operation location="/insertBoxReelRelation" />
+      <wsdl:input>
+        <mime:content type="application/x-www-form-urlencoded" />
+      </wsdl:input>
+      <wsdl:output>
+        <mime:mimeXml part="Body" />
+      </wsdl:output>
+    </wsdl:operation>
+    <wsdl:operation name="getReelListByBoxID">
+      <http:operation location="/getReelListByBoxID" />
+      <wsdl:input>
+        <mime:content type="application/x-www-form-urlencoded" />
+      </wsdl:input>
+      <wsdl:output>
+        <mime:mimeXml part="Body" />
+      </wsdl:output>
+    </wsdl:operation>
+  </wsdl:binding>
+  <wsdl:service name="Service1">
+    <wsdl:port name="Service1Soap" binding="tns:Service1Soap">
+      <soap:address location="http://middle.mes.vivo.xyz:7007/ReelAPI.asmx" />
+    </wsdl:port>
+    <wsdl:port name="Service1Soap12" binding="tns:Service1Soap12">
+      <soap12:address location="http://middle.mes.vivo.xyz:7007/ReelAPI.asmx" />
+    </wsdl:port>
+    <wsdl:port name="Service1HttpGet" binding="tns:Service1HttpGet">
+      <http:address location="http://middle.mes.vivo.xyz:7007/ReelAPI.asmx" />
+    </wsdl:port>
+    <wsdl:port name="Service1HttpPost" binding="tns:Service1HttpPost">
+      <http:address location="http://middle.mes.vivo.xyz:7007/ReelAPI.asmx" />
+    </wsdl:port>
+  </wsdl:service>
+</wsdl:definitions>

+ 244 - 0
UAS-出货标签管理(泽天)/Service References/Vivo_BoxReelRelation/Reference.cs

@@ -0,0 +1,244 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+//     此代码由工具生成。
+//     运行时版本:4.0.30319.42000
+//
+//     对此文件的更改可能会导致不正确的行为,并且如果
+//     重新生成代码,这些更改将会丢失。
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace UAS_LabelMachine.Vivo_BoxReelRelation {
+    
+    
+    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
+    [System.ServiceModel.ServiceContractAttribute(ConfigurationName="Vivo_BoxReelRelation.Service1Soap")]
+    public interface Service1Soap {
+        
+        [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/HelloWorld", ReplyAction="*")]
+        [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults=true)]
+        string HelloWorld();
+        
+        [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/getCompID", ReplyAction="*")]
+        [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults=true)]
+        string getCompID(string createcode, string boxid, string compname, string manufacturer, string lotno, string datecode, int amount, string ordercode, string createuser, string remark);
+        
+        [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/getCompID_V1", ReplyAction="*")]
+        [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults=true)]
+        string getCompID_V1(string createcode, string boxid, string compname, string manufacturer, string lotno, string datecode, string brand, int amount, string ordercode, string createuser, string remark);
+        
+        [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/insertBoxReelRelation", ReplyAction="*")]
+        [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults=true)]
+        string insertBoxReelRelation(string createcode, string manufacturer, string boxID, string compid, string createuser, string remark);
+        
+        [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/getReelListByBoxID", ReplyAction="*")]
+        [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults=true)]
+        UAS_LabelMachine.Vivo_BoxReelRelation.ReelEntity[] getReelListByBoxID(string queryCode, string boxID);
+    }
+    
+    /// <remarks/>
+    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.6.1064.2")]
+    [System.SerializableAttribute()]
+    [System.Diagnostics.DebuggerStepThroughAttribute()]
+    [System.ComponentModel.DesignerCategoryAttribute("code")]
+    [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://tempuri.org/")]
+    public partial class ReelEntity : object, System.ComponentModel.INotifyPropertyChanged {
+        
+        private string boxidField;
+        
+        private string compidField;
+        
+        private string compnameField;
+        
+        private string manufacturerField;
+        
+        private string lotnoField;
+        
+        private string datecodeField;
+        
+        private string amountField;
+        
+        private string ordercodeField;
+        
+        private string statusField;
+        
+        private string brandField;
+        
+        /// <remarks/>
+        [System.Xml.Serialization.XmlElementAttribute(Order=0)]
+        public string Boxid {
+            get {
+                return this.boxidField;
+            }
+            set {
+                this.boxidField = value;
+                this.RaisePropertyChanged("Boxid");
+            }
+        }
+        
+        /// <remarks/>
+        [System.Xml.Serialization.XmlElementAttribute(Order=1)]
+        public string Compid {
+            get {
+                return this.compidField;
+            }
+            set {
+                this.compidField = value;
+                this.RaisePropertyChanged("Compid");
+            }
+        }
+        
+        /// <remarks/>
+        [System.Xml.Serialization.XmlElementAttribute(Order=2)]
+        public string Compname {
+            get {
+                return this.compnameField;
+            }
+            set {
+                this.compnameField = value;
+                this.RaisePropertyChanged("Compname");
+            }
+        }
+        
+        /// <remarks/>
+        [System.Xml.Serialization.XmlElementAttribute(Order=3)]
+        public string Manufacturer {
+            get {
+                return this.manufacturerField;
+            }
+            set {
+                this.manufacturerField = value;
+                this.RaisePropertyChanged("Manufacturer");
+            }
+        }
+        
+        /// <remarks/>
+        [System.Xml.Serialization.XmlElementAttribute(Order=4)]
+        public string Lotno {
+            get {
+                return this.lotnoField;
+            }
+            set {
+                this.lotnoField = value;
+                this.RaisePropertyChanged("Lotno");
+            }
+        }
+        
+        /// <remarks/>
+        [System.Xml.Serialization.XmlElementAttribute(Order=5)]
+        public string Datecode {
+            get {
+                return this.datecodeField;
+            }
+            set {
+                this.datecodeField = value;
+                this.RaisePropertyChanged("Datecode");
+            }
+        }
+        
+        /// <remarks/>
+        [System.Xml.Serialization.XmlElementAttribute(Order=6)]
+        public string Amount {
+            get {
+                return this.amountField;
+            }
+            set {
+                this.amountField = value;
+                this.RaisePropertyChanged("Amount");
+            }
+        }
+        
+        /// <remarks/>
+        [System.Xml.Serialization.XmlElementAttribute(Order=7)]
+        public string Ordercode {
+            get {
+                return this.ordercodeField;
+            }
+            set {
+                this.ordercodeField = value;
+                this.RaisePropertyChanged("Ordercode");
+            }
+        }
+        
+        /// <remarks/>
+        [System.Xml.Serialization.XmlElementAttribute(Order=8)]
+        public string Status {
+            get {
+                return this.statusField;
+            }
+            set {
+                this.statusField = value;
+                this.RaisePropertyChanged("Status");
+            }
+        }
+        
+        /// <remarks/>
+        [System.Xml.Serialization.XmlElementAttribute(Order=9)]
+        public string Brand {
+            get {
+                return this.brandField;
+            }
+            set {
+                this.brandField = value;
+                this.RaisePropertyChanged("Brand");
+            }
+        }
+        
+        public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged;
+        
+        protected void RaisePropertyChanged(string propertyName) {
+            System.ComponentModel.PropertyChangedEventHandler propertyChanged = this.PropertyChanged;
+            if ((propertyChanged != null)) {
+                propertyChanged(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName));
+            }
+        }
+    }
+    
+    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
+    public interface Service1SoapChannel : UAS_LabelMachine.Vivo_BoxReelRelation.Service1Soap, System.ServiceModel.IClientChannel {
+    }
+    
+    [System.Diagnostics.DebuggerStepThroughAttribute()]
+    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
+    public partial class Service1SoapClient : System.ServiceModel.ClientBase<UAS_LabelMachine.Vivo_BoxReelRelation.Service1Soap>, UAS_LabelMachine.Vivo_BoxReelRelation.Service1Soap {
+        
+        public Service1SoapClient() {
+        }
+        
+        public Service1SoapClient(string endpointConfigurationName) : 
+                base(endpointConfigurationName) {
+        }
+        
+        public Service1SoapClient(string endpointConfigurationName, string remoteAddress) : 
+                base(endpointConfigurationName, remoteAddress) {
+        }
+        
+        public Service1SoapClient(string endpointConfigurationName, System.ServiceModel.EndpointAddress remoteAddress) : 
+                base(endpointConfigurationName, remoteAddress) {
+        }
+        
+        public Service1SoapClient(System.ServiceModel.Channels.Binding binding, System.ServiceModel.EndpointAddress remoteAddress) : 
+                base(binding, remoteAddress) {
+        }
+        
+        public string HelloWorld() {
+            return base.Channel.HelloWorld();
+        }
+        
+        public string getCompID(string createcode, string boxid, string compname, string manufacturer, string lotno, string datecode, int amount, string ordercode, string createuser, string remark) {
+            return base.Channel.getCompID(createcode, boxid, compname, manufacturer, lotno, datecode, amount, ordercode, createuser, remark);
+        }
+        
+        public string getCompID_V1(string createcode, string boxid, string compname, string manufacturer, string lotno, string datecode, string brand, int amount, string ordercode, string createuser, string remark) {
+            return base.Channel.getCompID_V1(createcode, boxid, compname, manufacturer, lotno, datecode, brand, amount, ordercode, createuser, remark);
+        }
+        
+        public string insertBoxReelRelation(string createcode, string manufacturer, string boxID, string compid, string createuser, string remark) {
+            return base.Channel.insertBoxReelRelation(createcode, manufacturer, boxID, compid, createuser, remark);
+        }
+        
+        public UAS_LabelMachine.Vivo_BoxReelRelation.ReelEntity[] getReelListByBoxID(string queryCode, string boxID) {
+            return base.Channel.getReelListByBoxID(queryCode, boxID);
+        }
+    }
+}

+ 31 - 0
UAS-出货标签管理(泽天)/Service References/Vivo_BoxReelRelation/Reference.svcmap

@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="utf-8"?>
+<ReferenceGroup xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" ID="fb4f425e-4343-400a-b806-f1fdd4a22bc2" xmlns="urn:schemas-microsoft-com:xml-wcfservicemap">
+  <ClientOptions>
+    <GenerateAsynchronousMethods>false</GenerateAsynchronousMethods>
+    <EnableDataBinding>true</EnableDataBinding>
+    <ExcludedTypes />
+    <ImportXmlTypes>false</ImportXmlTypes>
+    <GenerateInternalTypes>false</GenerateInternalTypes>
+    <GenerateMessageContracts>false</GenerateMessageContracts>
+    <NamespaceMappings />
+    <CollectionMappings />
+    <GenerateSerializableTypes>true</GenerateSerializableTypes>
+    <Serializer>Auto</Serializer>
+    <UseSerializerForFaults>true</UseSerializerForFaults>
+    <ReferenceAllAssemblies>true</ReferenceAllAssemblies>
+    <ReferencedAssemblies />
+    <ReferencedDataContractTypes />
+    <ServiceContractMappings />
+  </ClientOptions>
+  <MetadataSources>
+    <MetadataSource Address="http://middle.mes.vivo.xyz:7007/ReelAPI.asmx?op=insertBoxReelRelation" Protocol="http" SourceId="1" />
+  </MetadataSources>
+  <Metadata>
+    <MetadataFile FileName="ReelAPI.disco" MetadataType="Disco" ID="e4560f5f-1a66-426d-a2ae-21a6aeb055a4" SourceId="1" SourceUrl="http://middle.mes.vivo.xyz:7007/ReelAPI.asmx?disco" />
+    <MetadataFile FileName="ReelAPI.wsdl" MetadataType="Wsdl" ID="c5a84d77-7b69-402d-9932-9a4191a68838" SourceId="1" SourceUrl="http://middle.mes.vivo.xyz:7007/ReelAPI.asmx?wsdl" />
+  </Metadata>
+  <Extensions>
+    <ExtensionFile FileName="configuration91.svcinfo" Name="configuration91.svcinfo" />
+    <ExtensionFile FileName="configuration.svcinfo" Name="configuration.svcinfo" />
+  </Extensions>
+</ReferenceGroup>

+ 10 - 0
UAS-出货标签管理(泽天)/Service References/Vivo_BoxReelRelation/UAS_LabelMachine.Vivo_BoxReelRelation.ReelEntity.datasource

@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+    This file is automatically generated by Visual Studio .Net. It is 
+    used to store generic object data source configuration information.  
+    Renaming the file extension or editing the content of this file may   
+    cause the file to be unrecognizable by the program.
+-->
+<GenericObjectDataSource DisplayName="ReelEntity" Version="1.0" xmlns="urn:schemas-microsoft-com:xml-msdatasource">
+   <TypeInfo>UAS_LabelMachine.Vivo_BoxReelRelation.ReelEntity, Service References.Vivo_BoxReelRelation.Reference.cs.dll, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null</TypeInfo>
+</GenericObjectDataSource>

+ 12 - 0
UAS-出货标签管理(泽天)/Service References/Vivo_BoxReelRelation/configuration.svcinfo

@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8"?>
+<configurationSnapshot xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="urn:schemas-microsoft-com:xml-wcfconfigurationsnapshot">
+  <behaviors />
+  <bindings>
+    <binding digest="System.ServiceModel.Configuration.BasicHttpBindingElement, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089:&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-16&quot;?&gt;&lt;Data name=&quot;Service1Soap1&quot; /&gt;" bindingType="basicHttpBinding" name="Service1Soap1" />
+    <binding digest="System.ServiceModel.Configuration.CustomBindingElement, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089:&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-16&quot;?&gt;&lt;Data name=&quot;Service1Soap12&quot;&gt;&lt;httpTransport /&gt;&lt;textMessageEncoding messageVersion=&quot;Soap12&quot; /&gt;&lt;/Data&gt;" bindingType="customBinding" name="Service1Soap12" />
+  </bindings>
+  <endpoints>
+    <endpoint normalizedDigest="&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-16&quot;?&gt;&lt;Data address=&quot;http://middle.mes.vivo.xyz:7007/ReelAPI.asmx&quot; binding=&quot;basicHttpBinding&quot; bindingConfiguration=&quot;Service1Soap1&quot; contract=&quot;Vivo_BoxReelRelation.Service1Soap&quot; name=&quot;Service1Soap1&quot; /&gt;" digest="&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-16&quot;?&gt;&lt;Data address=&quot;http://middle.mes.vivo.xyz:7007/ReelAPI.asmx&quot; binding=&quot;basicHttpBinding&quot; bindingConfiguration=&quot;Service1Soap1&quot; contract=&quot;Vivo_BoxReelRelation.Service1Soap&quot; name=&quot;Service1Soap1&quot; /&gt;" contractName="Vivo_BoxReelRelation.Service1Soap" name="Service1Soap1" />
+    <endpoint normalizedDigest="&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-16&quot;?&gt;&lt;Data address=&quot;http://middle.mes.vivo.xyz:7007/ReelAPI.asmx&quot; binding=&quot;customBinding&quot; bindingConfiguration=&quot;Service1Soap12&quot; contract=&quot;Vivo_BoxReelRelation.Service1Soap&quot; name=&quot;Service1Soap12&quot; /&gt;" digest="&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-16&quot;?&gt;&lt;Data address=&quot;http://middle.mes.vivo.xyz:7007/ReelAPI.asmx&quot; binding=&quot;customBinding&quot; bindingConfiguration=&quot;Service1Soap12&quot; contract=&quot;Vivo_BoxReelRelation.Service1Soap&quot; name=&quot;Service1Soap12&quot; /&gt;" contractName="Vivo_BoxReelRelation.Service1Soap" name="Service1Soap12" />
+  </endpoints>
+</configurationSnapshot>

+ 437 - 0
UAS-出货标签管理(泽天)/Service References/Vivo_BoxReelRelation/configuration91.svcinfo

@@ -0,0 +1,437 @@
+<?xml version="1.0" encoding="utf-8"?>
+<SavedWcfConfigurationInformation xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Version="9.1" CheckSum="Ym0CywGtiOSR4S7ckjY+cLZIhM0=">
+  <bindingConfigurations>
+    <bindingConfiguration bindingType="basicHttpBinding" name="Service1Soap1">
+      <properties>
+        <property path="/name" isComplexType="false" isExplicitlyDefined="true" clrType="System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+          <serializedValue>Service1Soap1</serializedValue>
+        </property>
+        <property path="/closeTimeout" isComplexType="false" isExplicitlyDefined="true" clrType="System.TimeSpan, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+          <serializedValue />
+        </property>
+        <property path="/openTimeout" isComplexType="false" isExplicitlyDefined="true" clrType="System.TimeSpan, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+          <serializedValue />
+        </property>
+        <property path="/receiveTimeout" isComplexType="false" isExplicitlyDefined="true" clrType="System.TimeSpan, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+          <serializedValue />
+        </property>
+        <property path="/sendTimeout" isComplexType="false" isExplicitlyDefined="true" clrType="System.TimeSpan, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+          <serializedValue />
+        </property>
+        <property path="/allowCookies" isComplexType="false" isExplicitlyDefined="true" clrType="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+          <serializedValue />
+        </property>
+        <property path="/bypassProxyOnLocal" isComplexType="false" isExplicitlyDefined="true" clrType="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+          <serializedValue />
+        </property>
+        <property path="/hostNameComparisonMode" isComplexType="false" isExplicitlyDefined="false" clrType="System.ServiceModel.HostNameComparisonMode, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+          <serializedValue>StrongWildcard</serializedValue>
+        </property>
+        <property path="/maxBufferPoolSize" isComplexType="false" isExplicitlyDefined="true" clrType="System.Int64, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+          <serializedValue />
+        </property>
+        <property path="/maxBufferSize" isComplexType="false" isExplicitlyDefined="false" clrType="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+          <serializedValue>65536</serializedValue>
+        </property>
+        <property path="/maxReceivedMessageSize" isComplexType="false" isExplicitlyDefined="true" clrType="System.Int64, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+          <serializedValue />
+        </property>
+        <property path="/proxyAddress" isComplexType="false" isExplicitlyDefined="false" clrType="System.Uri, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+          <serializedValue />
+        </property>
+        <property path="/readerQuotas" isComplexType="true" isExplicitlyDefined="false" clrType="System.ServiceModel.Configuration.XmlDictionaryReaderQuotasElement, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+          <serializedValue>System.ServiceModel.Configuration.XmlDictionaryReaderQuotasElement</serializedValue>
+        </property>
+        <property path="/readerQuotas/maxDepth" isComplexType="false" isExplicitlyDefined="false" clrType="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+          <serializedValue>0</serializedValue>
+        </property>
+        <property path="/readerQuotas/maxStringContentLength" isComplexType="false" isExplicitlyDefined="false" clrType="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+          <serializedValue>0</serializedValue>
+        </property>
+        <property path="/readerQuotas/maxArrayLength" isComplexType="false" isExplicitlyDefined="false" clrType="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+          <serializedValue>0</serializedValue>
+        </property>
+        <property path="/readerQuotas/maxBytesPerRead" isComplexType="false" isExplicitlyDefined="false" clrType="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+          <serializedValue>0</serializedValue>
+        </property>
+        <property path="/readerQuotas/maxNameTableCharCount" isComplexType="false" isExplicitlyDefined="false" clrType="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+          <serializedValue>0</serializedValue>
+        </property>
+        <property path="/textEncoding" isComplexType="false" isExplicitlyDefined="false" clrType="System.Text.Encoding, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+          <serializedValue>System.Text.UTF8Encoding</serializedValue>
+        </property>
+        <property path="/transferMode" isComplexType="false" isExplicitlyDefined="false" clrType="System.ServiceModel.TransferMode, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+          <serializedValue>Buffered</serializedValue>
+        </property>
+        <property path="/useDefaultWebProxy" isComplexType="false" isExplicitlyDefined="true" clrType="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+          <serializedValue />
+        </property>
+        <property path="/messageEncoding" isComplexType="false" isExplicitlyDefined="false" clrType="System.ServiceModel.WSMessageEncoding, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+          <serializedValue>Text</serializedValue>
+        </property>
+        <property path="/security" isComplexType="true" isExplicitlyDefined="false" clrType="System.ServiceModel.Configuration.BasicHttpSecurityElement, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+          <serializedValue>System.ServiceModel.Configuration.BasicHttpSecurityElement</serializedValue>
+        </property>
+        <property path="/security/mode" isComplexType="false" isExplicitlyDefined="false" clrType="System.ServiceModel.BasicHttpSecurityMode, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+          <serializedValue>None</serializedValue>
+        </property>
+        <property path="/security/transport" isComplexType="true" isExplicitlyDefined="false" clrType="System.ServiceModel.Configuration.HttpTransportSecurityElement, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+          <serializedValue>System.ServiceModel.Configuration.HttpTransportSecurityElement</serializedValue>
+        </property>
+        <property path="/security/transport/clientCredentialType" isComplexType="false" isExplicitlyDefined="false" clrType="System.ServiceModel.HttpClientCredentialType, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+          <serializedValue>None</serializedValue>
+        </property>
+        <property path="/security/transport/proxyCredentialType" isComplexType="false" isExplicitlyDefined="false" clrType="System.ServiceModel.HttpProxyCredentialType, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+          <serializedValue>None</serializedValue>
+        </property>
+        <property path="/security/transport/extendedProtectionPolicy" isComplexType="true" isExplicitlyDefined="false" clrType="System.Security.Authentication.ExtendedProtection.Configuration.ExtendedProtectionPolicyElement, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+          <serializedValue>System.Security.Authentication.ExtendedProtection.Configuration.ExtendedProtectionPolicyElement</serializedValue>
+        </property>
+        <property path="/security/transport/extendedProtectionPolicy/policyEnforcement" isComplexType="false" isExplicitlyDefined="false" clrType="System.Security.Authentication.ExtendedProtection.PolicyEnforcement, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+          <serializedValue>Never</serializedValue>
+        </property>
+        <property path="/security/transport/extendedProtectionPolicy/protectionScenario" isComplexType="false" isExplicitlyDefined="false" clrType="System.Security.Authentication.ExtendedProtection.ProtectionScenario, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+          <serializedValue>TransportSelected</serializedValue>
+        </property>
+        <property path="/security/transport/extendedProtectionPolicy/customServiceNames" isComplexType="true" isExplicitlyDefined="false" clrType="System.Security.Authentication.ExtendedProtection.Configuration.ServiceNameElementCollection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+          <serializedValue>(集合)</serializedValue>
+        </property>
+        <property path="/security/transport/realm" isComplexType="false" isExplicitlyDefined="false" clrType="System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+          <serializedValue />
+        </property>
+        <property path="/security/message" isComplexType="true" isExplicitlyDefined="false" clrType="System.ServiceModel.Configuration.BasicHttpMessageSecurityElement, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+          <serializedValue>System.ServiceModel.Configuration.BasicHttpMessageSecurityElement</serializedValue>
+        </property>
+        <property path="/security/message/clientCredentialType" isComplexType="false" isExplicitlyDefined="false" clrType="System.ServiceModel.BasicHttpMessageCredentialType, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+          <serializedValue>UserName</serializedValue>
+        </property>
+        <property path="/security/message/algorithmSuite" isComplexType="false" isExplicitlyDefined="false" clrType="System.ServiceModel.Security.SecurityAlgorithmSuite, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+          <serializedValue>Default</serializedValue>
+        </property>
+      </properties>
+    </bindingConfiguration>
+    <bindingConfiguration bindingType="customBinding" name="Service1Soap12">
+      <properties>
+        <property path="/name" isComplexType="false" isExplicitlyDefined="true" clrType="System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+          <serializedValue>Service1Soap12</serializedValue>
+        </property>
+        <property path="/closeTimeout" isComplexType="false" isExplicitlyDefined="true" clrType="System.TimeSpan, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+          <serializedValue />
+        </property>
+        <property path="/openTimeout" isComplexType="false" isExplicitlyDefined="true" clrType="System.TimeSpan, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+          <serializedValue />
+        </property>
+        <property path="/receiveTimeout" isComplexType="false" isExplicitlyDefined="true" clrType="System.TimeSpan, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+          <serializedValue />
+        </property>
+        <property path="/sendTimeout" isComplexType="false" isExplicitlyDefined="true" clrType="System.TimeSpan, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+          <serializedValue />
+        </property>
+        <property path="/textMessageEncoding" isComplexType="true" isExplicitlyDefined="false" clrType="System.ServiceModel.Configuration.TextMessageEncodingElement, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+          <serializedValue>System.ServiceModel.Configuration.TextMessageEncodingElement</serializedValue>
+        </property>
+        <property path="/textMessageEncoding/maxReadPoolSize" isComplexType="false" isExplicitlyDefined="false" clrType="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+          <serializedValue>64</serializedValue>
+        </property>
+        <property path="/textMessageEncoding/maxWritePoolSize" isComplexType="false" isExplicitlyDefined="false" clrType="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+          <serializedValue>16</serializedValue>
+        </property>
+        <property path="/textMessageEncoding/messageVersion" isComplexType="false" isExplicitlyDefined="true" clrType="System.ServiceModel.Channels.MessageVersion, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+          <serializedValue>Soap12</serializedValue>
+        </property>
+        <property path="/textMessageEncoding/readerQuotas" isComplexType="true" isExplicitlyDefined="false" clrType="System.ServiceModel.Configuration.XmlDictionaryReaderQuotasElement, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+          <serializedValue>System.ServiceModel.Configuration.XmlDictionaryReaderQuotasElement</serializedValue>
+        </property>
+        <property path="/textMessageEncoding/readerQuotas/maxDepth" isComplexType="false" isExplicitlyDefined="false" clrType="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+          <serializedValue>0</serializedValue>
+        </property>
+        <property path="/textMessageEncoding/readerQuotas/maxStringContentLength" isComplexType="false" isExplicitlyDefined="false" clrType="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+          <serializedValue>0</serializedValue>
+        </property>
+        <property path="/textMessageEncoding/readerQuotas/maxArrayLength" isComplexType="false" isExplicitlyDefined="false" clrType="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+          <serializedValue>0</serializedValue>
+        </property>
+        <property path="/textMessageEncoding/readerQuotas/maxBytesPerRead" isComplexType="false" isExplicitlyDefined="false" clrType="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+          <serializedValue>0</serializedValue>
+        </property>
+        <property path="/textMessageEncoding/readerQuotas/maxNameTableCharCount" isComplexType="false" isExplicitlyDefined="false" clrType="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+          <serializedValue>0</serializedValue>
+        </property>
+        <property path="/textMessageEncoding/writeEncoding" isComplexType="false" isExplicitlyDefined="false" clrType="System.Text.Encoding, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+          <serializedValue>System.Text.UTF8Encoding</serializedValue>
+        </property>
+        <property path="/httpTransport" isComplexType="true" isExplicitlyDefined="false" clrType="System.ServiceModel.Configuration.HttpTransportElement, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+          <serializedValue>System.ServiceModel.Configuration.HttpTransportElement</serializedValue>
+        </property>
+        <property path="/httpTransport/manualAddressing" isComplexType="false" isExplicitlyDefined="false" clrType="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+          <serializedValue>False</serializedValue>
+        </property>
+        <property path="/httpTransport/maxBufferPoolSize" isComplexType="false" isExplicitlyDefined="false" clrType="System.Int64, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+          <serializedValue>524288</serializedValue>
+        </property>
+        <property path="/httpTransport/maxReceivedMessageSize" isComplexType="false" isExplicitlyDefined="false" clrType="System.Int64, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+          <serializedValue>65536</serializedValue>
+        </property>
+        <property path="/httpTransport/allowCookies" isComplexType="false" isExplicitlyDefined="false" clrType="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+          <serializedValue>False</serializedValue>
+        </property>
+        <property path="/httpTransport/requestInitializationTimeout" isComplexType="false" isExplicitlyDefined="false" clrType="System.TimeSpan, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+          <serializedValue>00:00:00</serializedValue>
+        </property>
+        <property path="/httpTransport/authenticationScheme" isComplexType="false" isExplicitlyDefined="false" clrType="System.Net.AuthenticationSchemes, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+          <serializedValue>Anonymous</serializedValue>
+        </property>
+        <property path="/httpTransport/bypassProxyOnLocal" isComplexType="false" isExplicitlyDefined="false" clrType="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+          <serializedValue>False</serializedValue>
+        </property>
+        <property path="/httpTransport/decompressionEnabled" isComplexType="false" isExplicitlyDefined="false" clrType="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+          <serializedValue>True</serializedValue>
+        </property>
+        <property path="/httpTransport/hostNameComparisonMode" isComplexType="false" isExplicitlyDefined="false" clrType="System.ServiceModel.HostNameComparisonMode, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+          <serializedValue>StrongWildcard</serializedValue>
+        </property>
+        <property path="/httpTransport/keepAliveEnabled" isComplexType="false" isExplicitlyDefined="false" clrType="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+          <serializedValue>True</serializedValue>
+        </property>
+        <property path="/httpTransport/maxBufferSize" isComplexType="false" isExplicitlyDefined="false" clrType="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+          <serializedValue>65536</serializedValue>
+        </property>
+        <property path="/httpTransport/maxPendingAccepts" isComplexType="false" isExplicitlyDefined="false" clrType="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+          <serializedValue>0</serializedValue>
+        </property>
+        <property path="/httpTransport/messageHandlerFactory" isComplexType="true" isExplicitlyDefined="false" clrType="System.ServiceModel.Configuration.HttpMessageHandlerFactoryElement, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+          <serializedValue>System.ServiceModel.Configuration.HttpMessageHandlerFactoryElement</serializedValue>
+        </property>
+        <property path="/httpTransport/messageHandlerFactory/handlers" isComplexType="true" isExplicitlyDefined="false" clrType="System.ServiceModel.Configuration.DelegatingHandlerElementCollection, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+          <serializedValue>(集合)</serializedValue>
+        </property>
+        <property path="/httpTransport/messageHandlerFactory/type" isComplexType="false" isExplicitlyDefined="false" clrType="System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+          <serializedValue />
+        </property>
+        <property path="/httpTransport/proxyAddress" isComplexType="false" isExplicitlyDefined="false" clrType="System.Uri, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+          <serializedValue />
+        </property>
+        <property path="/httpTransport/proxyAuthenticationScheme" isComplexType="false" isExplicitlyDefined="false" clrType="System.Net.AuthenticationSchemes, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+          <serializedValue>Anonymous</serializedValue>
+        </property>
+        <property path="/httpTransport/realm" isComplexType="false" isExplicitlyDefined="false" clrType="System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+          <serializedValue />
+        </property>
+        <property path="/httpTransport/transferMode" isComplexType="false" isExplicitlyDefined="false" clrType="System.ServiceModel.TransferMode, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+          <serializedValue>Buffered</serializedValue>
+        </property>
+        <property path="/httpTransport/unsafeConnectionNtlmAuthentication" isComplexType="false" isExplicitlyDefined="false" clrType="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+          <serializedValue>False</serializedValue>
+        </property>
+        <property path="/httpTransport/useDefaultWebProxy" isComplexType="false" isExplicitlyDefined="false" clrType="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+          <serializedValue>True</serializedValue>
+        </property>
+        <property path="/httpTransport/extendedProtectionPolicy" isComplexType="true" isExplicitlyDefined="false" clrType="System.Security.Authentication.ExtendedProtection.Configuration.ExtendedProtectionPolicyElement, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+          <serializedValue>System.Security.Authentication.ExtendedProtection.Configuration.ExtendedProtectionPolicyElement</serializedValue>
+        </property>
+        <property path="/httpTransport/extendedProtectionPolicy/policyEnforcement" isComplexType="false" isExplicitlyDefined="false" clrType="System.Security.Authentication.ExtendedProtection.PolicyEnforcement, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+          <serializedValue>Never</serializedValue>
+        </property>
+        <property path="/httpTransport/extendedProtectionPolicy/protectionScenario" isComplexType="false" isExplicitlyDefined="false" clrType="System.Security.Authentication.ExtendedProtection.ProtectionScenario, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+          <serializedValue>TransportSelected</serializedValue>
+        </property>
+        <property path="/httpTransport/extendedProtectionPolicy/customServiceNames" isComplexType="true" isExplicitlyDefined="false" clrType="System.Security.Authentication.ExtendedProtection.Configuration.ServiceNameElementCollection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+          <serializedValue>(集合)</serializedValue>
+        </property>
+        <property path="/httpTransport/webSocketSettings" isComplexType="true" isExplicitlyDefined="false" clrType="System.ServiceModel.Configuration.WebSocketTransportSettingsElement, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+          <serializedValue>System.ServiceModel.Configuration.WebSocketTransportSettingsElement</serializedValue>
+        </property>
+        <property path="/httpTransport/webSocketSettings/transportUsage" isComplexType="false" isExplicitlyDefined="false" clrType="System.ServiceModel.Channels.WebSocketTransportUsage, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+          <serializedValue>Never</serializedValue>
+        </property>
+        <property path="/httpTransport/webSocketSettings/createNotificationOnConnection" isComplexType="false" isExplicitlyDefined="false" clrType="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+          <serializedValue>False</serializedValue>
+        </property>
+        <property path="/httpTransport/webSocketSettings/keepAliveInterval" isComplexType="false" isExplicitlyDefined="false" clrType="System.TimeSpan, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+          <serializedValue>00:00:00</serializedValue>
+        </property>
+        <property path="/httpTransport/webSocketSettings/subProtocol" isComplexType="false" isExplicitlyDefined="true" clrType="System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+          <serializedValue />
+        </property>
+        <property path="/httpTransport/webSocketSettings/disablePayloadMasking" isComplexType="false" isExplicitlyDefined="false" clrType="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+          <serializedValue>False</serializedValue>
+        </property>
+        <property path="/httpTransport/webSocketSettings/maxPendingConnections" isComplexType="false" isExplicitlyDefined="false" clrType="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+          <serializedValue>0</serializedValue>
+        </property>
+      </properties>
+    </bindingConfiguration>
+  </bindingConfigurations>
+  <endpoints>
+    <endpoint name="Service1Soap1" contract="Vivo_BoxReelRelation.Service1Soap" bindingType="basicHttpBinding" address="http://middle.mes.vivo.xyz:7007/ReelAPI.asmx" bindingConfiguration="Service1Soap1">
+      <properties>
+        <property path="/address" isComplexType="false" isExplicitlyDefined="true" clrType="System.Uri, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+          <serializedValue>http://middle.mes.vivo.xyz:7007/ReelAPI.asmx</serializedValue>
+        </property>
+        <property path="/behaviorConfiguration" isComplexType="false" isExplicitlyDefined="false" clrType="System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+          <serializedValue />
+        </property>
+        <property path="/binding" isComplexType="false" isExplicitlyDefined="true" clrType="System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+          <serializedValue>basicHttpBinding</serializedValue>
+        </property>
+        <property path="/bindingConfiguration" isComplexType="false" isExplicitlyDefined="true" clrType="System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+          <serializedValue>Service1Soap1</serializedValue>
+        </property>
+        <property path="/contract" isComplexType="false" isExplicitlyDefined="true" clrType="System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+          <serializedValue>Vivo_BoxReelRelation.Service1Soap</serializedValue>
+        </property>
+        <property path="/headers" isComplexType="true" isExplicitlyDefined="false" clrType="System.ServiceModel.Configuration.AddressHeaderCollectionElement, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+          <serializedValue>System.ServiceModel.Configuration.AddressHeaderCollectionElement</serializedValue>
+        </property>
+        <property path="/headers/headers" isComplexType="false" isExplicitlyDefined="true" clrType="System.ServiceModel.Channels.AddressHeaderCollection, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+          <serializedValue>&lt;Header /&gt;</serializedValue>
+        </property>
+        <property path="/identity" isComplexType="true" isExplicitlyDefined="false" clrType="System.ServiceModel.Configuration.IdentityElement, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+          <serializedValue>System.ServiceModel.Configuration.IdentityElement</serializedValue>
+        </property>
+        <property path="/identity/userPrincipalName" isComplexType="true" isExplicitlyDefined="false" clrType="System.ServiceModel.Configuration.UserPrincipalNameElement, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+          <serializedValue>System.ServiceModel.Configuration.UserPrincipalNameElement</serializedValue>
+        </property>
+        <property path="/identity/userPrincipalName/value" isComplexType="false" isExplicitlyDefined="false" clrType="System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+          <serializedValue />
+        </property>
+        <property path="/identity/servicePrincipalName" isComplexType="true" isExplicitlyDefined="false" clrType="System.ServiceModel.Configuration.ServicePrincipalNameElement, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+          <serializedValue>System.ServiceModel.Configuration.ServicePrincipalNameElement</serializedValue>
+        </property>
+        <property path="/identity/servicePrincipalName/value" isComplexType="false" isExplicitlyDefined="false" clrType="System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+          <serializedValue />
+        </property>
+        <property path="/identity/dns" isComplexType="true" isExplicitlyDefined="false" clrType="System.ServiceModel.Configuration.DnsElement, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+          <serializedValue>System.ServiceModel.Configuration.DnsElement</serializedValue>
+        </property>
+        <property path="/identity/dns/value" isComplexType="false" isExplicitlyDefined="false" clrType="System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+          <serializedValue />
+        </property>
+        <property path="/identity/rsa" isComplexType="true" isExplicitlyDefined="false" clrType="System.ServiceModel.Configuration.RsaElement, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+          <serializedValue>System.ServiceModel.Configuration.RsaElement</serializedValue>
+        </property>
+        <property path="/identity/rsa/value" isComplexType="false" isExplicitlyDefined="false" clrType="System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+          <serializedValue />
+        </property>
+        <property path="/identity/certificate" isComplexType="true" isExplicitlyDefined="false" clrType="System.ServiceModel.Configuration.CertificateElement, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+          <serializedValue>System.ServiceModel.Configuration.CertificateElement</serializedValue>
+        </property>
+        <property path="/identity/certificate/encodedValue" isComplexType="false" isExplicitlyDefined="false" clrType="System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+          <serializedValue />
+        </property>
+        <property path="/identity/certificateReference" isComplexType="true" isExplicitlyDefined="false" clrType="System.ServiceModel.Configuration.CertificateReferenceElement, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+          <serializedValue>System.ServiceModel.Configuration.CertificateReferenceElement</serializedValue>
+        </property>
+        <property path="/identity/certificateReference/storeName" isComplexType="false" isExplicitlyDefined="false" clrType="System.Security.Cryptography.X509Certificates.StoreName, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+          <serializedValue>My</serializedValue>
+        </property>
+        <property path="/identity/certificateReference/storeLocation" isComplexType="false" isExplicitlyDefined="false" clrType="System.Security.Cryptography.X509Certificates.StoreLocation, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+          <serializedValue>LocalMachine</serializedValue>
+        </property>
+        <property path="/identity/certificateReference/x509FindType" isComplexType="false" isExplicitlyDefined="false" clrType="System.Security.Cryptography.X509Certificates.X509FindType, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+          <serializedValue>FindBySubjectDistinguishedName</serializedValue>
+        </property>
+        <property path="/identity/certificateReference/findValue" isComplexType="false" isExplicitlyDefined="false" clrType="System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+          <serializedValue />
+        </property>
+        <property path="/identity/certificateReference/isChainIncluded" isComplexType="false" isExplicitlyDefined="false" clrType="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+          <serializedValue>False</serializedValue>
+        </property>
+        <property path="/name" isComplexType="false" isExplicitlyDefined="true" clrType="System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+          <serializedValue>Service1Soap1</serializedValue>
+        </property>
+        <property path="/kind" isComplexType="false" isExplicitlyDefined="false" clrType="System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+          <serializedValue />
+        </property>
+        <property path="/endpointConfiguration" isComplexType="false" isExplicitlyDefined="false" clrType="System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+          <serializedValue />
+        </property>
+      </properties>
+    </endpoint>
+    <endpoint name="Service1Soap12" contract="Vivo_BoxReelRelation.Service1Soap" bindingType="customBinding" address="http://middle.mes.vivo.xyz:7007/ReelAPI.asmx" bindingConfiguration="Service1Soap12">
+      <properties>
+        <property path="/address" isComplexType="false" isExplicitlyDefined="true" clrType="System.Uri, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+          <serializedValue>http://middle.mes.vivo.xyz:7007/ReelAPI.asmx</serializedValue>
+        </property>
+        <property path="/behaviorConfiguration" isComplexType="false" isExplicitlyDefined="false" clrType="System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+          <serializedValue />
+        </property>
+        <property path="/binding" isComplexType="false" isExplicitlyDefined="true" clrType="System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+          <serializedValue>customBinding</serializedValue>
+        </property>
+        <property path="/bindingConfiguration" isComplexType="false" isExplicitlyDefined="true" clrType="System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+          <serializedValue>Service1Soap12</serializedValue>
+        </property>
+        <property path="/contract" isComplexType="false" isExplicitlyDefined="true" clrType="System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+          <serializedValue>Vivo_BoxReelRelation.Service1Soap</serializedValue>
+        </property>
+        <property path="/headers" isComplexType="true" isExplicitlyDefined="false" clrType="System.ServiceModel.Configuration.AddressHeaderCollectionElement, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+          <serializedValue>System.ServiceModel.Configuration.AddressHeaderCollectionElement</serializedValue>
+        </property>
+        <property path="/headers/headers" isComplexType="false" isExplicitlyDefined="true" clrType="System.ServiceModel.Channels.AddressHeaderCollection, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+          <serializedValue>&lt;Header /&gt;</serializedValue>
+        </property>
+        <property path="/identity" isComplexType="true" isExplicitlyDefined="false" clrType="System.ServiceModel.Configuration.IdentityElement, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+          <serializedValue>System.ServiceModel.Configuration.IdentityElement</serializedValue>
+        </property>
+        <property path="/identity/userPrincipalName" isComplexType="true" isExplicitlyDefined="false" clrType="System.ServiceModel.Configuration.UserPrincipalNameElement, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+          <serializedValue>System.ServiceModel.Configuration.UserPrincipalNameElement</serializedValue>
+        </property>
+        <property path="/identity/userPrincipalName/value" isComplexType="false" isExplicitlyDefined="false" clrType="System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+          <serializedValue />
+        </property>
+        <property path="/identity/servicePrincipalName" isComplexType="true" isExplicitlyDefined="false" clrType="System.ServiceModel.Configuration.ServicePrincipalNameElement, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+          <serializedValue>System.ServiceModel.Configuration.ServicePrincipalNameElement</serializedValue>
+        </property>
+        <property path="/identity/servicePrincipalName/value" isComplexType="false" isExplicitlyDefined="false" clrType="System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+          <serializedValue />
+        </property>
+        <property path="/identity/dns" isComplexType="true" isExplicitlyDefined="false" clrType="System.ServiceModel.Configuration.DnsElement, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+          <serializedValue>System.ServiceModel.Configuration.DnsElement</serializedValue>
+        </property>
+        <property path="/identity/dns/value" isComplexType="false" isExplicitlyDefined="false" clrType="System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+          <serializedValue />
+        </property>
+        <property path="/identity/rsa" isComplexType="true" isExplicitlyDefined="false" clrType="System.ServiceModel.Configuration.RsaElement, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+          <serializedValue>System.ServiceModel.Configuration.RsaElement</serializedValue>
+        </property>
+        <property path="/identity/rsa/value" isComplexType="false" isExplicitlyDefined="false" clrType="System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+          <serializedValue />
+        </property>
+        <property path="/identity/certificate" isComplexType="true" isExplicitlyDefined="false" clrType="System.ServiceModel.Configuration.CertificateElement, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+          <serializedValue>System.ServiceModel.Configuration.CertificateElement</serializedValue>
+        </property>
+        <property path="/identity/certificate/encodedValue" isComplexType="false" isExplicitlyDefined="false" clrType="System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+          <serializedValue />
+        </property>
+        <property path="/identity/certificateReference" isComplexType="true" isExplicitlyDefined="false" clrType="System.ServiceModel.Configuration.CertificateReferenceElement, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+          <serializedValue>System.ServiceModel.Configuration.CertificateReferenceElement</serializedValue>
+        </property>
+        <property path="/identity/certificateReference/storeName" isComplexType="false" isExplicitlyDefined="false" clrType="System.Security.Cryptography.X509Certificates.StoreName, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+          <serializedValue>My</serializedValue>
+        </property>
+        <property path="/identity/certificateReference/storeLocation" isComplexType="false" isExplicitlyDefined="false" clrType="System.Security.Cryptography.X509Certificates.StoreLocation, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+          <serializedValue>LocalMachine</serializedValue>
+        </property>
+        <property path="/identity/certificateReference/x509FindType" isComplexType="false" isExplicitlyDefined="false" clrType="System.Security.Cryptography.X509Certificates.X509FindType, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+          <serializedValue>FindBySubjectDistinguishedName</serializedValue>
+        </property>
+        <property path="/identity/certificateReference/findValue" isComplexType="false" isExplicitlyDefined="false" clrType="System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+          <serializedValue />
+        </property>
+        <property path="/identity/certificateReference/isChainIncluded" isComplexType="false" isExplicitlyDefined="false" clrType="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+          <serializedValue>False</serializedValue>
+        </property>
+        <property path="/name" isComplexType="false" isExplicitlyDefined="true" clrType="System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+          <serializedValue>Service1Soap12</serializedValue>
+        </property>
+        <property path="/kind" isComplexType="false" isExplicitlyDefined="false" clrType="System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+          <serializedValue />
+        </property>
+        <property path="/endpointConfiguration" isComplexType="false" isExplicitlyDefined="false" clrType="System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+          <serializedValue />
+        </property>
+      </properties>
+    </endpoint>
+  </endpoints>
+</SavedWcfConfigurationInformation>

+ 6 - 0
UAS-出货标签管理(泽天)/Service References/Vivo_GetPlateID/ReelAPI.disco

@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8"?>
+<discovery xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.xmlsoap.org/disco/">
+  <contractRef ref="http://middle.mes.vivo.xyz:7007/ReelAPI.asmx?wsdl" docRef="http://middle.mes.vivo.xyz:7007/ReelAPI.asmx" xmlns="http://schemas.xmlsoap.org/disco/scl/" />
+  <soap address="http://middle.mes.vivo.xyz:7007/ReelAPI.asmx" xmlns:q1="http://tempuri.org/" binding="q1:Service1Soap" xmlns="http://schemas.xmlsoap.org/disco/soap/" />
+  <soap address="http://middle.mes.vivo.xyz:7007/ReelAPI.asmx" xmlns:q2="http://tempuri.org/" binding="q2:Service1Soap12" xmlns="http://schemas.xmlsoap.org/disco/soap/" />
+</discovery>

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