Browse Source

添加附加打印内容

章政 6 years ago
parent
commit
b8d2210498

+ 3 - 2
UAS-出货标签管理/DbFind.cs

@@ -3,6 +3,7 @@ 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
@@ -11,7 +12,7 @@ namespace UAS_LabelMachine
     {
         bool IsAbleDbFind;
         string BindTable;
-        DataHelper dh = new DataHelper();
+        DataHelper dh = SystemInf.dh;
         DataTable dt = new DataTable();
         AutoSizeFormClass asc = new AutoSizeFormClass();
 
@@ -76,7 +77,7 @@ namespace UAS_LabelMachine
             BindTable = tablename;
             SelectField = selectfield.Replace("#", "as");
             //返回一个带有结构的空的DataTable
-            dt = (DataTable)dh.ExecuteSql("select " + SelectField + " from " + tablename +" where rownum<20", "select");
+            dt = (DataTable)dh.ExecuteSql("select " + SelectField + " from " + tablename + " where rownum<20", "select");
             //设置DataTable的描述和列名,为了字段赋值
             selectfield = selectfield.Replace(",", "#");
             string[] NameAndCapation = selectfield.Split('#');

+ 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;
+    }
+}

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

@@ -30,6 +30,7 @@ namespace UAS_LabelMachine
         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();

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

@@ -21,7 +21,7 @@ namespace UAS_LabelMachine
 
         private void PowerSetting_Load(object sender, EventArgs e)
         {
-            dh = new DataHelper();
+            dh = SystemInf.dh;
             LoadData();
             ChooseAll.ChooseAll(PowerSetDGV);
         }

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

@@ -211,6 +211,7 @@
     <Compile Include="DbFind.Designer.cs">
       <DependentUpon>DbFind.cs</DependentUpon>
     </Compile>
+    <Compile Include="Entity\SystemInf.cs" />
     <Compile Include="Entity\User.cs" />
     <Compile Include="Login.cs">
       <SubType>Form</SubType>
@@ -281,6 +282,12 @@
     <Compile Include="采集策略.Designer.cs">
       <DependentUpon>采集策略.cs</DependentUpon>
     </Compile>
+    <Compile Include="附件内容打印.cs">
+      <SubType>Form</SubType>
+    </Compile>
+    <Compile Include="附件内容打印.Designer.cs">
+      <DependentUpon>附件内容打印.cs</DependentUpon>
+    </Compile>
     <EmbeddedResource Include="CustomControl\BlurSearch.resx">
       <DependentUpon>BlurSearch.cs</DependentUpon>
     </EmbeddedResource>
@@ -342,6 +349,9 @@
     <EmbeddedResource Include="采集策略.resx">
       <DependentUpon>采集策略.cs</DependentUpon>
     </EmbeddedResource>
+    <EmbeddedResource Include="附件内容打印.resx">
+      <DependentUpon>附件内容打印.cs</DependentUpon>
+    </EmbeddedResource>
     <None Include="Properties\app.manifest" />
     <None Include="Properties\Settings.settings">
       <Generator>SettingsSingleFileGenerator</Generator>

+ 217 - 192
UAS-出货标签管理/UAS_出货标签管理.Designer.cs

@@ -122,6 +122,28 @@
             this.sg_code = new UAS_LabelMachine.CustomControl.SearchTextBox();
             this.MessageLog = new UAS_LabelMachine.CustomControl.RichText.RichTextAutoBottom();
             this.LabelInf = new UAS_LabelMachine.CustomControl.DataGridViewWithSerialNum();
+            this.Choose = new System.Windows.Forms.DataGridViewCheckBoxColumn();
+            this.pib_ifpick = new System.Windows.Forms.DataGridViewCheckBoxColumn();
+            this.pib_ifprint = new System.Windows.Forms.DataGridViewCheckBoxColumn();
+            this.pib_id1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.pib_pdno = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.pib_prodcode = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.pr_vendprodcode = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.pib_brand = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.pib_madein = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.pib_lotno = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.pib_datecode = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.pib_cusbarcode = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.pib_cusoutboxcode = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.pib_datecode1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.pib_qty = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.pib_barcode = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.pib_custbarcode = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.pd_pocode = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.pd_custprodcode = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.pd_custprodspec = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.pib_outboxcode1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.pib_outboxcode2 = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.pi_inoutno = new UAS_LabelMachine.CustomControl.EnterTextBox();
             this.SingleLabel = new UAS_LabelMachine.CustomControl.GroupBoxWithBorder.GroupBoxWithBorder();
             this.ViVoPlate = new System.Windows.Forms.Button();
@@ -155,28 +177,7 @@
             this.OutBoxLabelPrint = new System.Windows.Forms.Button();
             this.OutBoxLabelAutoPrint = new System.Windows.Forms.CheckBox();
             this.OutBoxCombox = new System.Windows.Forms.ComboBox();
-            this.Choose = new System.Windows.Forms.DataGridViewCheckBoxColumn();
-            this.pib_ifpick = new System.Windows.Forms.DataGridViewCheckBoxColumn();
-            this.pib_ifprint = new System.Windows.Forms.DataGridViewCheckBoxColumn();
-            this.pib_id1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.pib_pdno = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.pib_prodcode = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.pr_vendprodcode = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.pib_brand = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.pib_madein = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.pib_lotno = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.pib_datecode = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.pib_cusbarcode = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.pib_cusoutboxcode = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.pib_datecode1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.pib_qty = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.pib_barcode = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.pib_custbarcode = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.pd_pocode = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.pd_custprodcode = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.pd_custprodspec = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.pib_outboxcode1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.pib_outboxcode2 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.AttachInfo = new System.Windows.Forms.Button();
             ((System.ComponentModel.ISupportInitialize)(this.Si_ItemDGV)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.MidSource)).BeginInit();
             this.groupBoxWithBorder1.SuspendLayout();
@@ -878,17 +879,22 @@
             // 
             // pr_code
             // 
+            this.pr_code.AllPower = null;
             this.pr_code.Caller = null;
             this.pr_code.Condition = null;
+            this.pr_code.DBTitle = null;
             this.pr_code.FormName = null;
             this.pr_code.Location = new System.Drawing.Point(76, 182);
             this.pr_code.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.pr_code.Name = "pr_code";
+            this.pr_code.Power = null;
+            this.pr_code.ReturnData = null;
             this.pr_code.SelectField = null;
             this.pr_code.SetValueField = null;
             this.pr_code.Size = new System.Drawing.Size(149, 22);
             this.pr_code.TabIndex = 68;
             this.pr_code.TableName = null;
+            this.pr_code.TextBoxEnable = false;
             this.pr_code.UserControlTextChanged += new UAS_LabelMachine.CustomControl.SearchTextBox.OnTextChange(this.pr_code_UserControlTextChanged);
             this.pr_code.SearchIconClick += new UAS_LabelMachine.CustomControl.SearchTextBox.Icon_Click(this.pr_code_SearchIconClick);
             // 
@@ -1065,17 +1071,22 @@
             // 
             // sg_code
             // 
+            this.sg_code.AllPower = null;
             this.sg_code.Caller = null;
             this.sg_code.Condition = null;
