|
|
@ -88,6 +88,7 @@ namespace QMAPP.WinForm.Forms.TianJin |
|
|
|
|
|
|
|
PrintLabel(labels); |
|
|
|
|
|
|
|
InsertProduct(labeldata.OrderNo, MATERIAL_CODE, MATERIAL_NAME); |
|
|
|
} |
|
|
|
catch (Exception exception) |
|
|
|
{ |
|
|
@ -163,7 +164,69 @@ namespace QMAPP.WinForm.Forms.TianJin |
|
|
|
#endregion
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
///
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="ProductCode"></param>
|
|
|
|
/// <param name="Material_Code"></param>
|
|
|
|
public void InsertProduct(string ProductCode, string Material_Code, string prepare) |
|
|
|
{ |
|
|
|
#region 组成新增产品实例
|
|
|
|
Product newProduct = new Product(); |
|
|
|
|
|
|
|
newProduct.PID = Guid.NewGuid().ToString(); |
|
|
|
|
|
|
|
newProduct.PRODUCTTYPE = string.Empty; |
|
|
|
|
|
|
|
newProduct.PRODUCTCODE = ProductCode; |
|
|
|
|
|
|
|
newProduct.PRODUCTSOURCE = "0"; |
|
|
|
|
|
|
|
newProduct.MACHINENAME = "门板打印"; |
|
|
|
|
|
|
|
newProduct.MACHINECODDE = "门板打印"; |
|
|
|
|
|
|
|
newProduct.MATERIAL_CODE = Material_Code; |
|
|
|
|
|
|
|
newProduct.STATUS = "0"; |
|
|
|
|
|
|
|
newProduct.OUTFLAG = "0"; |
|
|
|
|
|
|
|
newProduct.CAPACITY = 1; |
|
|
|
|
|
|
|
newProduct.USINGCOUNT = 0; |
|
|
|
if (prepare.Contains("左")) |
|
|
|
{ |
|
|
|
newProduct.WORKCELL_CODE = "DP_L_PREPARE1"; |
|
|
|
|
|
|
|
newProduct.WORKLOC_CODE = "DP_L_PREPARELOC1"; |
|
|
|
} |
|
|
|
else if (prepare.Contains("右")) |
|
|
|
{ |
|
|
|
newProduct.WORKCELL_CODE = "DP_R_PREPARE1"; |
|
|
|
|
|
|
|
newProduct.WORKLOC_CODE = "DP_R_PREPARELOC1"; |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
newProduct.WORKCELL_CODE = "PREPARE1"; |
|
|
|
|
|
|
|
newProduct.WORKLOC_CODE = "DP_PREPARELOC1"; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
newProduct.WORKCENTER_CODE = "WORK770B"; |
|
|
|
|
|
|
|
newProduct.MATERIAL_TYPE = "DP_FINASSY"; |
|
|
|
|
|
|
|
newProduct.USINGSTATE = "0"; |
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
//新增
|
|
|
|
_agent.InvokeServiceFunction<DataResult<int>>("ProductBLL_Insert", newProduct); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public string GetNameCode(string Name) |
|
|
|
{ |
|
|
|