Эх сурвалжийг харах

添加多个文件进行空页区分

章政 6 жил өмнө
parent
commit
553e53a932

+ 5 - 0
UAS-出货标签管理(贸易版)/PublicMethod/Print.cs

@@ -198,6 +198,11 @@ namespace UAS_LabelMachine.PublicMethod
         {
             public static void SinglePrint(LabelFormatDocument SingleFormat, DataTable SingleLabelParam, string pib_id)
             {
+                if (pib_id == "-1")
+                {
+                    SingleFormat.Print();
+                    return;
+                }
                 StringBuilder sql = new StringBuilder();
                 sql.Clear();
                 for (int j = 0; j < SingleFormat.SubStrings.Count; j++)

+ 3 - 3
UAS-出货标签管理(贸易版)/UAS_出货标签管理.cs

@@ -692,7 +692,7 @@ namespace UAS_LabelMachine
                 //打印一张空白标签
                 if (LabelSpace.Checked && PrintBlankLabel)
                 {
-                    Print.BarTender.SinglePrint(EmptySingleFormat, SingleLabelParam, pib_id);
+                    Print.BarTender.SinglePrint(EmptySingleFormat, SingleLabelParam, "-1");
                 }
                 Print.BarTender.SinglePrint(SingleFormat, SingleLabelParam, pib_id);
             }
@@ -1138,12 +1138,12 @@ namespace UAS_LabelMachine
                 //打开空标签文件
                 if (EmptySingleFormat == null)
                 {
-                    EmptySingleFormat = engine.Documents.Open("Empty.btw");
+                    EmptySingleFormat = engine.Documents.Open(System.Windows.Forms.Application.StartupPath+ @"\Empty.btw");
                     EmptySingleFormat.PrintSetup.PrinterName = SingleLabelPrinter.Text;
                 }
                 if (EmptyOutFormat == null)
                 {
-                    EmptyOutFormat = engine.Documents.Open("Empty.btw");
+                    EmptyOutFormat = engine.Documents.Open(System.Windows.Forms.Application.StartupPath + @"\Empty1.btw");
                     EmptyOutFormat.PrintSetup.PrinterName = OutBoxPrinter.Text;
                 }
             }