+            this.sg_code.DBTitle = null;
             this.sg_code.FormName = null;
             this.sg_code.Location = new System.Drawing.Point(76, 66);
             this.sg_code.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.sg_code.Name = "sg_code";
+            this.sg_code.Power = null;
+            this.sg_code.ReturnData = null;
             this.sg_code.SelectField = null;
             this.sg_code.SetValueField = null;
             this.sg_code.Size = new System.Drawing.Size(149, 24);
             this.sg_code.TabIndex = 32;
             this.sg_code.TableName = null;
+            this.sg_code.TextBoxEnable = false;
             this.sg_code.UserControlTextChanged += new UAS_LabelMachine.CustomControl.SearchTextBox.OnTextChange(this.sg_code_UserControlTextChanged);
             // 
             // MessageLog
@@ -1128,6 +1139,178 @@
             this.LabelInf.CellValueChanged += new System.Windows.Forms.DataGridViewCellEventHandler(this.LabelInf_CellValueChanged);
             this.LabelInf.DataError += new System.Windows.Forms.DataGridViewDataErrorEventHandler(this.LabelInf_DataError);
             // 
+            // Choose
+            // 
+            this.Choose.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
+            this.Choose.HeaderText = "勾选";
+            this.Choose.Name = "Choose";
+            this.Choose.Resizable = System.Windows.Forms.DataGridViewTriState.True;
+            this.Choose.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
+            this.Choose.Width = 55;
+            // 
+            // pib_ifpick
+            // 
+            this.pib_ifpick.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
+            this.pib_ifpick.DataPropertyName = "pib_ifpick";
+            this.pib_ifpick.HeaderText = "已采集";
+            this.pib_ifpick.Name = "pib_ifpick";
+            this.pib_ifpick.Width = 60;
+            // 
+            // pib_ifprint
+            // 
+            this.pib_ifprint.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
+            this.pib_ifprint.DataPropertyName = "pib_ifprint";
+            this.pib_ifprint.HeaderText = "已打印";
+            this.pib_ifprint.Name = "pib_ifprint";
+            this.pib_ifprint.Width = 60;
+            // 
+            // pib_id1
+            // 
+            this.pib_id1.DataPropertyName = "pib_id";
+            this.pib_id1.HeaderText = "pib_id";
+            this.pib_id1.Name = "pib_id1";
+            this.pib_id1.Visible = false;
+            this.pib_id1.Width = 66;
+            // 
+            // pib_pdno
+            // 
+            this.pib_pdno.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
+            this.pib_pdno.DataPropertyName = "pib_pdno";
+            this.pib_pdno.HeaderText = "明细序号";
+            this.pib_pdno.Name = "pib_pdno";
+            this.pib_pdno.ReadOnly = true;
+            this.pib_pdno.Width = 96;
+            // 
+            // pib_prodcode
+            // 
+            this.pib_prodcode.DataPropertyName = "pib_prodcode";
+            this.pib_prodcode.HeaderText = "物料编号";
+            this.pib_prodcode.Name = "pib_prodcode";
+            this.pib_prodcode.ReadOnly = true;
+            this.pib_prodcode.Width = 78;
+            // 
+            // pr_vendprodcode
+            // 
+            this.pr_vendprodcode.DataPropertyName = "pr_vendprodcode";
+            this.pr_vendprodcode.HeaderText = "MPN";
+            this.pr_vendprodcode.Name = "pr_vendprodcode";
+            this.pr_vendprodcode.ReadOnly = true;
+            this.pr_vendprodcode.Width = 48;
+            // 
+            // pib_brand
+            // 
+            this.pib_brand.DataPropertyName = "pib_brand";
+            this.pib_brand.HeaderText = "品牌";
+            this.pib_brand.Name = "pib_brand";
+            this.pib_brand.ReadOnly = true;
+            this.pib_brand.Width = 54;
+            // 
+            // pib_madein
+            // 
+            this.pib_madein.DataPropertyName = "pib_madein";
+            this.pib_madein.HeaderText = "产地";
+            this.pib_madein.Name = "pib_madein";
+            this.pib_madein.Width = 54;
+            // 
+            // pib_lotno
+            // 
+            this.pib_lotno.DataPropertyName = "pib_lotno";
+            this.pib_lotno.HeaderText = "LotNo";
+            this.pib_lotno.Name = "pib_lotno";
+            this.pib_lotno.Width = 60;
+            // 
+            // pib_datecode
+            // 
+            this.pib_datecode.DataPropertyName = "pib_datecode";
+            this.pib_datecode.HeaderText = "DateCode";
+            this.pib_datecode.Name = "pib_datecode";
+            this.pib_datecode.Width = 78;
+            // 
+            // pib_cusbarcode
+            // 
+            this.pib_cusbarcode.DataPropertyName = "pib_cusbarcode";
+            this.pib_cusbarcode.HeaderText = "ViVo条码号";
+            this.pib_cusbarcode.Name = "pib_cusbarcode";
+            this.pib_cusbarcode.Width = 90;
+            // 
+            // pib_cusoutboxcode
+            // 
+            this.pib_cusoutboxcode.DataPropertyName = "pib_cusoutboxcode";
+            this.pib_cusoutboxcode.HeaderText = "ViVo外箱";
+            this.pib_cusoutboxcode.Name = "pib_cusoutboxcode";
+            this.pib_cusoutboxcode.Width = 78;
+            // 
+            // pib_datecode1
+            // 
+            this.pib_datecode1.DataPropertyName = "pib_datecode1";
+            this.pib_datecode1.HeaderText = "DateCode1";
+            this.pib_datecode1.Name = "pib_datecode1";
+            this.pib_datecode1.Visible = false;
+            this.pib_datecode1.Width = 84;
+            // 
+            // pib_qty
+            // 
+            this.pib_qty.DataPropertyName = "pib_qty";
+            this.pib_qty.HeaderText = "数量";
+            this.pib_qty.Name = "pib_qty";
+            this.pib_qty.ReadOnly = true;
+            this.pib_qty.Width = 54;
+            // 
+            // pib_barcode
+            // 
+            this.pib_barcode.DataPropertyName = "pib_barcode";
+            this.pib_barcode.HeaderText = "唯一条码";
+            this.pib_barcode.Name = "pib_barcode";
+            this.pib_barcode.ReadOnly = true;
+            this.pib_barcode.Width = 78;
+            // 
+            // pib_custbarcode
+            // 
+            this.pib_custbarcode.DataPropertyName = "pib_custbarcode";
+            this.pib_custbarcode.HeaderText = "客户条码";
+            this.pib_custbarcode.Name = "pib_custbarcode";
+            this.pib_custbarcode.Width = 78;
+            // 
+            // pd_pocode
+            // 
+            this.pd_pocode.DataPropertyName = "pd_pocode";
+            this.pd_pocode.HeaderText = "客户PO";
+            this.pd_pocode.Name = "pd_pocode";
+            this.pd_pocode.ReadOnly = true;
+            this.pd_pocode.Width = 66;
+            // 
+            // pd_custprodcode
+            // 
+            this.pd_custprodcode.DataPropertyName = "pd_custprodcode";
+            this.pd_custprodcode.HeaderText = "客户料号";
+            this.pd_custprodcode.Name = "pd_custprodcode";
+            this.pd_custprodcode.ReadOnly = true;
+            this.pd_custprodcode.Width = 78;
+            // 
+            // pd_custprodspec
+            // 
+            this.pd_custprodspec.DataPropertyName = "pd_custprodspec";
+            this.pd_custprodspec.HeaderText = "客户型号";
+            this.pd_custprodspec.Name = "pd_custprodspec";
+            this.pd_custprodspec.ReadOnly = true;
+            this.pd_custprodspec.Width = 78;
+            // 
+            // pib_outboxcode1
+            // 
+            this.pib_outboxcode1.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
+            this.pib_outboxcode1.DataPropertyName = "pib_outboxcode1";
+            this.pib_outboxcode1.HeaderText = "中盒号";
+            this.pib_outboxcode1.Name = "pib_outboxcode1";
+            this.pib_outboxcode1.Width = 90;
+            // 
+            // pib_outboxcode2
+            // 
+            this.pib_outboxcode2.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
+            this.pib_outboxcode2.DataPropertyName = "pib_outboxcode2";
+            this.pib_outboxcode2.HeaderText = "外箱号";
+            this.pib_outboxcode2.Name = "pib_outboxcode2";
+            this.pib_outboxcode2.Width = 90;
+            // 
             // pi_inoutno
             // 
             this.pi_inoutno.ID = null;
