Browse Source

出货清单打印

callm 1 year ago
parent
commit
553792da69

+ 7 - 2
UAS_BARCODEIO/DataHelper.cs

@@ -9,9 +9,14 @@ namespace UAS_BARCODEIO
     public class DataHelper
     {
         //系统默认的的连接字符串
-        private string ConnectionStrings = "Connection Timeout=0;Pooling=false;Password=select!#%*(;User ID=SENGWILL;Pooling=false;Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=sengwill.hicp.net)(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)));";
+        //private string ConnectionStrings = "Connection Timeout=0;Pooling=false;Password=select!#%*(;User ID=SENGWILL;Pooling=false;Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=sengwill.hicp.net)(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)));";
+        ////用户选择的数据库的连接字符串
+        //public static string DBConnectionString = "Connection Timeout=0;Pooling=false;Password=select!#%*(;User ID=SENGWILL;Pooling=false;Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=sengwill.hicp.net)(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)));";
+
+        private string ConnectionStrings = "Connection Timeout=0;Pooling=false;Password=select!#%*(;User ID=N_JICE_ZS;Pooling=false;Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=10.1.81.208)(PORT=11681)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)));";
         //用户选择的数据库的连接字符串
-        public static string DBConnectionString = "Connection Timeout=0;Pooling=false;Password=select!#%*(;User ID=SENGWILL;Pooling=false;Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=sengwill.hicp.net)(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)));";
+        public static string DBConnectionString = "Connection Timeout=0;Pooling=false;Password=select!#%*(;User ID=N_JICE_ZS;Pooling=false;Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=10.1.81.208)(PORT=11681)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)));";
+
         public static OracleConnection connection = null;
         OracleCommand command = null;
         int ReconnectTime = 0;

+ 1 - 1
UAS_BARCODEIO/Program.cs

@@ -29,7 +29,7 @@ namespace UAS_BARCODEIO
             //如果是管理员的身份
             if (principal.IsInRole(WindowsBuiltInRole.Administrator))
             {
-                Application.Run(new 入库条码规则解析());
+                Application.Run(new 极测_出货清单打印());
             }
             else
             {

+ 9 - 0
UAS_BARCODEIO/UAS_BARCODEIO.csproj

@@ -170,6 +170,12 @@
     </Compile>
     <Compile Include="Settings.cs" />
     <Compile Include="SystemInf.cs" />
+    <Compile Include="极测_出货清单打印.cs">
+      <SubType>Form</SubType>
+    </Compile>
+    <Compile Include="极测_出货清单打印.Designer.cs">
+      <DependentUpon>极测_出货清单打印.cs</DependentUpon>
+    </Compile>
     <Compile Include="库存条码打印.cs">
       <SubType>Form</SubType>
     </Compile>
@@ -228,6 +234,9 @@
     <EmbeddedResource Include="SearchTextBox.resx">
       <DependentUpon>SearchTextBox.cs</DependentUpon>
     </EmbeddedResource>
+    <EmbeddedResource Include="极测_出货清单打印.resx">
+      <DependentUpon>极测_出货清单打印.cs</DependentUpon>
+    </EmbeddedResource>
     <EmbeddedResource Include="库存条码打印.resx">
       <DependentUpon>库存条码打印.cs</DependentUpon>
     </EmbeddedResource>

+ 314 - 0
UAS_BARCODEIO/极测_出货清单打印.Designer.cs

@@ -0,0 +1,314 @@
+namespace UAS_BARCODEIO
+{
+    partial class 极测_出货清单打印
+    {
+        /// <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 Windows 窗体设计器生成的代码
+
+        /// <summary>
+        /// 设计器支持所需的方法 - 不要修改
+        /// 使用代码编辑器修改此方法的内容。
+        /// </summary>
+        private void InitializeComponent()
+        {
+            this.PrinterList = new System.Windows.Forms.ComboBox();
+            this.label9 = new System.Windows.Forms.Label();
+            this.ChooseAll = new System.Windows.Forms.Button();
+            this.BarcodeIO = new System.Windows.Forms.DataGridView();
+            this.PrintBarCode = new System.Windows.Forms.Button();
+            this.label3 = new System.Windows.Forms.Label();
+            this.spl_code = new UAS_BARCODEIO.SearchTextBox();
+            this.CheckBox = new System.Windows.Forms.DataGridViewCheckBoxColumn();
+            this.spld_detno = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.spld_module = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.spld_prodcode = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.spld_proddetail = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.spld_prodspec = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.spld_produnit = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.spld_baseqty = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.spld_qty = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.spld_thisqty = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.spld_sndetno = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.spld_sncode = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.spld_wjqty = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.spld_remark = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            ((System.ComponentModel.ISupportInitialize)(this.BarcodeIO)).BeginInit();
+            this.SuspendLayout();
+            // 
+            // PrinterList
+            // 
+            this.PrinterList.FormattingEnabled = true;
+            this.PrinterList.Location = new System.Drawing.Point(870, 41);
+            this.PrinterList.Name = "PrinterList";
+            this.PrinterList.Size = new System.Drawing.Size(312, 32);
+            this.PrinterList.TabIndex = 37;
+            // 
+            // label9
+            // 
+            this.label9.AutoSize = true;
+            this.label9.Font = new System.Drawing.Font("微软雅黑", 10.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label9.Location = new System.Drawing.Point(701, 35);
+            this.label9.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.label9.Name = "label9";
+            this.label9.Size = new System.Drawing.Size(162, 38);
+            this.label9.TabIndex = 38;
+            this.label9.Text = "打印机列表";
+            // 
+            // ChooseAll
+            // 
+            this.ChooseAll.Location = new System.Drawing.Point(27, 96);
+            this.ChooseAll.Name = "ChooseAll";
+            this.ChooseAll.Size = new System.Drawing.Size(86, 45);
+            this.ChooseAll.TabIndex = 39;
+            this.ChooseAll.Text = "全选";
+            this.ChooseAll.UseVisualStyleBackColor = true;
+            this.ChooseAll.Click += new System.EventHandler(this.ChooseAll_Click);
+            // 
+            // BarcodeIO
+            // 
+            this.BarcodeIO.AllowUserToAddRows = false;
+            this.BarcodeIO.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
+            | System.Windows.Forms.AnchorStyles.Right)));
+            this.BarcodeIO.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
+            this.BarcodeIO.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
+            this.CheckBox,
+            this.spld_detno,
+            this.spld_module,
+            this.spld_prodcode,
+            this.spld_proddetail,
+            this.spld_prodspec,
+            this.spld_produnit,
+            this.spld_baseqty,
+            this.spld_qty,
+            this.spld_thisqty,
+            this.spld_sndetno,
+            this.spld_sncode,
+            this.spld_wjqty,
+            this.spld_remark});
+            this.BarcodeIO.Location = new System.Drawing.Point(27, 96);
+            this.BarcodeIO.Name = "BarcodeIO";
+            this.BarcodeIO.RowHeadersWidth = 82;
+            this.BarcodeIO.RowTemplate.Height = 23;
+            this.BarcodeIO.Size = new System.Drawing.Size(2087, 1215);
+            this.BarcodeIO.TabIndex = 35;
+            // 
+            // PrintBarCode
+            // 
+            this.PrintBarCode.Location = new System.Drawing.Point(1230, 35);
+            this.PrintBarCode.Name = "PrintBarCode";
+            this.PrintBarCode.Size = new System.Drawing.Size(169, 45);
+            this.PrintBarCode.TabIndex = 36;
+            this.PrintBarCode.Text = "打印条码";
+            this.PrintBarCode.UseVisualStyleBackColor = true;
+            this.PrintBarCode.Click += new System.EventHandler(this.PrintBarCode_Click);
+            // 
+            // label3
+            // 
+            this.label3.AutoSize = true;
+            this.label3.Font = new System.Drawing.Font("微软雅黑", 10.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label3.Location = new System.Drawing.Point(37, 38);
+            this.label3.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.label3.Name = "label3";
+            this.label3.Size = new System.Drawing.Size(133, 38);
+            this.label3.TabIndex = 40;
+            this.label3.Text = "单据编号";
+            // 
+            // spl_code
+            // 
+            this.spl_code.AllPower = null;
+            this.spl_code.Caller = null;
+            this.spl_code.Condition = null;
+            this.spl_code.DBTitle = null;
+            this.spl_code.FormName = null;
+            this.spl_code.Location = new System.Drawing.Point(178, 38);
+            this.spl_code.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
+            this.spl_code.Name = "spl_code";
+            this.spl_code.Power = null;
+            this.spl_code.ReturnData = null;
+            this.spl_code.SelectField = null;
+            this.spl_code.SetValueField = null;
+            this.spl_code.Size = new System.Drawing.Size(436, 35);
+            this.spl_code.TabIndex = 41;
+            this.spl_code.TableName = null;
+            this.spl_code.TextBoxEnable = false;
+            this.spl_code.UserControlTextChanged += new UAS_BARCODEIO.SearchTextBox.OnTextChange(this.spl_code_UserControlTextChanged);
+            // 
+            // CheckBox
+            // 
+            this.CheckBox.DataPropertyName = "CheckBox";
+            this.CheckBox.HeaderText = "勾选";
+            this.CheckBox.MinimumWidth = 10;
+            this.CheckBox.Name = "CheckBox";
+            this.CheckBox.Width = 200;
+            // 
+            // spld_detno
+            // 
+            this.spld_detno.DataPropertyName = "spld_detno";
+            this.spld_detno.HeaderText = "序号";
+            this.spld_detno.MinimumWidth = 10;
+            this.spld_detno.Name = "spld_detno";
+            this.spld_detno.Width = 200;
+            // 
+            // spld_module
+            // 
+            this.spld_module.DataPropertyName = "spld_module";
+            this.spld_module.HeaderText = "所属模块";
+            this.spld_module.MinimumWidth = 10;
+            this.spld_module.Name = "spld_module";
+            this.spld_module.Width = 200;
+            // 
+            // spld_prodcode
+            // 
+            this.spld_prodcode.DataPropertyName = "spld_prodcode";
+            this.spld_prodcode.HeaderText = "物料编号";
+            this.spld_prodcode.MinimumWidth = 10;
+            this.spld_prodcode.Name = "spld_prodcode";
+            this.spld_prodcode.Width = 200;
+            // 
+            // spld_proddetail
+            // 
+            this.spld_proddetail.DataPropertyName = "spld_proddetail";
+            this.spld_proddetail.HeaderText = "物料名称";
+            this.spld_proddetail.MinimumWidth = 10;
+            this.spld_proddetail.Name = "spld_proddetail";
+            this.spld_proddetail.Width = 200;
+            // 
+            // spld_prodspec
+            // 
+            this.spld_prodspec.DataPropertyName = "spld_prodspec";
+            this.spld_prodspec.HeaderText = "物料规格";
+            this.spld_prodspec.MinimumWidth = 10;
+            this.spld_prodspec.Name = "spld_prodspec";
+            this.spld_prodspec.Width = 200;
+            // 
+            // spld_produnit
+            // 
+            this.spld_produnit.DataPropertyName = "spld_produnit";
+            this.spld_produnit.HeaderText = "单位";
+            this.spld_produnit.MinimumWidth = 10;
+            this.spld_produnit.Name = "spld_produnit";
+            this.spld_produnit.Width = 200;
+            // 
+            // spld_baseqty
+            // 
+            this.spld_baseqty.DataPropertyName = "spld_baseqty";
+            this.spld_baseqty.HeaderText = "单位用量";
+            this.spld_baseqty.MinimumWidth = 10;
+            this.spld_baseqty.Name = "spld_baseqty";
+            this.spld_baseqty.Width = 200;
+            // 
+            // spld_qty
+            // 
+            this.spld_qty.DataPropertyName = "spld_qty";
+            this.spld_qty.HeaderText = "订单用量";
+            this.spld_qty.MinimumWidth = 10;
+            this.spld_qty.Name = "spld_qty";
+            this.spld_qty.Width = 200;
+            // 
+            // spld_thisqty
+            // 
+            this.spld_thisqty.DataPropertyName = "spld_thisqty";
+            this.spld_thisqty.HeaderText = "本次发料数量";
+            this.spld_thisqty.MinimumWidth = 10;
+            this.spld_thisqty.Name = "spld_thisqty";
+            this.spld_thisqty.Width = 200;
+            // 
+            // spld_sndetno
+            // 
+            this.spld_sndetno.DataPropertyName = "spld_sndetno";
+            this.spld_sndetno.HeaderText = "出货通知序号";
+            this.spld_sndetno.MinimumWidth = 10;
+            this.spld_sndetno.Name = "spld_sndetno";
+            this.spld_sndetno.Width = 200;
+            // 
+            // spld_sncode
+            // 
+            this.spld_sncode.DataPropertyName = "spld_sncode";
+            this.spld_sncode.HeaderText = "出货通知单号";
+            this.spld_sncode.MinimumWidth = 10;
+            this.spld_sncode.Name = "spld_sncode";
+            this.spld_sncode.Width = 200;
+            // 
+            // spld_wjqty
+            // 
+            this.spld_wjqty.DataPropertyName = "spld_wjqty";
+            this.spld_wjqty.HeaderText = "未发数量";
+            this.spld_wjqty.MinimumWidth = 10;
+            this.spld_wjqty.Name = "spld_wjqty";
+            this.spld_wjqty.Width = 200;
+            // 
+            // spld_remark
+            // 
+            this.spld_remark.DataPropertyName = "spld_remark";
+            this.spld_remark.HeaderText = "备注";
+            this.spld_remark.MinimumWidth = 10;
+            this.spld_remark.Name = "spld_remark";
+            this.spld_remark.Width = 200;
+            // 
+            // 极测_出货清单打印
+            // 
+            this.AutoScaleDimensions = new System.Drawing.SizeF(12F, 24F);
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+            this.ClientSize = new System.Drawing.Size(2136, 1338);
+            this.Controls.Add(this.spl_code);
+            this.Controls.Add(this.label3);
+            this.Controls.Add(this.ChooseAll);
+            this.Controls.Add(this.label9);
+            this.Controls.Add(this.PrinterList);
+            this.Controls.Add(this.PrintBarCode);
+            this.Controls.Add(this.BarcodeIO);
+            this.Margin = new System.Windows.Forms.Padding(6);
+            this.Name = "极测_出货清单打印";
+            this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
+            this.Text = "入库条码打印";
+            this.WindowState = System.Windows.Forms.FormWindowState.Maximized;
+            this.AutoSizeChanged += new System.EventHandler(this.入库条码规则解析_AutoSizeChanged);
+            this.Load += new System.EventHandler(this.Form1_Load);
+            ((System.ComponentModel.ISupportInitialize)(this.BarcodeIO)).EndInit();
+            this.ResumeLayout(false);
+            this.PerformLayout();
+
+        }
+
+        #endregion
+        private System.Windows.Forms.ComboBox PrinterList;
+        private System.Windows.Forms.Label label9;
+        private System.Windows.Forms.Button ChooseAll;
+        private System.Windows.Forms.DataGridView BarcodeIO;
+        private System.Windows.Forms.Button PrintBarCode;
+        private SearchTextBox spl_code;
+        private System.Windows.Forms.Label label3;
+        private System.Windows.Forms.DataGridViewCheckBoxColumn CheckBox;
+        private System.Windows.Forms.DataGridViewTextBoxColumn spld_detno;
+        private System.Windows.Forms.DataGridViewTextBoxColumn spld_module;
+        private System.Windows.Forms.DataGridViewTextBoxColumn spld_prodcode;
+        private System.Windows.Forms.DataGridViewTextBoxColumn spld_proddetail;
+        private System.Windows.Forms.DataGridViewTextBoxColumn spld_prodspec;
+        private System.Windows.Forms.DataGridViewTextBoxColumn spld_produnit;
+        private System.Windows.Forms.DataGridViewTextBoxColumn spld_baseqty;
+        private System.Windows.Forms.DataGridViewTextBoxColumn spld_qty;
+        private System.Windows.Forms.DataGridViewTextBoxColumn spld_thisqty;
+        private System.Windows.Forms.DataGridViewTextBoxColumn spld_sndetno;
+        private System.Windows.Forms.DataGridViewTextBoxColumn spld_sncode;
+        private System.Windows.Forms.DataGridViewTextBoxColumn spld_wjqty;
+        private System.Windows.Forms.DataGridViewTextBoxColumn spld_remark;
+    }
+}
+

