| | |
| | | |
| | | oCn.BeginTran(); |
| | | |
| | | ds = oCn.RunProcReturn($"select * from Sc_AssemblyBillMain where HMainSourceInterID={oBill.omodel.HProcExchInterID} and HMainSourceEntryID={oBill.omodel.HProcExchEntryID} and HBarCode_P='{HBardcode}'", "Sc_AssemblyBillMain"); |
| | | |
| | | if (ds.Tables[0].Rows.Count > 0) |
| | | { |
| | | oCn.RunProc($"delete from Sc_AssemblyBillMain where HMainSourceInterID={oBill.omodel.HProcExchInterID} and HMainSourceEntryID={oBill.omodel.HProcExchEntryID} and HBarCode_P='{HBardcode}'"); |
| | | oCn.RunProc($"delete from Sc_AssemblyBillMain where HInterID={ds.Tables[0].Rows[0]["HInterID"].ToString()} and HBarCode_P='{HBardcode}'"); |
| | | } |
| | | |
| | | oCn.RunProc("delete from Sc_StationOutBillSub_SN where HInterID=" + HInterID + " and HBarCode='" + HBardcode + "'"); |
| | | oCn.RunProc("update Sc_StationOutBillMain set HQty-=1 where HInterID=" + HInterID); |
| | | |
| | | |
| | | oCn.Commit(); |
| | | |