@@ -1535,177 +1718,17 @@
             this.OutBoxCombox.TabIndex = 78;
             this.OutBoxCombox.SelectedIndexChanged += new System.EventHandler(this.OutBoxCombox_SelectedIndexChanged);
             // 
-            // Choose
-            // 
-            this.Choose.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
-            this.Choose.HeaderText = "勾选";
-            this.Choose.Name = "Choose";
-            this.Choose.Resizable = System.Windows.Forms.DataGridViewTriState.True;
-            this.Choose.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
-            this.Choose.Width = 55;
-            // 
-            // pib_ifpick
-            // 
-            this.pib_ifpick.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
-            this.pib_ifpick.DataPropertyName = "pib_ifpick";
-            this.pib_ifpick.HeaderText = "已采集";
-            this.pib_ifpick.Name = "pib_ifpick";
-            this.pib_ifpick.Width = 60;
-            // 
-            // pib_ifprint
-            // 
-            this.pib_ifprint.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
-            this.pib_ifprint.DataPropertyName = "pib_ifprint";
-            this.pib_ifprint.HeaderText = "已打印";
-            this.pib_ifprint.Name = "pib_ifprint";
-            this.pib_ifprint.Width = 60;
-            // 
-            // pib_id1
-            // 
-            this.pib_id1.DataPropertyName = "pib_id";
-            this.pib_id1.HeaderText = "pib_id";
-            this.pib_id1.Name = "pib_id1";
-            this.pib_id1.Visible = false;
-            this.pib_id1.Width = 66;
-            // 
-            // pib_pdno
-            // 
-            this.pib_pdno.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
-            this.pib_pdno.DataPropertyName = "pib_pdno";
-            this.pib_pdno.HeaderText = "明细序号";
-            this.pib_pdno.Name = "pib_pdno";
-            this.pib_pdno.ReadOnly = true;
-            this.pib_pdno.Width = 96;
-            // 
-            // pib_prodcode
-            // 
-            this.pib_prodcode.DataPropertyName = "pib_prodcode";
-            this.pib_prodcode.HeaderText = "物料编号";
-            this.pib_prodcode.Name = "pib_prodcode";
-            this.pib_prodcode.ReadOnly = true;
-            this.pib_prodcode.Width = 78;
-            // 
-            // pr_vendprodcode
-            // 
-            this.pr_vendprodcode.DataPropertyName = "pr_vendprodcode";
-            this.pr_vendprodcode.HeaderText = "MPN";
-            this.pr_vendprodcode.Name = "pr_vendprodcode";
-            this.pr_vendprodcode.ReadOnly = true;
-            this.pr_vendprodcode.Width = 48;
-            // 
-            // pib_brand
-            // 
-            this.pib_brand.DataPropertyName = "pib_brand";
-            this.pib_brand.HeaderText = "品牌";
-            this.pib_brand.Name = "pib_brand";
-            this.pib_brand.ReadOnly = true;
-            this.pib_brand.Width = 54;
-            // 
-            // pib_madein
-            // 
-            this.pib_madein.DataPropertyName = "pib_madein";
-            this.pib_madein.HeaderText = "产地";
-            this.pib_madein.Name = "pib_madein";
-            this.pib_madein.Width = 54;
-            // 
-            // pib_lotno
+            // AttachInfo
             // 
-            this.pib_lotno.DataPropertyName = "pib_lotno";
-            this.pib_lotno.HeaderText = "LotNo";
-            this.pib_lotno.Name = "pib_lotno";
-            this.pib_lotno.Width = 60;
-            // 
-            // pib_datecode
-            // 
-            this.pib_datecode.DataPropertyName = "pib_datecode";
-            this.pib_datecode.HeaderText = "DateCode";
-            this.pib_datecode.Name = "pib_datecode";
-            this.pib_datecode.Width = 78;
-            // 
-            // pib_cusbarcode
-            // 
-            this.pib_cusbarcode.DataPropertyName = "pib_cusbarcode";
-            this.pib_cusbarcode.HeaderText = "ViVo条码号";
-            this.pib_cusbarcode.Name = "pib_cusbarcode";
-            this.pib_cusbarcode.Width = 90;
-            // 
-            // pib_cusoutboxcode
-            // 
-            this.pib_cusoutboxcode.DataPropertyName = "pib_cusoutboxcode";
-            this.pib_cusoutboxcode.HeaderText = "ViVo外箱";
-            this.pib_cusoutboxcode.Name = "pib_cusoutboxcode";
-            this.pib_cusoutboxcode.Width = 78;
-            // 
-            // pib_datecode1
-            // 
-            this.pib_datecode1.DataPropertyName = "pib_datecode1";
-            this.pib_datecode1.HeaderText = "DateCode1";
-            this.pib_datecode1.Name = "pib_datecode1";
-            this.pib_datecode1.Visible = false;
-            this.pib_datecode1.Width = 84;
-            // 
-            // pib_qty
-            // 
-            this.pib_qty.DataPropertyName = "pib_qty";
-            this.pib_qty.HeaderText = "数量";
-            this.pib_qty.Name = "pib_qty";
-            this.pib_qty.ReadOnly = true;
-            this.pib_qty.Width = 54;
-            // 
-            // pib_barcode
-            // 
-            this.pib_barcode.DataPropertyName = "pib_barcode";
-            this.pib_barcode.HeaderText = "唯一条码";
-            this.pib_barcode.Name = "pib_barcode";
-            this.pib_barcode.ReadOnly = true;
-            this.pib_barcode.Width = 78;
-            // 
-            // pib_custbarcode
-            // 
-            this.pib_custbarcode.DataPropertyName = "pib_custbarcode";
-            this.pib_custbarcode.HeaderText = "客户条码";
-            this.pib_custbarcode.Name = "pib_custbarcode";
-            this.pib_custbarcode.Width = 78;
-            // 
-            // pd_pocode
-            // 
-            this.pd_pocode.DataPropertyName = "pd_pocode";
-            this.pd_pocode.HeaderText = "客户PO";
-            this.pd_pocode.Name = "pd_pocode";
-            this.pd_pocode.ReadOnly = true;
-            this.pd_pocode.Width = 66;
-            // 
-            // pd_custprodcode
-            // 
-            this.pd_custprodcode.DataPropertyName = "pd_custprodcode";
-            this.pd_custprodcode.HeaderText = "客户料号";
-            this.pd_custprodcode.Name = "pd_custprodcode";
-            this.pd_custprodcode.ReadOnly = true;
-            this.pd_custprodcode.Width = 78;
-            // 
-            // pd_custprodspec
-            // 
-            this.pd_custprodspec.DataPropertyName = "pd_custprodspec";
-            this.pd_custprodspec.HeaderText = "客户型号";
-            this.pd_custprodspec.Name = "pd_custprodspec";
-            this.pd_custprodspec.ReadOnly = true;
-            this.pd_custprodspec.Width = 78;
-            // 
-            // pib_outboxcode1
-            // 
-            this.pib_outboxcode1.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
-            this.pib_outboxcode1.DataPropertyName = "pib_outboxcode1";
-            this.pib_outboxcode1.HeaderText = "中盒号";
-            this.pib_outboxcode1.Name = "pib_outboxcode1";
-            this.pib_outboxcode1.Width = 90;
-            // 
-            // pib_outboxcode2
-            // 
-            this.pib_outboxcode2.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
-            this.pib_outboxcode2.DataPropertyName = "pib_outboxcode2";
-            this.pib_outboxcode2.HeaderText = "外箱号";
-            this.pib_outboxcode2.Name = "pib_outboxcode2";
-            this.pib_outboxcode2.Width = 90;
+            this.AttachInfo.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.AttachInfo.Location = new System.Drawing.Point(230, 141);
+            this.AttachInfo.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+            this.AttachInfo.Name = "AttachInfo";
+            this.AttachInfo.Size = new System.Drawing.Size(88, 26);
+            this.AttachInfo.TabIndex = 85;
+            this.AttachInfo.Text = "附加信息设置";
+            this.AttachInfo.UseVisualStyleBackColor = true;
+            this.AttachInfo.Click += new System.EventHandler(this.AttachInfo_Click);
             // 
             // UAS_出货标签打印
             // 
