|
|
@ -106,9 +106,16 @@ namespace QMAPP.WinForm.Forms.Injection |
|
|
|
int i = 1; |
|
|
|
//DataResult<List<PrintCode>> resultList = _agent.InvokeServiceFunction<DataResult<List<PrintCode>>>("MainOperationBLL_GetPrintCodeForChengdu", materialListInfo, model, i);
|
|
|
|
var machine = comMachine.SelectedItem as MachineInfo; |
|
|
|
DataResult<List<PrintCode>> resultList = _agent.InvokeServiceFunction<DataResult<List<PrintCode>>>("MainOperationBLL_GetPrintCodeWithParam", materialListInfo, machine, model, "", new Dictionary<string,string>()); |
|
|
|
DataResult<List<PrintCode>> resultList = _agent.InvokeServiceFunction<DataResult<List<PrintCode>>>("MainOperationBLL_GetPrintCodeWithParam", materialListInfo, machine, model, "", new Dictionary<string, string>()); |
|
|
|
try |
|
|
|
{ |
|
|
|
Print(resultList.Result, true); |
|
|
|
} |
|
|
|
catch (Exception e) |
|
|
|
{ |
|
|
|
var ss = e.Message; |
|
|
|
} |
|
|
|
|
|
|
|
Print(resultList.Result, true); |
|
|
|
} |
|
|
|
|
|
|
|
private void CodeCreatePrint(string header, string datarow, char[] dataSeparator) |
|
|
@ -216,41 +223,68 @@ namespace QMAPP.WinForm.Forms.Injection |
|
|
|
} |
|
|
|
} |
|
|
|
fr.Load(string.Format("{0}\\{1}.frx", path, typeTem)); |
|
|
|
if (cbTemplateDesign.Enabled && cbTemplateDesign.Checked) |
|
|
|
{ |
|
|
|
fr.Design(true); |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
fr.PrintSettings.ShowDialog = false; |
|
|
|
fr.Print(); |
|
|
|
|
|
|
|
#region 张松男20210802 修改 增加新版注塑投料条码绑定
|
|
|
|
|
|
|
|
foreach (var la in labels) |
|
|
|
|
|
|
|
if (cbTemplateDesign.Enabled && cbTemplateDesign.Checked) |
|
|
|
{ |
|
|
|
try |
|
|
|
{ |
|
|
|
fr.Design(true); |
|
|
|
} |
|
|
|
catch (Exception e) |
|
|
|
{ |
|
|
|
var ss = e.Message; |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
var material_T = new BucketMaterialClass() { MaterialCode = la.MaterialCode }; |
|
|
|
var List = _agent.InvokeServiceFunction<List<RawMaterial>>(B9BasicService.RawMaterialBLL_GetListTo.ToString(), material_T); |
|
|
|
try |
|
|
|
{ |
|
|
|
fr.PrintSettings.ShowDialog = false; |
|
|
|
fr.Print(); |
|
|
|
} |
|
|
|
catch (Exception e) |
|
|
|
{ |
|
|
|
var ss = e.Message; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (List != null && List.Count > 0) |
|
|
|
#region 张松男20210802 修改 增加新版注塑投料条码绑定
|
|
|
|
|
|
|
|
foreach (var la in labels) |
|
|
|
{ |
|
|
|
foreach (var raw in List) |
|
|
|
var material_T = new BucketMaterialClass() { MaterialCode = la.MaterialCode }; |
|
|
|
var List = _agent.InvokeServiceFunction<List<RawMaterial>>(B9BasicService.RawMaterialBLL_GetListTo.ToString(), material_T); |
|
|
|
|
|
|
|
if (List != null && List.Count > 0) |
|
|
|
{ |
|
|
|
var record = new RawMaterialRecord(); |
|
|
|
record.MaterialCode = la.MaterialCode; |
|
|
|
record.MaterialName = la.MaterialName; |
|
|
|
record.ProductCode = la.SerialNumber; |
|
|
|
record.RawMaterialPID = raw.PID; |
|
|
|
record.MachineCode = la.MachineCode; |
|
|
|
_agent.InvokeServiceFunction<DataResult<int>>(B9BasicService.RawMaterialRecordBLL_Insert.ToString(), record); |
|
|
|
foreach (var raw in List) |
|
|
|
{ |
|
|
|
var record = new RawMaterialRecord(); |
|
|
|
record.MaterialCode = la.MaterialCode; |
|
|
|
record.MaterialName = la.MaterialName; |
|
|
|
record.ProductCode = la.SerialNumber; |
|
|
|
record.RawMaterialPID = raw.PID; |
|
|
|
record.MachineCode = la.MachineCode; |
|
|
|
_agent.InvokeServiceFunction<DataResult<int>>(B9BasicService.RawMaterialRecordBLL_Insert.ToString(), record); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
} |
|
|
|
try |
|
|
|
{ |
|
|
|
fr.Dispose(); |
|
|
|
} |
|
|
|
catch (Exception e) |
|
|
|
{ |
|
|
|
var ss = e.Message; |
|
|
|
} |
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
} |
|
|
|
fr.Dispose(); |
|
|
|
|
|
|
|
|
|
|
|
//QM.Assist.PrintUtil pu = new QM.Assist.PrintUtil();
|
|
|
|
//pu.PrintLabel2(System.Configuration.ConfigurationManager.AppSettings["proPath"].ToString
|
|
|
|