فهرست منبع

Merge branch 'master' of ssh://10.10.100.21/source/mes-client

章政 8 سال پیش
والد
کامیت
ec1001f5d8

+ 3 - 3
UAS-MES/FunctionCode/Make/Make_BigBoxCollection.cs

@@ -57,7 +57,7 @@ namespace UAS_MES.Make
             try
             {
                 lbl = new ApplicationClass();
-                BaseUtil.WriteLbl(lbl);
+                BaseUtil.WriteLbl();
             }
             catch
             {
@@ -429,8 +429,8 @@ namespace UAS_MES.Make
             {
                 if (dh.getFieldDataByCondition("package", "pa_status", "pa_outboxcode='" + pa_outboxcode.Text + "'").ToString() == "1")
                 {
-                    doc = lbl.Documents.Open(ftpOperater.DownLoadTo + PrintLabel.Text);
-                    if (Print.CodeSoft(Tag.ToString(), doc, PrintLabel.Text, PrintLabel.SelectedValue.ToString(), PrinterList.Text, pa_outboxcode.Text, int.Parse(PrintNum.Text), pa_makecode.Text, pa_prodcode.Text, "大箱标", "0", out ErrorMessage))
+                   // doc = lbl.Documents.Open(ftpOperater.DownLoadTo + PrintLabel.Text);
+                    if (Print.CodeSoft(Tag.ToString(),ref lbl, PrintLabel.Text, PrintLabel.SelectedValue.ToString(), PrinterList.Text, pa_outboxcode.Text, int.Parse(PrintNum.Text), pa_makecode.Text, pa_prodcode.Text, "大箱标", "0", out ErrorMessage))
                     {
                         OperateResult.AppendText(">>打印箱号" + pa_outboxcode.Text + "\n", Color.Black);
                     }

+ 3 - 3
UAS-MES/FunctionCode/Make/Make_BigBoxWeight.cs

@@ -86,7 +86,7 @@ namespace UAS_MES.Make
             try
             {
                 lbl = new ApplicationClass();
-                BaseUtil.WriteLbl(lbl);
+                BaseUtil.WriteLbl();
             }
             catch
             {
@@ -138,9 +138,9 @@ namespace UAS_MES.Make
                     {
                         try
                         {
-                            doc = lbl.Documents.Open(ftpOperater.DownLoadTo + PrintLabel.Text);
+                            //doc = lbl.Documents.Open(ftpOperater.DownLoadTo + PrintLabel.Text);
                             string ErrorMessage = "";
-                            if (!Print.CodeSoft(Tag.ToString(), doc, PrintLabel.Text, PrintLabel.SelectedValue.ToString(), Printer.Text, pa_outboxcode.Text, int.Parse(PrintNum.Text), pa_makecode.Text, pa_prodcode.Text, "大箱标", "0", out ErrorMessage))
+                            if (!Print.CodeSoft(Tag.ToString(), ref lbl, PrintLabel.Text, PrintLabel.SelectedValue.ToString(), Printer.Text, pa_outboxcode.Text, int.Parse(PrintNum.Text), pa_makecode.Text, pa_prodcode.Text, "大箱标", "0", out ErrorMessage))
                             {
                                 OperateResult.AppendText(ErrorMessage + "\n", Color.Red);
                             }

+ 3 - 3
UAS-MES/FunctionCode/Make/Make_CartonBoxSNWeigh.cs

@@ -105,7 +105,7 @@ namespace UAS_MES.Make
             try
             {
                 lbl = new ApplicationClass();
-                BaseUtil.WriteLbl(lbl);
+                BaseUtil.WriteLbl();
             }
             catch (Exception)
             {
@@ -249,9 +249,9 @@ namespace UAS_MES.Make
         //确认打印
         private void Confirm_Click(object sender, EventArgs e)
         {
-            doc = lbl.Documents.Open(PrintLabel.Text);
+            //doc = lbl.Documents.Open(PrintLabel.Text);
             string ErrorMessage = "";
-            if (!Print.CodeSoft(Tag.ToString(), doc, PrintLabel.Text, PrintLabel.SelectedValue.ToString(), PrinterList.Text, outboxcode, int.Parse(PrintNum.Text), ma_code.Text, pr_code.Text, "卡通箱标", "0", out ErrorMessage))
+            if (!Print.CodeSoft(Tag.ToString(), ref lbl, PrintLabel.Text, PrintLabel.SelectedValue.ToString(), PrinterList.Text, outboxcode, int.Parse(PrintNum.Text), ma_code.Text, pr_code.Text, "卡通箱标", "0", out ErrorMessage))
             {
                 OperateResult.AppendText(ErrorMessage + "\n", Color.Red);
             }

+ 3 - 3
UAS-MES/FunctionCode/Make/Make_CartonBoxWeigh.cs

@@ -88,7 +88,7 @@ namespace UAS_MES.Make
             try
             {
                 lbl = new ApplicationClass();
-                BaseUtil.WriteLbl(lbl);
+                BaseUtil.WriteLbl();
             }
             catch (Exception)
             {
@@ -222,9 +222,9 @@ namespace UAS_MES.Make
         //确认打印
         private void Confirm_Click(object sender, EventArgs e)
         {
-            doc = lbl.Documents.Open(PrintLabel.Text);
+            //doc = lbl.Documents.Open(PrintLabel.Text);
             string ErrorMessage = "";
-            if (!Print.CodeSoft(Tag.ToString(), doc, PrintLabel.Text, PrintLabel.SelectedValue.ToString(), PrinterList.Text, outboxcode.Text, int.Parse(PrintNum.Text), ma_code.Text, pr_code.Text, "卡通箱标", "0", out ErrorMessage))
+            if (!Print.CodeSoft(Tag.ToString(), ref lbl, PrintLabel.Text, PrintLabel.SelectedValue.ToString(), PrinterList.Text, outboxcode.Text, int.Parse(PrintNum.Text), ma_code.Text, pr_code.Text, "卡通箱标", "0", out ErrorMessage))
             {
                 OperateResult.AppendText(ErrorMessage + "\n", Color.Red);
             }

+ 3 - 3
UAS-MES/FunctionCode/Make/Make_ColorBoxLabelPrint.cs

@@ -101,7 +101,7 @@ namespace UAS_MES.Make
             try
             {
                 lbl = new ApplicationClass();
-                BaseUtil.WriteLbl(lbl);
+                BaseUtil.WriteLbl();
             }
             catch (Exception ex)
             {
@@ -237,8 +237,8 @@ namespace UAS_MES.Make
                                     //提示正确返回时传递的信息
                                     if (ErrorMessage.Contains("AFTERSUCCESS"))
                                         OperateResult.AppendText(">>" + ErrorMessage + "\n");
-                                    doc = lbl.Documents.Open(PrintLabel.Text);
-                                    if (Print.CodeSoft(Tag.ToString(), doc, PrintLabel.Text, PrintLabel.SelectedValue.ToString(), Printer.Text, sncode.Text, int.Parse(PrintNum.Text), oMakeCode, pr_code.Text, "彩盒标", "0", out ErrorMessage))
+                                    // doc = lbl.Documents.Open(PrintLabel.Text);
+                                    if (Print.CodeSoft(Tag.ToString(), ref lbl, PrintLabel.Text, PrintLabel.SelectedValue.ToString(), Printer.Text, sncode.Text, int.Parse(PrintNum.Text), oMakeCode, pr_code.Text, "彩盒标", "0", out ErrorMessage))
                                     {
                                         //提示用户打印成功
                                         OperateResult.AppendText(">>序列号:" + sncode.Text + "打印结束\n", Color.Green);

+ 3 - 3
UAS-MES/FunctionCode/Make/Make_ColorBoxLoadPrint.cs

@@ -91,7 +91,7 @@ namespace UAS_MES.Make
             try
             {
                 lbl = new ApplicationClass();
-                BaseUtil.WriteLbl(lbl);
+                BaseUtil.WriteLbl();
             }
             catch (Exception ex)
             {
@@ -288,8 +288,8 @@ namespace UAS_MES.Make
                                 BaseUtil.CleanDataTableData(ListA);
                             }
                             else OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Red, code);
-                            doc = lbl.Documents.Open(PrintLabel.Text);
-                            if (!Print.CodeSoft(Tag.ToString(), doc, PrintLabel.Text, PrintLabel.SelectedValue.ToString(), Printer.Text, ms_sncode.Text, int.Parse(PrintNum.Text), ma_code.Text, pr_code.Text, "彩盒标", "0", out ErrorMessage))
+                            // doc = lbl.Documents.Open(PrintLabel.Text);
+                            if (!Print.CodeSoft(Tag.ToString(), ref lbl, PrintLabel.Text, PrintLabel.SelectedValue.ToString(), Printer.Text, ms_sncode.Text, int.Parse(PrintNum.Text), ma_code.Text, pr_code.Text, "彩盒标", "0", out ErrorMessage))
                             {
                                 OperateResult.AppendText(ErrorMessage + "\n", Color.Red);
                             }

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

@@ -74,7 +74,7 @@ namespace UAS_MES.Make
             try
             {
                 lbl = new ApplicationClass();
-                BaseUtil.WriteLbl(lbl);
+                BaseUtil.WriteLbl();
             }
             catch (Exception ex)
             {
@@ -264,9 +264,9 @@ namespace UAS_MES.Make
         {
             if (PrintLabel.Items.Count != 0)
             {
-                doc = lbl.Documents.Open(PrintLabel.Text);
+                //doc = lbl.Documents.Open(PrintLabel.Text);
                 string oErrorMessage;
-                if (!Print.CodeSoft(Tag.ToString(), doc, PrintLabel.Text, PrintLabel.SelectedValue.ToString(), PrinterList.Text, sncode.Text, int.Parse(PrintNum.Text), ms_makecode.Text, pr_code.Text, "彩盒标", "0", out oErrorMessage))
+                if (!Print.CodeSoft(Tag.ToString(), ref lbl, PrintLabel.Text, PrintLabel.SelectedValue.ToString(), PrinterList.Text, sncode.Text, int.Parse(PrintNum.Text), ms_makecode.Text, pr_code.Text, "彩盒标", "0", out oErrorMessage))
                 {
                     OperateResult.AppendText(oErrorMessage + "\n", Color.Red);
                 }

+ 1 - 1
UAS-MES/FunctionCode/Make/Make_CustomLabelPrint.cs

@@ -274,7 +274,7 @@ namespace UAS_MES.Make
                 {
                     lbl.Quit();
                     lbl = new ApplicationClass();
-                    BaseUtil.WriteLbl(lbl);
+                    BaseUtil.WriteLbl();
                     dh.UpdateByCondition("label", "la_lastwritetime = to_date('" + PrintFile.LastWriteTime.ToString() + "', 'yyyy-mm-dd hh24:mi:ss') ", "la_id = '" + listA.Rows[PrintLabel.SelectedIndex]["la_id"].ToString() + "'");
                 }
                 doc = lbl.Documents.Open(listA.Rows[PrintLabel.SelectedIndex]["la_url"].ToString());

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

@@ -67,7 +67,7 @@ namespace UAS_MES.Make
             try
             {
                 lbl = new ApplicationClass();
-                BaseUtil.WriteLbl(lbl);
+                BaseUtil.WriteLbl();
             }
             catch (Exception ex)
             {
@@ -148,8 +148,8 @@ namespace UAS_MES.Make
                             }
                             OperateResult.AppendText("<<序列号:" + sncode.Text + "\n", Color.Black);
                             //按照打印张数打印
-                            doc = lbl.Documents.Open(PrintLabel.Text);
-                            if (Print.CodeSoft(Tag.ToString(), doc, PrintLabel.Text, PrintLabel.SelectedValue.ToString(), Printer.Text, sncode.Text, int.Parse(PrintNum.Text), oMakeCode, ma_prodcode.Text, "机身标", "0", out oErrorMessage))
+                            //doc = lbl.Documents.Open(PrintLabel.Text);
+                            if (Print.CodeSoft(Tag.ToString(), ref lbl, PrintLabel.Text, PrintLabel.SelectedValue.ToString(), Printer.Text, sncode.Text, int.Parse(PrintNum.Text), oMakeCode, ma_prodcode.Text, "机身标", "0", out oErrorMessage))
                             {
                                 //提示用户打印成功
                                 OperateResult.AppendText(">>序列号:" + sncode.Text + "打印成功\n", Color.Green);

+ 3 - 3
UAS-MES/FunctionCode/Make/Make_GetReMakeSN.cs

@@ -46,7 +46,7 @@ namespace UAS_MES.Make
             try
             {
                 lbl = new ApplicationClass();
-                BaseUtil.WriteLbl(lbl);
+                BaseUtil.WriteLbl();
             }
             catch (Exception ex)
             {
@@ -291,8 +291,8 @@ namespace UAS_MES.Make
                                     if (PrintLabel.Items.Count != 0)
                                     {
                                         OperateResult.AppendText(">>打印序列号" + sn_code.Text + "\n", Color.Black);
-                                        doc = lbl.Documents.Open(PrintLabel.Text);
-                                        if (!Print.CodeSoft(Tag.ToString(), doc, PrintLabel.Text, PrintLabel.SelectedValue.ToString(), PrinterList.Text, sn_code.Text, int.Parse(PrintNum.Text), ma_code.Text, pr_code.Text, "SN标签", "0", out ErrMessage))
+                                        //doc = lbl.Documents.Open(PrintLabel.Text);
+                                        if (!Print.CodeSoft(Tag.ToString(), ref lbl, PrintLabel.Text, PrintLabel.SelectedValue.ToString(), PrinterList.Text, sn_code.Text, int.Parse(PrintNum.Text), ma_code.Text, pr_code.Text, "SN标签", "0", out ErrMessage))
                                         {
                                             OperateResult.AppendText(ErrMessage + "\n", Color.Red);
                                             return;

+ 3 - 3
UAS-MES/FunctionCode/Make/Make_PackageCollection.cs

@@ -46,7 +46,7 @@ namespace UAS_MES.Make
             try
             {
                 lbl = new ApplicationClass();
-                BaseUtil.WriteLbl(lbl);
+                BaseUtil.WriteLbl();
             }
             catch (Exception ex)
             {
@@ -137,8 +137,8 @@ namespace UAS_MES.Make
                 if (dh.getFieldDataByCondition("package", "pa_status", "pa_outboxcode='" + pa_outboxcode.Text + "'").ToString() == "1")
                 {
                     dh.ExecuteSql("update package set pa_printcount=pa_printcount+1 where pa_outboxcode='" + pa_outboxcode.Text + "'", "update");
-                    doc = lbl.Documents.Open(PrintLabel.Text);
-                    if (Print.CodeSoft(Tag.ToString(), doc, 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))
+                    //doc = lbl.Documents.Open(PrintLabel.Text);
+                    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);
                     }

+ 3 - 3
UAS-MES/FunctionCode/Make/Make_PackageCollectionWeigh.cs

@@ -64,7 +64,7 @@ namespace UAS_MES.Make
             try
             {
                 lbl = new ApplicationClass();
-                BaseUtil.WriteLbl(lbl);
+                BaseUtil.WriteLbl();
             }
             catch (Exception ex)
             {
@@ -216,8 +216,8 @@ namespace UAS_MES.Make
                 if (dh.getFieldDataByCondition("package", "pa_status", "pa_outboxcode='" + pa_outboxcode.Text + "'").ToString() == "1")
                 {
                     dh.ExecuteSql("update package set pa_printcount=pa_printcount+1 where pa_outboxcode='" + pa_outboxcode.Text + "'", "update");
-                    doc = lbl.Documents.Open(PrintLabel.Text);
-                    if (Print.CodeSoft(Tag.ToString(), doc, 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))
+                    //doc = lbl.Documents.Open(PrintLabel.Text);
+                    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);
                     }

+ 3 - 3
UAS-MES/FunctionCode/Make/Make_PalletCollection.cs

@@ -54,7 +54,7 @@ namespace UAS_MES.Make
             try
             {
                 lbl = new ApplicationClass();
-                BaseUtil.WriteLbl(lbl);
+                BaseUtil.WriteLbl();
             }
             catch
             {
@@ -406,8 +406,8 @@ namespace UAS_MES.Make
                         pa_outboxcode.Focus();
                         pa_outboxcode.SelectAll();
                     }
-                    doc = lbl.Documents.Open(PrintLabel.Text);
-                    if (Print.CodeSoft(Tag.ToString(), doc, PrintLabel.Text, PrintLabel.SelectedValue.ToString(), PrinterList.Text, pa_outboxcode.Text, int.Parse(PrintNum.Text), pa_makecode.Text, pa_prodcode.Text, "栈板标", "0", out ErrorMessage))
+                    //doc = lbl.Documents.Open(PrintLabel.Text);
+                    if (Print.CodeSoft(Tag.ToString(), ref lbl, PrintLabel.Text, PrintLabel.SelectedValue.ToString(), PrinterList.Text, pa_outboxcode.Text, int.Parse(PrintNum.Text), pa_makecode.Text, pa_prodcode.Text, "栈板标", "0", out ErrorMessage))
                     {
                         OperateResult.AppendText(">>打印栈板" + pa_outboxcode.Text + "\n", Color.Black);
                     }

+ 3 - 3
UAS-MES/FunctionCode/Make/Make_PalletWeigh.cs

@@ -80,7 +80,7 @@ namespace UAS_MES.Make
             try
             {
                 lbl = new ApplicationClass();
-                BaseUtil.WriteLbl(lbl);
+                BaseUtil.WriteLbl();
             }
             catch (Exception ex)
             {
@@ -170,9 +170,9 @@ namespace UAS_MES.Make
                                     OperateResult.AppendText(">>产品:" + pa_prodcode.Text + "未维护栈板标签模板\n", Color.Red, palletcode);
                                     return;
                                 }
-                                doc = lbl.Documents.Open(PrintLabel.Text);
+                                //doc = lbl.Documents.Open(PrintLabel.Text);
                                 string ErrorMessage = "";
-                                if (Print.CodeSoft(Tag.ToString(), doc, PrintLabel.Text, PrintLabel.SelectedValue.ToString(), Printer.Text, palletcode.Text, int.Parse(PrintNum.Text), pa_makecode.Text, pa_prodcode.Text, "栈板标", "0", out ErrorMessage))
+                                if (Print.CodeSoft(Tag.ToString(), ref lbl, PrintLabel.Text, PrintLabel.SelectedValue.ToString(), Printer.Text, palletcode.Text, int.Parse(PrintNum.Text), pa_makecode.Text, pa_prodcode.Text, "栈板标", "0", out ErrorMessage))
                                 {
                                     //打印成功,请输入栈板号
                                     OperateResult.AppendText("<<打印成功\n", Color.Green);

+ 1 - 1
UAS-MES/FunctionCode/Make/Make_RePrintLabel.cs

@@ -74,7 +74,7 @@ namespace UAS_MES.Make
             try
             {
                 lbl = new ApplicationClass();
-                BaseUtil.WriteLbl(lbl);
+                BaseUtil.WriteLbl();
             }
             catch (Exception ex)
             {

+ 3 - 3
UAS-MES/FunctionCode/Make/Make_SpecialCartonPack.cs

@@ -59,7 +59,7 @@ namespace UAS_MES.Make
             try
             {
                 lbl = new ApplicationClass();
-                BaseUtil.WriteLbl(lbl);
+                BaseUtil.WriteLbl();
             }
             catch (Exception ex)
             {
@@ -191,8 +191,8 @@ namespace UAS_MES.Make
                 {
                     dh.ExecuteSql("update package set pa_printcount=pa_printcount+1 where pa_outboxcode='" + pa_outboxcode.Text + "'", "update");
                     OperateResult.AppendText(">>开始打印箱号" + pa_outboxcode.Text + "\n", Color.Black);
-                    doc = lbl.Documents.Open(PrintLabel.Text);
-                    if (!Print.CodeSoft(Tag.ToString(), doc, PrintLabel.Text, PrintLabel.SelectedValue.ToString(), PrintList.Text, pa_outboxcode.Text, int.Parse(PrintNum.Text), ms_makecode.Text, pr_code.Text, "卡通箱标", "0", out ErrorMessage))
+                    //doc = lbl.Documents.Open(PrintLabel.Text);
+                    if (!Print.CodeSoft(Tag.ToString(), ref lbl, PrintLabel.Text, PrintLabel.SelectedValue.ToString(), PrintList.Text, pa_outboxcode.Text, int.Parse(PrintNum.Text), ms_makecode.Text, pr_code.Text, "卡通箱标", "0", out ErrorMessage))
                     {
                         OperateResult.AppendText(ErrorMessage + "\n", Color.Red);
                     }

+ 1 - 1
UAS-MES/FunctionCode/SystemSetting/SystemSetting_LabelMaintain.cs

@@ -132,7 +132,7 @@ namespace UAS_MES.SystemSetting
             try
             {
                 lbl = new ApplicationClass();
-                BaseUtil.WriteLbl(lbl);
+                BaseUtil.WriteLbl();
             }
             catch (Exception ex)
             {

+ 1 - 1
UAS-MES/PublicMethod/Print.cs

@@ -156,7 +156,7 @@ namespace UAS_MES.PublicMethod
             {
                 lbl.Quit();
                 lbl = new ApplicationClass();
-                BaseUtil.WriteLbl(lbl);
+                BaseUtil.WriteLbl();
                 dh.UpdateByCondition("label", "la_lastwritetime = to_date('"+PrintFile.LastWriteTime.ToString()+"', 'yyyy-mm-dd hh24:mi:ss') ", "la_id = '"+ LaID + "'");
             }
             doc = lbl.Documents.Open(LabelName,true);