Browse Source

修改打印方式

章政 8 years ago
parent
commit
28d01d266c

+ 3 - 1
UAS-MES/FunctionCode/Make/Make_ColorBoxWeigh.cs

@@ -20,6 +20,7 @@ namespace UAS_MES.Make
     {
         AutoSizeFormClass asc = new AutoSizeFormClass();
         ApplicationClass lbl;
+        Document doc;
         DataHelper dh;
         DataTable dt;
         LogStringBuilder sql = new LogStringBuilder();
@@ -236,7 +237,8 @@ namespace UAS_MES.Make
         {
             if (PrintLabel.Items.Count != 0)
             {
-                Print.CodeSoft(Tag.ToString(), lbl, PrintLabel.Text.Split(':')[1], PrintLabel.SelectedValue.ToString(), PrinterList.Text, sncode.Text, int.Parse(PrintNum.Text), indate[PrintLabel.SelectedIndex]);
+                doc = lbl.Documents.Open(ftpOperater.DownLoadTo+ PrintLabel.Text.Split(':')[1]);
+                Print.CodeSoft(Tag.ToString(), doc, PrintLabel.Text.Split(':')[1], PrintLabel.SelectedValue.ToString(), PrinterList.Text, sncode.Text, int.Parse(PrintNum.Text), indate[PrintLabel.SelectedIndex]);
             }
             else
             {

+ 3 - 1
UAS-MES/FunctionCode/Make/Make_FuselageLabelPrint.cs

@@ -18,6 +18,7 @@ namespace UAS_MES.Make
         DataHelper dh;
         DataTable dt;
         LogStringBuilder sql = new LogStringBuilder();
+        Document doc;
         AutoSizeFormClass asc = new AutoSizeFormClass();
         //保存StepProduct查询出来的数据
         //        DataTable ListA = new DataTable();
@@ -139,7 +140,8 @@ namespace UAS_MES.Make
                                 return;
                             }
                             //按照打印张数打印
-                            Print.CodeSoft(Tag.ToString(), lbl, PrintLabel.Text.Split(':')[1], PrintLabel.SelectedValue.ToString(), Printer.Text, sncode.Text, int.Parse(PrintNum.Text), indate[PrintLabel.SelectedIndex]);
+                            doc = lbl.Documents.Open(ftpOperater.DownLoadTo + PrintLabel.Text.Split(':')[1]);
+                            Print.CodeSoft(Tag.ToString(), doc, PrintLabel.Text.Split(':')[1], PrintLabel.SelectedValue.ToString(), Printer.Text, sncode.Text, int.Parse(PrintNum.Text), indate[PrintLabel.SelectedIndex]);
                             //提示用户打印成功
                             OperateResult.AppendText(">>序列号:" + sncode.Text + "打印成功\n", Color.Green);
                             //记录日志