| | |
| | | "', HWorkCenterID = '" + omodel.HWorkCenterID + |
| | | "', HEquipID = '" + omodel.HEquipID + |
| | | "', HOrgID = '" + omodel.HOrgID + |
| | | "' where HInterID = " + omodel.HInterID; |
| | | "', HProcID = " + omodel.HProcID + |
| | | " where HInterID = " + omodel.HInterID; |
| | | |
| | | oCn.RunProc(mainSql); |
| | | //删除关联 |
| | |
| | | "" + |
| | | "" + |
| | | "(HInterID,HEntryID,HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType" + |
| | | ",HMouldID,HQty,HMouldQty,HRate) " + |
| | | ",HMouldID,HQty,HMouldQty,HRate,HMouldType,HMouldPriority,HCubicleQty) " + |
| | | " values(" + |
| | | "" + omodel.HInterID.ToString() + |
| | | "," + oSub.HEntryID.ToString() + |
| | |
| | | "','" + oSub.HMouldID + |
| | | "'," + oSub.HQty + |
| | | "," + oSub.HMouldQty + |
| | | ",'" + oSub.HRate + |
| | | "')"; |
| | | ",'" + oSub.HRate + |
| | | "','" + oSub.HMouldType + |
| | | "','" + oSub.HMouldPriority + |
| | | "'," + oSub.HCubicleQty + |
| | | ")"; |
| | | oCn.RunProc(subSql); |
| | | } |
| | | |
| | |
| | | //插入主表 |
| | | string mainSql = "insert into Gy_MaterialMouldBillMain" + |
| | | "(HYear,HPeriod,HBillType,HBillSubType,HInterID,HDate,HBillNo,HRemark,HMaker,HMakeDate" + |
| | | ",HDeptID,HEmpID,HMaterID,HWorkCenterID,HEquipID,HOrgID ) " + |
| | | ",HDeptID,HEmpID,HMaterID,HWorkCenterID,HEquipID,HOrgID,HProcID) " + |
| | | "values(" + |
| | | "" + omodel.HYear.ToString() + |
| | | "," + omodel.HPeriod.ToString() + |
| | |
| | | ",'" + omodel.HMaterID + |
| | | "','" + omodel.HWorkCenterID + |
| | | "','" + omodel.HEquipID + |
| | | "','" + omodel.HOrgID + |
| | | "')"; |
| | | "','" + omodel.HOrgID + |
| | | "'," + omodel.HProcID + |
| | | ")"; |
| | | |
| | | oCn.RunProc(mainSql); |
| | | |
| | |
| | | "" + |
| | | "" + |
| | | "(HInterID,HEntryID,HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType" + |
| | | ",HMouldID,HQty,HMouldQty,HRate) " + |
| | | ",HMouldID,HQty,HMouldQty,HRate,HMouldType,HMouldPriority,HCubicleQty) " + |
| | | " values(" + |
| | | "" + omodel.HInterID.ToString() + |
| | | "," + oSub.HEntryID.ToString() + |
| | |
| | | "'," + oSub.HQty + |
| | | "," + oSub.HMouldQty + |
| | | ",'" + oSub.HRate + |
| | | "')"; |
| | | "','" + oSub.HMouldType + |
| | | "','" + oSub.HMouldPriority + |
| | | "'," + oSub.HCubicleQty + |
| | | ")"; |
| | | oCn.RunProc(subSql); |
| | | } |
| | | sReturn = "新增单据成功!"; |