|
@@ -261,12 +261,22 @@ namespace UAS_LabelMachine
|
|
|
{
|
|
|
try
|
|
|
{
|
|
|
- lbl = new ApplicationClass();
|
|
|
+ engine = new Engine(true);
|
|
|
+ PrintMethod = "BarTender";
|
|
|
}
|
|
|
- catch (Exception)
|
|
|
+ catch (Exception ex)
|
|
|
{
|
|
|
- MessageBox.Show("未安装CodeSoft软件或者版本不正确");
|
|
|
+ MessageLog.AppendText(ex.Message + ex.StackTrace);
|
|
|
+
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
}
|
|
|
else
|
|
|
{
|
|
@@ -289,6 +299,8 @@ namespace UAS_LabelMachine
|
|
|
|
|
|
private void Sg_code_DbChange(object sender, EventArgs e)
|
|
|
{
|
|
|
+ Form f = Form.ActiveForm;
|
|
|
+
|
|
|
DataTable dt = sg_code.ReturnData;
|
|
|
BaseUtil.SetFormValue(this.Controls, dt);
|
|
|
}
|
|
@@ -1188,7 +1200,7 @@ namespace UAS_LabelMachine
|
|
|
|
|
|
if (dh.GetConfig("AutoBarcode", "ProdInOut!Sale").ToString() != "")
|
|
|
{
|
|
|
- string[] param = new string[] { PI_ID, "", "" };
|
|
|
+ string[] param = new string[] { PI_ID, ""};
|
|
|
dh.CallProcedure("GetCustBarcode", ref param);
|
|
|
}
|
|
|
if (dh.GetConfig("PassOrNeg", "FTPModel").ToString() != "Y")
|
|
@@ -2124,20 +2136,7 @@ namespace UAS_LabelMachine
|
|
|
MidDoc.Close();
|
|
|
if (MidFormat != null)
|
|
|
MidFormat.Close(SaveOptions.DoNotSaveChanges);
|
|
|
- if (MidLabelCombox.Text != "" && MidLabelCombox.SelectedValue != null && !GetGridOnly.Checked)
|
|
|
- {
|
|
|
- System.DateTime time = Convert.ToDateTime(MidLabelCombox.SelectedValue.ToString().Split('#')[2]);
|
|
|
- if (PrintMethod == "CodeSoft")
|
|
|
- {
|
|
|
- MidDoc = lbl.Documents.Open(BaseUtil.GetLabelUrl(MidLabelCombox.SelectedValue.ToString().Split('#')[1], MidLabelCombox.Text, time));
|
|
|
- MidDoc.Printer.Name = MidLabelPrinter.Text;
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- MidFormat = engine.Documents.Open(BaseUtil.GetLabelUrl(MidLabelCombox.SelectedValue.ToString().Split('#')[1], MidLabelCombox.Text, time));
|
|
|
- MidFormat.PrintSetup.PrinterName = MidLabelPrinter.Text;
|
|
|
- }
|
|
|
- }
|
|
|
+ MidFormat = engine.Documents.Open(ftpOperater.DownLoadTo + MidLabelCombox.Text);
|
|
|
}
|
|
|
}
|
|
|
catch (Exception) { }
|