删除无用代码

This commit is contained in:
gongxh
2021-05-28 16:33:53 +08:00
parent 9b1b94ff21
commit f45796c09f
2 changed files with 7 additions and 9 deletions

View File

@@ -17,9 +17,6 @@ namespace NX.ERP.Model.Request
public int SourceDetailId { get; set; } public int SourceDetailId { get; set; }
} }

View File

@@ -20,8 +20,8 @@ namespace NX.ERP.U8.Store
{ {
//conn=new AccessViolationException //conn=new AccessViolationException
U8DbHelper u8DbHelper = new U8DbHelper(NX.ERP.U8.U8LoginContext.Instance.Constr); //U8DbHelper u8DbHelper = new U8DbHelper(NX.ERP.U8.U8LoginContext.Instance.Constr);
u8DbHelper.BeginTrans(); //u8DbHelper.BeginTrans();
try try
{ {
VoucherParameter voucherParameter = new VoucherParameter VoucherParameter voucherParameter = new VoucherParameter
@@ -29,7 +29,7 @@ namespace NX.ERP.U8.Store
VoucherType = this.VoucherID, VoucherType = this.VoucherID,
DomHead = new DOMDocumentClass(), DomHead = new DOMDocumentClass(),
DomBody = new DOMDocumentClass(), DomBody = new DOMDocumentClass(),
cnnFrom = u8DbHelper.Conn //cnnFrom = u8DbHelper.Conn
}; };
DOMDocument domHead = voucherParameter.DomHead; DOMDocument domHead = voucherParameter.DomHead;
DOMDocument domBody = voucherParameter.DomBody; DOMDocument domBody = voucherParameter.DomBody;
@@ -55,6 +55,7 @@ namespace NX.ERP.U8.Store
bodyXml.setAttribute("cinvcode", item.MaterialCode); bodyXml.setAttribute("cinvcode", item.MaterialCode);
bodyXml.setAttribute("iquantity", item.Qty); bodyXml.setAttribute("iquantity", item.Qty);
bodyXml.setAttribute("dduedate", item.Duedate); bodyXml.setAttribute("dduedate", item.Duedate);
bodyXml.setAttribute("ipesotype", 0);
if (param.source == "生产订单") if (param.source == "生产订单")
{ {
var detail = Order.Allocates.FirstOrDefault(m => m.AllocateId == item.SourceDetailId); var detail = Order.Allocates.FirstOrDefault(m => m.AllocateId == item.SourceDetailId);
@@ -79,17 +80,17 @@ namespace NX.ERP.U8.Store
} }
domHead.selectSingleNode("//rs:data").appendChild(headXml); domHead.selectSingleNode("//rs:data").appendChild(headXml);
var code = this.AddRdVoucher(voucherParameter); var code = this.AddRdVoucher(voucherParameter);
u8DbHelper.CommitTrans(); //u8DbHelper.CommitTrans();
return code; return code;
} }
catch (Exception err) catch (Exception err)
{ {
u8DbHelper.RollbackTrans(); //u8DbHelper.RollbackTrans();
throw err; throw err;
} }
finally finally
{ {
u8DbHelper.Dispose(); //u8DbHelper.Dispose();
} }