Browse Source

支持codesoft打印

callm 1 day ago
parent
commit
a6a0cedceb
1 changed files with 18 additions and 0 deletions
  1. 18 0
      UAS_MES_JH/FunctionCode/Packing/Packing_PackageCollection.cs

+ 18 - 0
UAS_MES_JH/FunctionCode/Packing/Packing_PackageCollection.cs

@@ -20,6 +20,7 @@ namespace UAS_MES_NEW.Packing
         DataTable dt;
         LogStringBuilder sql = new LogStringBuilder();
         AutoSizeFormClass asc = new AutoSizeFormClass();
+        ApplicationClass lbl;
         Thread thread;
         Document doc;
         DataTable Dbfind;
@@ -54,6 +55,12 @@ namespace UAS_MES_NEW.Packing
                 {
 
                 }
+
+                try
+                {
+                    lbl = new ApplicationClass();
+                }
+                catch { }
             }
             catch (Exception ex)
             {
@@ -184,6 +191,17 @@ namespace UAS_MES_NEW.Packing
                             OperateResult.AppendText(ErrorMessage + "\n", Color.Red);
                         }
                     }
+                    else
+                    {
+                        if (Print.CodeSoft(Tag.ToString(), ref lbl, PrintLabel.Text, PrintLabel.SelectedValue.ToString(), PrintList.Text, pa_outboxcode.Text, int.Parse(PrintNum.Text), oMakeCode == "" ? pa_makecode.Text : oMakeCode, pr_code.Text, "卡通箱标", "0", out ErrorMessage))
+                        {
+                            OperateResult.AppendText(">>开始打印箱号" + pa_outboxcode.Text + "\n", Color.Black);
+                        }
+                        else
+                        {
+                            OperateResult.AppendText(ErrorMessage + "\n", Color.Red);
+                        }
+                    }
                     if (!AutoGenBoxCode.Checked)
                     {
                         pa_outboxcode.SelectAll();