| | |
| | | //======================================== |
| | | ",HInnerBillNo='" + omodel.HInnerBillNo.ToString() +"'"+ |
| | | ",HEmpID=" + omodel.HEmpID.ToString() + |
| | | ",HBillOperationType='" + omodel.HBillOperationType + "'" + |
| | | " where HInterID=" + lngBillKey.ToString()); |
| | | //鍒犻櫎鍏宠仈 |
| | | DeleteRelation(ref sReturn, lngBillKey); |
| | |
| | | omodel.HInterID = lngBillKey; |
| | | foreach (Model.ClsSc_ProcExchWorkBackBillSub oSub in DetailColl) |
| | | { |
| | | if (oSub.HSourceInterID == 0) |
| | | { |
| | | oSub.HSourceInterID = omodel.HProcExchInterID; |
| | | } |
| | | |
| | | if (oSub.HSourceEntryID == 0) |
| | | { |
| | | oSub.HSourceEntryID = omodel.HProcExchEntryID; |
| | | } |
| | | |
| | | oCn.RunProc("Insert into Sc_ProcExchWorkBackBillSub (HInterID, HEntryID, HCloseMan, HEntryCloseDate, HCloseType" + |
| | | ", HRemark, HSourceInterID, HSourceEntryID, HSourceBillNo, HSourceBillType" + |
| | | ", HRelationQty, HRelationMoney, HBillNo_bak, HProcNo, HProcID" + |
| | | ", HWorkRemark, HCenterID, HDeptID, HSupID, HSupFlag" + |
| | | ", HQty, HICMOInterID, HICMOBillNo, HICMOEntryID)values(" + |
| | | $"{omodel.HInterID}, {oSub.HEntryID.ToString()}, '{oSub.HCloseMan.ToString()}', null, {(oSub.HCloseType == true ? 1 : 0)}" + |
| | | $",'{oSub.HRemark.ToString()}', {omodel.HProcExchInterID.ToString()},{omodel.HProcExchEntryID.ToString()}, '{omodel.HProcExchBillNo.ToString()}', '3772'" + |
| | | $",'{oSub.HRemark.ToString()}', {oSub.HSourceInterID},{oSub.HSourceEntryID}, '{omodel.HProcExchBillNo.ToString()}', '3772'" + |
| | | $",{oSub.HRelationQty.ToString()},{oSub.HRelationMoney.ToString()}, '{oSub.HBillNo_bak.ToString()}', '{oSub.HProcNo.ToString()}',{oSub.HProcID.ToString()}" + |
| | | $", '{oSub.HWorkRemark.ToString()}', {oSub.HCenterID.ToString()},{oSub.HDeptID.ToString()},{oSub.HSupID.ToString()},{(oSub.HSupFlag == true ? 1 : 0)}" + |
| | | $", {oSub.HQty.ToString()},{omodel.HICMOInterID},'{omodel.HICMOBillNo}',{omodel.HICMOEntryID}) "); |
| | |
| | | ", HICMOInterID, HICMOBillNo, HICMOEntryID, HProcExchInterID, HProcExchEntryID" + |
| | | ", HProcExchBillNo, HProcExchBegNO, HProcExchEndNO, HProcBegID, HProcEndID" + |
| | | ", HMaterID, HUnitID, HEmpID, HPlanQty, HQty" + |
| | | ", HExplanation, HInnerBillNo, HWorkShopID, HOrderProcNo, HPRDORGID) values(" + |
| | | ", HExplanation, HInnerBillNo, HWorkShopID, HOrderProcNo, HPRDORGID,HBillOperationType) values(" + |
| | | $"'{omodel.HBillType}','{omodel.HBillSubType}',{omodel.HInterID},'{omodel.HBillNo}','{omodel.HDate}',1" + |
| | | $",'{omodel.HMaker}','{omodel.HMakeDate}',{omodel.HYear},{omodel.HPeriod},'{omodel.HRemark}'" + |
| | | $",{omodel.HICMOInterID},'{omodel.HICMOBillNo}',{omodel.HICMOEntryID},{omodel.HProcExchInterID},{omodel.HProcExchEntryID}" + |
| | | $",'{omodel.HProcExchBillNo}',{omodel.HProcExchBegNO},{omodel.HProcExchEndNO},{omodel.HProcBegID},{omodel.HProcEndID}" + |
| | | $",{omodel.HMaterID},{omodel.HUnitID},{omodel.HEmpID},{omodel.HPlanQty},{omodel.HQty}" + |
| | | $",'{omodel.HExplanation}','{omodel.HInnerBillNo}',{omodel.HWorkShopID},'{omodel.HOrderProcNo}',{omodel.HPRDORGID})"); |
| | | $",'{omodel.HExplanation}','{omodel.HInnerBillNo}',{omodel.HWorkShopID},'{omodel.HOrderProcNo}',{omodel.HPRDORGID},'{omodel.HBillOperationType}')"); |
| | | //鎻掑叆瀛愯〃 |
| | | foreach (Model.ClsSc_ProcExchWorkBackBillSub oSub in DetailColl) |
| | | { |
| | | if (oSub.HSourceInterID == 0) |
| | | { |
| | | oSub.HSourceInterID = omodel.HProcExchInterID; |
| | | } |
| | | |
| | | if (oSub.HSourceEntryID == 0) |
| | | { |
| | | oSub.HSourceEntryID = omodel.HProcExchEntryID; |
| | | } |
| | | |
| | | oCn.RunProc("Insert into Sc_ProcExchWorkBackBillSub (HInterID, HEntryID, HCloseMan, HEntryCloseDate, HCloseType" + |
| | | ", HRemark, HSourceInterID, HSourceEntryID, HSourceBillNo, HSourceBillType" + |
| | | ", HRelationQty, HRelationMoney, HBillNo_bak, HProcNo, HProcID" + |
| | | ", HWorkRemark, HCenterID, HDeptID, HSupID, HSupFlag" + |
| | | ", HQty, HICMOInterID, HICMOBillNo, HICMOEntryID)values(" + |
| | | $"{omodel.HInterID}, {oSub.HEntryID.ToString()}, '{oSub.HCloseMan.ToString()}', null, {(oSub.HCloseType== true ? 1:0)}" + |
| | | $",'{oSub.HRemark.ToString()}', {omodel.HProcExchInterID.ToString()},{omodel.HProcExchEntryID.ToString()}, '{omodel.HProcExchBillNo.ToString()}', '3772'" + |
| | | $",'{oSub.HRemark.ToString()}', {oSub.HSourceInterID},{oSub.HSourceEntryID}, '{omodel.HProcExchBillNo.ToString()}', '3772'" + |
| | | $",{oSub.HRelationQty.ToString()},{oSub.HRelationMoney.ToString()}, '{oSub.HBillNo_bak.ToString()}', '{oSub.HProcNo.ToString()}',{oSub.HProcID.ToString()}" + |
| | | $", '{oSub.HWorkRemark.ToString()}', {oSub.HCenterID.ToString()},{oSub.HDeptID.ToString()},{oSub.HSupID.ToString()},{(oSub.HSupFlag== true?1:0)}" + |
| | | $", {oSub.HQty.ToString()},{omodel.HICMOInterID},'{omodel.HICMOBillNo}',{omodel.HICMOEntryID}) "); |