+ 217 - 0
UAS_BARCODEIO/极测_出货清单打印.cs

@@ -0,0 +1,217 @@
+using LabelManager2;
+using Seagull.BarTender.Print;
+using System;
+using System.Collections.Generic;
+using System.Data;
+using System.Drawing;
+using System.Drawing.Printing;
+using System.Linq;
+using System.Media;
+using System.Threading;
+using System.Windows.Forms;
+using static System.Runtime.CompilerServices.RuntimeHelpers;
+
+namespace UAS_BARCODEIO
+{
+    public partial class 极测_出货清单打印 : Form
+    {
+
+        DataHelper dh = new DataHelper();
+
+        Engine engine;
+
+        DataTable Dbfind;
+
+        //自适应屏幕
+        AutoSizeFormClass asc = new AutoSizeFormClass();
+
+        LabelFormatDocument format;
+
+
+        public 极测_出货清单打印()
+        {
+            InitializeComponent();
+        }
+
+        delegate void BindDataSource(DataGridView dgv, DataTable dt);//定义委托
+
+        void bindingsource(DataGridView dgv, DataTable dt)
+        {
+            //dgv.AutoGenerateColumns = false;
+            //dgv.DataSource = null;
+            //dgv.DataSource = dt;
+            if (dgv.InvokeRequired)
+            {
+                dgv.Invoke(new BindDataSource(bindingsource), new object[] { dgv, dt });
+            }
+            else
+            {
+                dgv.AutoGenerateColumns = false;
+                dgv.DataSource = dt;
+            }
+        }
+
+
+        private void Form1_Load(object sender, EventArgs e)
+        {
+            SystemInf.dh = dh;
+            spl_code.TableName = "SnPartsList ";
+            spl_code.SelectField = "spl_code # 单据编号";
+            spl_code.FormName = Name;
+            spl_code.DBTitle = "解析规则查询";
+            spl_code.SetValueField = new string[] { "spl_code" };
+            spl_code.Condition = "";
+            spl_code.DbChange += nr_rule_DBChange;
+            SystemInf.dh = dh;
+            try
+            {
+                engine = new Engine(true);
+                format = engine.Documents.Open(System.Windows.Forms.Application.StartupPath + @"\BARCODE.btw");
+            }
+            catch (Exception ex)
+            {
+                Console.WriteLine(ex.Message);
+                throw;
+            }
+
+            asc.controllInitializeSize(this);
+            asc.controlAutoSize(this);
+
+            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);
+            }
+        }
+
+        private void nr_rule_DBChange(object sender, EventArgs e)
+        {
+            Dbfind = spl_code.ReturnData;
+            BaseUtil.SetFormValue(this.Controls, Dbfind);
+        }
+
+        private void pi_inoutnokeydown(object sender, KeyEventArgs e)
+        {
+            if (e.KeyCode == Keys.Enter)
+            {
+                LoadGridData();
+            }
+        }
+
+        private void LoadGridData()
+        {
+
+        }
+
+
+        bool AutoSized = false;
+        private void 入库条码规则解析_AutoSizeChanged(object sender, EventArgs e)
+        {
+            if (!AutoSized)
+            {
+                asc.controlAutoSize(this);
+                AutoSized = true;
+            }
+        }
+
+        private void PrintBarCode_Click(object sender, EventArgs e)
+        {
+            for (int i = 0; i < BarcodeIO.Rows.Count; i++)
+            {
+                if (BarcodeIO.Rows[i].Cells["CheckBox"].FormattedValue != null && BarcodeIO.Rows[i].Cells["CheckBox"].FormattedValue.ToString() == "True")
+                {
+                    string barcode = "";
+                    string[] param = new string[] { "", "", barcode };
+                    dh.CallProcedure("SP_GETBARCODE", ref param);
+                    barcode = param[2].Replace("BARCODE:", "");
+                    format.SubStrings["BARCODE"].Value = barcode;
+                    format.SubStrings["PRSPEC"].Value = BarcodeIO.Rows[i].Cells["spld_prodspec"].Value.ToString();
+                    format.SubStrings["PRCODE"].Value = BarcodeIO.Rows[i].Cells["spld_prodcode"].Value.ToString();
+                    format.SubStrings["PRDETAIL"].Value = BarcodeIO.Rows[i].Cells["spld_proddetail"].Value.ToString();
+                    format.SubStrings["QTY"].Value = BarcodeIO.Rows[i].Cells["spld_thisqty"].Value.ToString();
+                    format.SubStrings["DC"].Value = System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
+
+                    dh.ExecuteSql("insert into prodiobarcode(pib_id,pib_prodcode,pib_inoutno,pib_barcode,pib_indate,pib_qty)" +
+                        "values(prodiobarcode_seq.nextval,'" + BarcodeIO.Rows[i].Cells["spld_prodspec"].Value.ToString() + "','" + spl_code.Text + "','" + barcode + "',sysdate,'" + BarcodeIO.Rows[i].Cells["spld_thisqty"].Value.ToString() + "')", "insert");
+
+                    format.PrintSetup.PrinterName = PrinterList.Text;
+                    format.PrintSetup.IdenticalCopiesOfLabel = 1;
+                    format.Print();
+                }
+            }
+        }
+
+
+
+        private void ChooseAll_Click(object sender, EventArgs e)
+        {
+            for (int i = 0; i < BarcodeIO.Rows.Count; i++)
+            {
+                BarcodeIO.Rows[i].Cells["CheckBox"].Value = true;
+            }
+        }
+
+
+        private void PrintStockBarCode_Click(object sender, EventArgs e)
+        {
+            库存条码打印 form = new 库存条码打印();
+            form.ShowDialog();
+        }
+
+        Thread thread;
+        string FileName = "";
+        public void Play(string Type)
+        {
+            if (Type == "OK")
+            {
+                FileName = System.Windows.Forms.Application.StartupPath + @"\Resources\Sound\8378.wav";
+                thread = new Thread(PlaySound);
+                thread.Start();
+
+            }
+            else
+            {
+                FileName = System.Windows.Forms.Application.StartupPath + @"\Resources\Sound\5185.wav";
+                thread = new Thread(PlaySound);
+                thread.Start();
+            }
+        }
+
+        private void PlaySound()
+        {
+            //要加载COM组件:Microsoft speech object Library    
+            if (!System.IO.File.Exists(FileName))
+            {
+                return;
+            }
+            try
+            {
+                SoundPlayer player = new SoundPlayer();
+                player.SoundLocation = FileName;
+                player.Load();
+                player.Play();
+            }
+            catch (Exception e)
+            {
+                MessageBox.Show(e.Message);
+            }
+        }
+
+        private void spl_code_UserControlTextChanged(object sender, EventArgs e)
+        {
+            DataTable dt = (DataTable)dh.ExecuteSql("select spld_detno,spld_module,spld_prodcode,spld_proddetail" +
+                ",spld_prodspec,spld_produnit,spld_baseqty,spld_qty,spld_sncode,spld_sndetno,spld_thisqty,spld_remark " +
+                " from SnPartsList left join SNPARTSLISTDETAIL on spl_id=spld_splid where spl_code='" + spl_code.Text + "'", "select");
+            if (dt.Rows.Count == 0)
+            {
+                MessageBox.Show("单据编号不存在");
+                return;
+            }
+            BarcodeIO.DataSource = dt;
+        }
+    }
+}

+ 162 - 0
UAS_BARCODEIO/极测_出货清单打印.resx

@@ -0,0 +1,162 @@
+<?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="CheckBox.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="spld_detno.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="spld_module.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="spld_prodcode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="spld_proddetail.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="spld_prodspec.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="spld_produnit.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="spld_baseqty.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="spld_qty.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="spld_thisqty.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="spld_sndetno.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="spld_sncode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="spld_wjqty.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="spld_remark.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+</root>