@@ -1713,6 +1736,7 @@
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(229)))), ((int)(((byte)(233)))), ((int)(((byte)(206)))));
             this.ClientSize = new System.Drawing.Size(1257, 686);
+            this.Controls.Add(this.AttachInfo);
             this.Controls.Add(this.groupBoxWithBorder1);
             this.Controls.Add(this.ChooseAll);
             this.Controls.Add(this.GetGridOnly);
@@ -1929,5 +1953,6 @@
         private System.Windows.Forms.DataGridViewTextBoxColumn pd_custprodspec;
         private System.Windows.Forms.DataGridViewTextBoxColumn pib_outboxcode1;
         private System.Windows.Forms.DataGridViewTextBoxColumn pib_outboxcode2;
+        private System.Windows.Forms.Button AttachInfo;
     }
 }

+ 28 - 66
UAS-出货标签管理/UAS_出货标签管理.cs

@@ -653,7 +653,9 @@ namespace UAS_LabelMachine
         {
             //获取维护的变量名称和SQL
             dt = (DataTable)dh.ExecuteSql("select lp_name,lp_sql from label left join LABELPARAMETER on la_id= lp_laid where la_id=" + la_id, "select");
+            DataTable Attach = (DataTable)dh.ExecuteSql("select lap_param lp_name,lap_value lp_sql  from LabelAttachPARAMETER where lap_custcode='" + pi_cardcode.Text + "'", "select");
             //用标签本身的变量作为最外层的循环条件去匹配;
+            dt.Merge(Attach);
             for (int j = 0; j < SingleDoc.Variables.FreeVariables.Count; j++)
             {
                 //将维护的模板参数和模板本身的参数名称进行比对
@@ -1235,6 +1237,9 @@ namespace UAS_LabelMachine
                 int CheckedRowCount = 0;
                 string[] arg = SingleBoxArgument.ToArray();
                 //打印所有的选中行
+                DataTable Attach = (DataTable)dh.ExecuteSql("select lap_param lp_name,lap_value lp_sql  from LabelAttachPARAMETER where lap_custcode='" + pi_cardcode.Text + "'", "select");
+                //用标签本身的变量作为最外层的循环条件去匹配;
+                dt.Merge(Attach);
                 for (int i = 0; i < LabelInf.RowCount; i++)
                 {
                     //勾选了并且未打印
@@ -1277,6 +1282,10 @@ namespace UAS_LabelMachine
                                     if (LabelInf.Rows[i].Cells["pib_cusbarcode"].Value != null)
                                         SingleDoc.Variables.FreeVariables.Item(j + 1).Value = LabelInf.Rows[i].Cells["pib_cusbarcode"].Value.ToString();
                                 }
+                                if (SingleDoc.Variables.FreeVariables.Item(j + 1).Value == "")
+                                {
+                                    SingleDoc.Variables.FreeVariables.Item(j + 1).Value = dt.Select("lp_name='" + SingleDoc.Variables.FreeVariables.Item(j + 1).Name + "'")[0]["lp_sql"].ToString();
+                                }
                                 ParamLog.AppendLine("pib_id:" + LabelInf.Rows[i].Cells["pib_id1"].Value.ToString() + ",SingleDoc打印参数【" + SingleDoc.Variables.FreeVariables.Item(j + 1).Name + "】赋值," + "取到值" + SingleDoc.Variables.FreeVariables.Item(j + 1).Value);
                             }
                             LogManager.DoLog(ParamLog.ToString());
@@ -1686,6 +1695,9 @@ namespace UAS_LabelMachine
                 GetMidBoxData();
             }
             DataTable dt = (DataTable)dh.ExecuteSql("select lp_name,lp_sql from label left join LABELPARAMETER on la_id= lp_laid where la_id=" + la_id, "select");
+            DataTable Attach = (DataTable)dh.ExecuteSql("select lap_param lp_name,lap_value lp_sql from LabelAttachPARAMETER where lap_custcode='" + pi_cardcode.Text + "'", "select");
+            //用标签本身的变量作为最外层的循环条件去匹配;
+            dt.Merge(Attach);
             string[] arg = MidBoxArgument.ToArray();
             for (int j = 0; j < MidDoc.Variables.FreeVariables.Count; j++)
             {
@@ -1752,6 +1764,9 @@ namespace UAS_LabelMachine
         private void MidBoxCodePrint(string la_id, int rowindex, int[] midindex)
         {
             DataTable dt = (DataTable)dh.ExecuteSql("select lp_name,lp_sql from label left join LABELPARAMETER on la_id= lp_laid where la_id=" + la_id, "select");
+            DataTable Attach = (DataTable)dh.ExecuteSql("select lap_param lp_name,lap_value lp_sql  from LabelAttachPARAMETER where lap_custcode='" + pi_cardcode.Text + "'", "select");
+            //用标签本身的变量作为最外层的循环条件去匹配;
+            dt.Merge(Attach);
             for (int j = 0; j < MidDoc.Variables.FreeVariables.Count; j++)
             {
                 //将维护的模板参数和模板本身的参数名称进行比对
@@ -1821,78 +1836,15 @@ namespace UAS_LabelMachine
             MidDoc.PrintDocument();
         }
 
-        private void MidBoxCodePrint(string la_id, int rowindex, string HandPrint)
-        {
-            DataTable dt = (DataTable)dh.ExecuteSql("select lp_name,lp_sql from label left join LABELPARAMETER on la_id= lp_laid where la_id=" + la_id, "select");
-            for (int j = 0; j < MidDoc.Variables.FreeVariables.Count; j++)
-            {
-                //将维护的模板参数和模板本身的参数名称进行比对
-                for (int k = 0; k < dt.Rows.Count; k++)
-                {
-                    //名称相等的时候,取SQL进行值的查询
-                    if (MidDoc.Variables.FreeVariables.Item(j + 1).Name == dt.Rows[k]["lp_name"].ToString())
-                    {
-                        //获取对应行的pib_id
-                        string pib_id = LabelInf.Rows[rowindex].Cells["pib_id1"].Value.ToString();
-                        string pib_outboxcode1 = LabelInf.Rows[rowindex].Cells["pib_outboxcode1"].Value.ToString();
-                        //获取打印执行的SQL
-                        string sql = dt.Rows[k]["lp_sql"].ToString();
-                        try
-                        {
-                            //获取打印执行的SQL
-                            if (sql.IndexOf("{") == 0)
-                            {
-                                MidDoc.Variables.FreeVariables.Item(j + 1).Value = dh.GetLabelParam(sql).ToString();
-                                LogManager.DoLog("打印参数【" + MidDoc.Variables.FreeVariables.Item(j + 1).Name + "】赋值," + "取值SQL:" + dt.Rows[k]["lp_sql"].ToString() + ",取到值" + MidDoc.Variables.FreeVariables.Item(j + 1).Value);
-                            }
-                            else
-                            {
-                                string ExeSQL = "";
-                                if (sql.ToLower().Contains("pib_lotno"))
-                                    MidDoc.Variables.FreeVariables.Item(j + 1).Value = LabelInf.Rows[rowindex].Cells["pib_lotno"].Value.ToString();
-                                else if (sql.ToLower().Contains("pib_datecode"))
-                                    MidDoc.Variables.FreeVariables.Item(j + 1).Value = LabelInf.Rows[rowindex].Cells["pib_datecode"].Value.ToString();
-                                else if (sql.ToLower().Contains("pib_madein"))
-                                    MidDoc.Variables.FreeVariables.Item(j + 1).Value = LabelInf.Rows[rowindex].Cells["pib_madein"].Value.ToString();
-                                else
-                                {
-                                    ExeSQL = sql.Substring(0, sql.IndexOf("{")) + pib_id + sql.Substring(sql.IndexOf("}") + 1);
-                                    ExeSQL = ExeSQL.Substring(0, ExeSQL.IndexOf("{")) + pib_outboxcode1;
-                                    if (ExeSQL.ToLower().Contains("pib_qty"))
-                                    {
-                                        ExeSQL += "group by pib_outboxcode1";
-                                    }
-                                    MidDoc.Variables.FreeVariables.Item(j + 1).Value = dh.GetLabelParam(ExeSQL).ToString();
-                                }
-                                LogManager.DoLog("打印参数【" + MidDoc.Variables.FreeVariables.Item(j + 1).Name + "】赋值," + "取值SQL:" + ExeSQL + ",取到值" + MidDoc.Variables.FreeVariables.Item(j + 1).Value);
-                            }
-                        }
-                        catch (Exception)
-                        {
-                            MessageBox.Show("SQL维护不正确,请检查SQL语句\n" + sql);
-                            return;
-                        }
-                    }
-                    else if (MidDoc.Variables.FreeVariables.Item(j + 1).Name == "DateCode1")
-                    {
-                        if (LabelInf.Rows[rowindex].Cells["pib_datecode1"].Value != null)
-                        {
-                            MidDoc.Variables.FreeVariables.Item(j + 1).Value = LabelInf.Rows[rowindex].Cells["pib_datecode1"].Value.ToString();
-                        }
-                    }
-                }
-            }
-            //保存参数打印
-            MidDoc.Printer.SwitchTo(MidLabelPrinter.Text);
-            MidDoc.PrintDocument();
-        }
-
         /// <summary>
         /// 执行打印外箱号
         /// </summary>
         private void OutBoxCodePrint(string la_id, int rowindex)
         {
             DataTable dt = (DataTable)dh.ExecuteSql("select lp_name,lp_sql,lp_valuetype from label left join LABELPARAMETER on la_id= lp_laid where la_id=" + la_id, "select");
+            DataTable Attach = (DataTable)dh.ExecuteSql("select lap_param lp_name,lap_value lp_sql  from LabelAttachPARAMETER where lap_custcode='" + pi_cardcode.Text + "'", "select");
+            //用标签本身的变量作为最外层的循环条件去匹配;
+            dt.Merge(Attach);
             try
             {
                 for (int j = 0; j < OutBoxDoc.Variables.FreeVariables.Count; j++)
@@ -2583,5 +2535,15 @@ namespace UAS_LabelMachine
                     System.Diagnostics.Process.Start(ExportFileDialog.SelectedPath + "\\" + pi_inoutno.Text + ".xls");
             }
         }
+
+        private void AttachInfo_Click(object sender, EventArgs e)
+        {
+            if (pi_cardcode.Text != "")
+            {
+                附件内容打印 att = new 附件内容打印(pi_cardcode.Text);
+                att.ShowDialog();
+            }
+            else MessageBox.Show("请先获取出库单信息");
+        }
     }
 }

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

@@ -8,6 +8,7 @@ using System.Windows.Forms;
 using UAS_LabelMachine.CustomControl;
 using UAS_LabelMachine.Properties;
 using UAS_LabelMachine.PublicMethod;
+using UAS_LabelMachine.Entity;
 
 namespace UAS_LabelMachine
 {
@@ -88,7 +89,7 @@ namespace UAS_LabelMachine
             {
                 FTPShare.Visible = false;
             }
-            dh = new DataHelper();
+            dh = SystemInf.dh;
             condition.Append("");
             ChooseAll.ChooseAll(LabelDataGridView);
             BaseUtil.SetComboxData(la_type, "display", "value", labeltype);

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

@@ -6,6 +6,7 @@ using System.Drawing;
 using System.Text;
 using System.Text.RegularExpressions;
 using System.Windows.Forms;
+using UAS_LabelMachine.Entity;
 using UAS_LabelMachine.PublicMethod;
 
 namespace UAS_LabelMachine
@@ -44,7 +45,7 @@ namespace UAS_LabelMachine
 
         private void 生成条码_Load(object sender, EventArgs e)
         {
-            dh = new DataHelper();
+            dh = SystemInf.dh;
             ChooseAll.ChooseAll(ProdIoInfDGV);
             //如果传进了出入库单号则默认执行一次取数据
             if (pi_inoutno.Text != "")

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

@@ -2,6 +2,7 @@
 using System.Data;
 using System.Text;
 using System.Windows.Forms;
+using UAS_LabelMachine.Entity;
 using UAS_LabelMachine.PublicMethod;
 
 namespace UAS_LabelMachine
@@ -41,7 +42,7 @@ namespace UAS_LabelMachine
         private void 采集策略_Load(object sender, EventArgs e)
         {
             asc.controllInitializeSize(this);
-            dh = new DataHelper();
+            dh = SystemInf.dh;
             pb_name.FormName = Name;
             pb_name.SetValueField = new string[] { "pb_name" };
             pb_name.TableName = "productbrand";

+ 413 - 0
UAS-出货标签管理/附件内容打印.Designer.cs

@@ -0,0 +1,413 @@
+namespace UAS_LabelMachine
+{
+    partial class 附件内容打印
+    {
+        /// <summary>
+        /// Required designer variable.
+        /// </summary>
+        private System.ComponentModel.IContainer components = null;
+
+        /// <summary>
+        /// Clean up any resources being used.
+        /// </summary>
+        /// <lap_param name="disposing">true if managed resources should be disposed; otherwise, false.</lap_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 lap_values of this method with the code editor.
+        /// </summary>
+        private void InitializeComponent()
+        {
+            this.lap_param1 = new UAS_LabelMachine.CustomControl.EnterTextBox();
+            this.lap_param1_label = new System.Windows.Forms.Label();
+            this.lap_value1 = new UAS_LabelMachine.CustomControl.EnterTextBox();
+            this.lap_value1_label = new System.Windows.Forms.Label();
+            this.lap_value3 = new UAS_LabelMachine.CustomControl.EnterTextBox();
+            this.lap_value3_label = new System.Windows.Forms.Label();
+            this.lap_param3 = new UAS_LabelMachine.CustomControl.EnterTextBox();
+            this.lap_param3_labe = new System.Windows.Forms.Label();
+            this.lap_value2 = new UAS_LabelMachine.CustomControl.EnterTextBox();
+            this.lap_value2_label = new System.Windows.Forms.Label();
+            this.lap_param2 = new UAS_LabelMachine.CustomControl.EnterTextBox();
+            this.lap_param2_label = new System.Windows.Forms.Label();
+            this.lap_value5 = new UAS_LabelMachine.CustomControl.EnterTextBox();
+            this.lap_value5_label = new System.Windows.Forms.Label();
+            this.lap_param5 = new UAS_LabelMachine.CustomControl.EnterTextBox();
+            this.lap_param5_label = new System.Windows.Forms.Label();
+            this.lap_value4 = new UAS_LabelMachine.CustomControl.EnterTextBox();
+            this.lap_value4_label = new System.Windows.Forms.Label();
+            this.lap_param4 = new UAS_LabelMachine.CustomControl.EnterTextBox();
+            this.lap_param4_label = new System.Windows.Forms.Label();
+            this.Confirm = new System.Windows.Forms.Button();
+            this.lap_id4 = new System.Windows.Forms.Label();
+            this.lap_id5 = new System.Windows.Forms.Label();
+            this.lap_id2 = new System.Windows.Forms.Label();
+            this.lap_id3 = new System.Windows.Forms.Label();
+            this.lap_id1 = new System.Windows.Forms.Label();
+            this.SuspendLayout();
+            // 
+            // lap_param1
+            // 
+            this.lap_param1.ID = null;
+            this.lap_param1.Location = new System.Drawing.Point(77, 49);
+            this.lap_param1.Name = "lap_param1";
+            this.lap_param1.Size = new System.Drawing.Size(89, 21);
+            this.lap_param1.Str = null;
+            this.lap_param1.Str1 = null;
+            this.lap_param1.Str2 = null;
+            this.lap_param1.TabIndex = 0;
+            // 
+            // lap_param1_label
+            // 
+            this.lap_param1_label.AutoSize = true;
+            this.lap_param1_label.BackColor = System.Drawing.Color.Transparent;
+            this.lap_param1_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.lap_param1_label.Location = new System.Drawing.Point(29, 49);
+            this.lap_param1_label.Name = "lap_param1_label";
+            this.lap_param1_label.Size = new System.Drawing.Size(42, 21);
+            this.lap_param1_label.TabIndex = 61;
+            this.lap_param1_label.Text = "参数";
+            // 
+            // lap_value1
+            // 
+            this.lap_value1.ID = null;
+            this.lap_value1.Location = new System.Drawing.Point(235, 49);
+            this.lap_value1.Name = "lap_value1";
+            this.lap_value1.Size = new System.Drawing.Size(89, 21);
+            this.lap_value1.Str = null;
+            this.lap_value1.Str1 = null;
+            this.lap_value1.Str2 = null;
+            this.lap_value1.TabIndex = 1;
+            // 
+            // lap_value1_label
+            // 
+            this.lap_value1_label.AutoSize = true;
+            this.lap_value1_label.BackColor = System.Drawing.Color.Transparent;
+            this.lap_value1_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.lap_value1_label.Location = new System.Drawing.Point(187, 49);
+            this.lap_value1_label.Name = "lap_value1_label";
+            this.lap_value1_label.Size = new System.Drawing.Size(42, 21);
+            this.lap_value1_label.TabIndex = 63;
+            this.lap_value1_label.Text = "内容";
+            // 
+            // lap_value3
+            // 
+            this.lap_value3.ID = null;
+            this.lap_value3.Location = new System.Drawing.Point(235, 153);
+            this.lap_value3.Name = "lap_value3";
+            this.lap_value3.Size = new System.Drawing.Size(89, 21);
+            this.lap_value3.Str = null;
+            this.lap_value3.Str1 = null;
+            this.lap_value3.Str2 = null;
+            this.lap_value3.TabIndex = 5;
+            // 
+            // lap_value3_label
+            // 
+            this.lap_value3_label.AutoSize = true;
+            this.lap_value3_label.BackColor = System.Drawing.Color.Transparent;
+            this.lap_value3_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.lap_value3_label.Location = new System.Drawing.Point(187, 153);
+            this.lap_value3_label.Name = "lap_value3_label";
+            this.lap_value3_label.Size = new System.Drawing.Size(42, 21);
+            this.lap_value3_label.TabIndex = 67;
+            this.lap_value3_label.Text = "内容";
+            // 
+            // lap_param3
+            // 
+            this.lap_param3.ID = null;
+            this.lap_param3.Location = new System.Drawing.Point(77, 153);
+            this.lap_param3.Name = "lap_param3";
+            this.lap_param3.Size = new System.Drawing.Size(89, 21);
+            this.lap_param3.Str = null;
+            this.lap_param3.Str1 = null;
+            this.lap_param3.Str2 = null;
+            this.lap_param3.TabIndex = 4;
+            // 
+            // lap_param3_labe
+            // 
+            this.lap_param3_labe.AutoSize = true;
+            this.lap_param3_labe.BackColor = System.Drawing.Color.Transparent;
+            this.lap_param3_labe.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.lap_param3_labe.Location = new System.Drawing.Point(29, 153);
+            this.lap_param3_labe.Name = "lap_param3_labe";
+            this.lap_param3_labe.Size = new System.Drawing.Size(42, 21);
+            this.lap_param3_labe.TabIndex = 65;
+            this.lap_param3_labe.Text = "参数";
+            // 
+            // lap_value2
+            // 
+            this.lap_value2.ID = null;
+            this.lap_value2.Location = new System.Drawing.Point(235, 102);
+            this.lap_value2.Name = "lap_value2";
+            this.lap_value2.Size = new System.Drawing.Size(89, 21);
+            this.lap_value2.Str = null;
+            this.lap_value2.Str1 = null;
+            this.lap_value2.Str2 = null;
+            this.lap_value2.TabIndex = 3;
+            // 
+            // lap_value2_label
+            // 
+            this.lap_value2_label.AutoSize = true;
+            this.lap_value2_label.BackColor = System.Drawing.Color.Transparent;
+            this.lap_value2_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.lap_value2_label.Location = new System.Drawing.Point(187, 102);
+            this.lap_value2_label.Name = "lap_value2_label";
+            this.lap_value2_label.Size = new System.Drawing.Size(42, 21);
+            this.lap_value2_label.TabIndex = 71;
+            this.lap_value2_label.Text = "内容";
+            // 
+            // lap_param2
+            // 
+            this.lap_param2.ID = null;
+            this.lap_param2.Location = new System.Drawing.Point(77, 102);
+            this.lap_param2.Name = "lap_param2";
+            this.lap_param2.Size = new System.Drawing.Size(89, 21);
+            this.lap_param2.Str = null;
+            this.lap_param2.Str1 = null;
+            this.lap_param2.Str2 = null;
+            this.lap_param2.TabIndex = 2;
+            // 
+            // lap_param2_label
+            // 
+            this.lap_param2_label.AutoSize = true;
+            this.lap_param2_label.BackColor = System.Drawing.Color.Transparent;
+            this.lap_param2_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.lap_param2_label.Location = new System.Drawing.Point(29, 102);
+            this.lap_param2_label.Name = "lap_param2_label";
+            this.lap_param2_label.Size = new System.Drawing.Size(42, 21);
+            this.lap_param2_label.TabIndex = 69;
+            this.lap_param2_label.Text = "参数";
+            // 
+            // lap_value5
+            // 
+            this.lap_value5.ID = null;
+            this.lap_value5.Location = new System.Drawing.Point(235, 247);
+            this.lap_value5.Name = "lap_value5";
+            this.lap_value5.Size = new System.Drawing.Size(89, 21);
+            this.lap_value5.Str = null;
+            this.lap_value5.Str1 = null;
+            this.lap_value5.Str2 = null;
+            this.lap_value5.TabIndex = 9;
+            // 
+            // lap_value5_label
+            // 
+            this.lap_value5_label.AutoSize = true;
+            this.lap_value5_label.BackColor = System.Drawing.Color.Transparent;
+            this.lap_value5_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.lap_value5_label.Location = new System.Drawing.Point(187, 247);
+            this.lap_value5_label.Name = "lap_value5_label";
+            this.lap_value5_label.Size = new System.Drawing.Size(42, 21);
+            this.lap_value5_label.TabIndex = 75;
+            this.lap_value5_label.Text = "内容";
+            // 
+            // lap_param5
+            // 
+            this.lap_param5.ID = null;
+            this.lap_param5.Location = new System.Drawing.Point(77, 247);
+            this.lap_param5.Name = "lap_param5";
+            this.lap_param5.Size = new System.Drawing.Size(89, 21);
+            this.lap_param5.Str = null;
+            this.lap_param5.Str1 = null;
+            this.lap_param5.Str2 = null;
+            this.lap_param5.TabIndex = 8;
+            // 
+            // lap_param5_label
+            // 
+            this.lap_param5_label.AutoSize = true;
+            this.lap_param5_label.BackColor = System.Drawing.Color.Transparent;
+            this.lap_param5_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.lap_param5_label.Location = new System.Drawing.Point(29, 247);
+            this.lap_param5_label.Name = "lap_param5_label";
+            this.lap_param5_label.Size = new System.Drawing.Size(42, 21);
+            this.lap_param5_label.TabIndex = 73;
+            this.lap_param5_label.Text = "参数";
+            // 
+            // lap_value4
+            // 
+            this.lap_value4.ID = null;
+            this.lap_value4.Location = new System.Drawing.Point(235, 197);
+            this.lap_value4.Name = "lap_value4";
+            this.lap_value4.Size = new System.Drawing.Size(89, 21);
+            this.lap_value4.Str = null;
+            this.lap_value4.Str1 = null;
+            this.lap_value4.Str2 = null;
+            this.lap_value4.TabIndex = 7;
+            // 
+            // lap_value4_label
+            // 
+            this.lap_value4_label.AutoSize = true;
+            this.lap_value4_label.BackColor = System.Drawing.Color.Transparent;
+            this.lap_value4_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.lap_value4_label.Location = new System.Drawing.Point(187, 197);
+            this.lap_value4_label.Name = "lap_value4_label";
+            this.lap_value4_label.Size = new System.Drawing.Size(42, 21);
+            this.lap_value4_label.TabIndex = 79;
+            this.lap_value4_label.Text = "内容";
+            // 
+            // lap_param4
+            // 
+            this.lap_param4.ID = null;
+            this.lap_param4.Location = new System.Drawing.Point(77, 197);
+            this.lap_param4.Name = "lap_param4";
+            this.lap_param4.Size = new System.Drawing.Size(89, 21);
+            this.lap_param4.Str = null;
+            this.lap_param4.Str1 = null;
+            this.lap_param4.Str2 = null;
+            this.lap_param4.TabIndex = 6;
+            // 
+            // lap_param4_label
+            // 
+            this.lap_param4_label.AutoSize = true;
+            this.lap_param4_label.BackColor = System.Drawing.Color.Transparent;
+            this.lap_param4_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.lap_param4_label.Location = new System.Drawing.Point(29, 197);
+            this.lap_param4_label.Name = "lap_param4_label";
+            this.lap_param4_label.Size = new System.Drawing.Size(42, 21);
+            this.lap_param4_label.TabIndex = 77;
+            this.lap_param4_label.Text = "参数";
+            // 
+            // Confirm
+            // 
+            this.Confirm.Location = new System.Drawing.Point(148, 308);
+            this.Confirm.Name = "Confirm";
+            this.Confirm.Size = new System.Drawing.Size(75, 23);
+            this.Confirm.TabIndex = 81;
+            this.Confirm.Text = "确认";
+            this.Confirm.UseVisualStyleBackColor = true;
+            this.Confirm.Click += new System.EventHandler(this.Confirm_Click);
+            // 
+            // lap_id4
+            // 
+            this.lap_id4.AutoSize = true;
+            this.lap_id4.BackColor = System.Drawing.Color.Transparent;
+            this.lap_id4.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.lap_id4.Location = new System.Drawing.Point(139, 197);
+            this.lap_id4.Name = "lap_id4";
+            this.lap_id4.Size = new System.Drawing.Size(0, 21);
+            this.lap_id4.TabIndex = 86;
+            this.lap_id4.Visible = false;
+            // 
+            // lap_id5
+            // 
+            this.lap_id5.AutoSize = true;
+            this.lap_id5.BackColor = System.Drawing.Color.Transparent;
+            this.lap_id5.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.lap_id5.Location = new System.Drawing.Point(139, 247);
+            this.lap_id5.Name = "lap_id5";
+            this.lap_id5.Size = new System.Drawing.Size(0, 21);
+            this.lap_id5.TabIndex = 85;
+            this.lap_id5.Visible = false;
+            // 
+            // lap_id2
+            // 
+            this.lap_id2.AutoSize = true;
+            this.lap_id2.BackColor = System.Drawing.Color.Transparent;
+            this.lap_id2.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.lap_id2.Location = new System.Drawing.Point(139, 102);
+            this.lap_id2.Name = "lap_id2";
+            this.lap_id2.Size = new System.Drawing.Size(0, 21);
+            this.lap_id2.TabIndex = 84;
+            this.lap_id2.Visible = false;
+            // 
+            // lap_id3
+            // 
+            this.lap_id3.AutoSize = true;
+            this.lap_id3.BackColor = System.Drawing.Color.Transparent;
+            this.lap_id3.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.lap_id3.Location = new System.Drawing.Point(139, 153);
+            this.lap_id3.Name = "lap_id3";
+            this.lap_id3.Size = new System.Drawing.Size(0, 21);
+            this.lap_id3.TabIndex = 83;
+            this.lap_id3.Visible = false;
+            // 
+            // lap_id1
+            // 
+            this.lap_id1.AutoSize = true;
+            this.lap_id1.BackColor = System.Drawing.Color.Transparent;
+            this.lap_id1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.lap_id1.Location = new System.Drawing.Point(139, 49);
+            this.lap_id1.Name = "lap_id1";
+            this.lap_id1.Size = new System.Drawing.Size(0, 21);
+            this.lap_id1.TabIndex = 82;
+            this.lap_id1.Visible = false;
+            // 
+            // 附件内容打印
+            // 
+            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+            this.ClientSize = new System.Drawing.Size(364, 359);
+            this.Controls.Add(this.lap_id4);
+            this.Controls.Add(this.lap_id5);
+            this.Controls.Add(this.lap_id2);
+            this.Controls.Add(this.lap_id3);
+            this.Controls.Add(this.lap_id1);
+            this.Controls.Add(this.Confirm);
+            this.Controls.Add(this.lap_value4);
+            this.Controls.Add(this.lap_value4_label);
+            this.Controls.Add(this.lap_param4);
+            this.Controls.Add(this.lap_param4_label);
+            this.Controls.Add(this.lap_value5);
+            this.Controls.Add(this.lap_value5_label);
+            this.Controls.Add(this.lap_param5);
+            this.Controls.Add(this.lap_param5_label);
+            this.Controls.Add(this.lap_value2);
+            this.Controls.Add(this.lap_value2_label);
+            this.Controls.Add(this.lap_param2);
+            this.Controls.Add(this.lap_param2_label);
+            this.Controls.Add(this.lap_value3);
+            this.Controls.Add(this.lap_value3_label);
+            this.Controls.Add(this.lap_param3);
+            this.Controls.Add(this.lap_param3_labe);
+            this.Controls.Add(this.lap_value1);
+            this.Controls.Add(this.lap_value1_label);
+            this.Controls.Add(this.lap_param1);
+            this.Controls.Add(this.lap_param1_label);
+            this.Name = "附件内容打印";
+            this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
+            this.Text = "附加内容打印";
+            this.Load += new System.EventHandler(this.附件内容打印_Load);
+            this.ResumeLayout(false);
+            this.PerformLayout();
+
+        }
+
+        #endregion
+
+        private CustomControl.EnterTextBox lap_param1;
+        private System.Windows.Forms.Label lap_param1_label;
+        private CustomControl.EnterTextBox lap_value1;
+        private System.Windows.Forms.Label lap_value1_label;
+        private CustomControl.EnterTextBox lap_value3;
+        private System.Windows.Forms.Label lap_value3_label;
+        private CustomControl.EnterTextBox lap_param3;
+        private System.Windows.Forms.Label lap_param3_labe;
+        private CustomControl.EnterTextBox lap_value2;
+        private System.Windows.Forms.Label lap_value2_label;
+        private CustomControl.EnterTextBox lap_param2;
+        private System.Windows.Forms.Label lap_param2_label;
+        private CustomControl.EnterTextBox lap_value5;
+        private System.Windows.Forms.Label lap_value5_label;
+        private CustomControl.EnterTextBox lap_param5;
+        private System.Windows.Forms.Label lap_param5_label;
+        private CustomControl.EnterTextBox lap_value4;
+        private System.Windows.Forms.Label lap_value4_label;
+        private CustomControl.EnterTextBox lap_param4;
+        private System.Windows.Forms.Label lap_param4_label;
+        private System.Windows.Forms.Button Confirm;
+        private System.Windows.Forms.Label lap_id4;
+        private System.Windows.Forms.Label lap_id5;
+        private System.Windows.Forms.Label lap_id2;
+        private System.Windows.Forms.Label lap_id3;
+        private System.Windows.Forms.Label lap_id1;
+    }
+}

+ 55 - 0
UAS-出货标签管理/附件内容打印.cs

@@ -0,0 +1,55 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Linq;
+using System.Text;
+using System.Windows.Forms;
+using UAS_LabelMachine.Entity;
+
+namespace UAS_LabelMachine
+{
+    public partial class 附件内容打印 : Form
+    {
+
+        DataHelper dh = SystemInf.dh;
+
+        string custcode;
+
+        public 附件内容打印(string CustCode)
+        {
+            custcode = CustCode;
+            InitializeComponent();
+        }
+
+        private void 附件内容打印_Load(object sender, EventArgs e)
+        {
+            DataTable dt = (DataTable)dh.ExecuteSql("select *  from LabelAttachPARAMETER where lap_custcode='" + custcode + "'", "select");
+            for (int i = 0; i < dt.Rows.Count; i++)
+            {
+                Controls["lap_id" + (i + 1)].Text = dt.Rows[i]["lap_id"].ToString();
+                Controls["lap_param" + (i + 1)].Text = dt.Rows[i]["lap_param"].ToString();
+                Controls["lap_value" + (i + 1)].Text = dt.Rows[i]["lap_value"].ToString();
+            }
+        }
+
+        private void Confirm_Click(object sender, EventArgs e)
+        {
+            string SQL = "";
+            for (int i = 1; i < 6; i++)
+            {
+                if (Controls["lap_id" + i].Text == "")
+                {
+                    SQL = "insert into LabelAttachPARAMETER(lap_id,lap_custcode,lap_param,lap_value)values(LabelAttachPARAMETER_seq.nextval,'" + custcode + "','" + Controls["lap_param" + i].Text + "','" + Controls["lap_value" + i].Text + "')";
+                }
+                else
+                {
+                    SQL = "update LabelAttachPARAMETER set lap_custcode='" + custcode + "',lap_param='" + Controls["lap_param" + i].Text + "',lap_value='" + Controls["lap_value" + i].Text + "' where lap_id='" + Controls["lap_id" + i].Text + "'";
+                }
+                dh.ExecuteSql(SQL, "insert");
+            }
+            MessageBox.Show("保存成功");
+        }
+    }
+}

+ 120 - 0
UAS-出货标签管理/附件内容打印.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>