| | |
| | | ",HWWOrderInterID=" + omodel.HWWOrderInterID.ToString() + |
| | | ",HWWOrderEntryID=" + omodel.HWWOrderEntryID.ToString() + |
| | | ",HWWOrderBillNo='" + omodel.HWWOrderBillNo + "'" + |
| | | ",HICMOInterID=" + omodel.HICMOInterID.ToString() + |
| | | //",HICMOInterID=" + omodel.HICMOInterID.ToString() + |
| | | ",HICMOBillNo='" + omodel.HICMOBillNo + "'" + |
| | | ",HBatchNo='" + omodel.HBatchNo + "'" + |
| | | ",HMaterID2=" + omodel.HMaterID2.ToString() + |
| | |
| | | ",HMaterIDB='" + omodel.HMaterIDB + "'" + |
| | | ",HMaterIDC='" + omodel.HMaterIDC + "'" + |
| | | ",HMaterIDD='" + omodel.HMaterIDD + "'" + |
| | | ",HPicNumVer='" + omodel.HPicNumVer + "'" + |
| | | ",HPicNumAssemble='" + omodel.HPicNumAssemble + "'" + |
| | | ",HMaterTexture='" + omodel.HMaterTexture + "'" + |
| | | ",HProductNum='" + omodel.HProductNum + "'" + |
| | | ",HVerNum='" + omodel.HVerNum + "'" + |
| | | //å å
¥ç产类å |
| | | ",HWorkTypeNum='" + omodel.HWorkTypeNum + |
| | | "' where HInterID=" + lngBillKey.ToString()); |
| | | ",HWorkTypeNum='" + omodel.HWorkTypeNum + "'" + |
| | | " where HInterID=" + lngBillKey.ToString()); |
| | | //å é¤å
³è |
| | | DeleteRelation(ref sReturn, lngBillKey); |
| | | //å é¤å表 |
| | |
| | | oCn.RunProc("Insert into Sc_ProcessExchangeBillSub " + |
| | | " (HInterID,HEntryID,HBillNo_bak," + |
| | | "HCloseMan,HEntryCloseDate,HCloseType,HRemark," + |
| | | "HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney,HRelationQty_In,HRelationQty_Out,HRelationQty_WWOrder,HRelationQty_Bad," + |
| | | "HProcNo,HProcID,HProcNumber,HWorkRemark,HCenterID,HDeptID" + |
| | | ",HDeptNumber,HGroupID,HGroupNumber,HWorkerID,HWorkerNumber,HSourceID" + |
| | | ",HQty,HTimeUnit,HPlanWorkTimes,HPlanBeginDate,HPlanEndDate,HRelBeginDate" + |
| | | "HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType," + |
| | | "HRelationQty,HRelationMoney,HRelationQty_In," + |
| | | "HRelationQty_Out,HRelationQty_WWOrder,HRelationQty_Bad," + |
| | | "HProcNo,HProcID,HProcNumber,HWorkRemark," + |
| | | "HCenterID,HDeptID" + |
| | | ",HDeptNumber,HGroupID," + |
| | | "HGroupNumber,HWorkerID,HWorkerNumber,HSourceID" + |
| | | ",HQty,HTimeUnit,HPlanWorkTimes,HPlanBeginDate," + |
| | | "HPlanEndDate,HRelBeginDate" + |
| | | ",HRelEndDate,HReadyTime,HQueueTime,HMoveTime,HBeginDayQty,HBeginFixQty" + |
| | | ",HFixWorkDays,HTrunWorkDays,HReadyTimes,HMyWorkDays,HOutPrice,HOutMoney,HPassRate" + |
| | | ",HLastProc,HKeyProc,HFstProc,HICMOInterID,HICMOBillNo,HWWOrderInterID,HWWOrderEntryID,HWWOrderBillNo,HReportQty,HBackProc" + |
| | | ",HFixWorkDays,HTrunWorkDays,HReadyTimes," + |
| | | "HMyWorkDays,HOutPrice,HOutMoney,HPassRate" + |
| | | ",HLastProc,HKeyProc,HFstProc,HICMOInterID,HICMOBillNo,HWWOrderInterID," + |
| | | "HWWOrderEntryID,HWWOrderBillNo,HReportQty,HBackProc" + |
| | | ",HSupID,HSupFlag,HOverRate,HMaxQty,HTechnologyParameter,HProcCheckNote,HPicNum" + |
| | | ",HMouldNo,HProcWorkNum" + |
| | | ") values(" |
| | | + omodel.HInterID.ToString() + "," + oSub.HEntryID.ToString() + ",'" + omodel.HBillNo + "'" + |
| | | ",'" + oSub.HCloseMan + "','" + oSub.HEntryCloseDate + "'," + Convert.ToString(oSub.HCloseType ? 1 : 0) + ",'" + oSub.HRemark + "'" + |
| | | "," + oSub.HSourceInterID.ToString() + "," + oSub.HSourceEntryID.ToString() + ",'" + oSub.HSourceBillNo + "','" + oSub.HSourceBillType + "'," + oSub.HRelationQty.ToString() + "," + oSub.HRelationMoney.ToString() + "," + oSub.HRelationQty_In.ToString() + "," + oSub.HRelationQty_Out.ToString() + "," + oSub.HRelationQty_WWOrder.ToString() + "," + oSub.HRelationQty_Bad.ToString() + |
| | | "," + oSub.HSourceInterID.ToString() + "," + oSub.HSourceEntryID.ToString() + ",'" + oSub.HSourceBillNo + "','" + oSub.HSourceBillType + "'," |
| | | + oSub.HRelationQty.ToString() + "," + oSub.HRelationMoney.ToString() + "," + oSub.HRelationQty_In.ToString() + "," |
| | | + oSub.HRelationQty_Out.ToString() + "," + oSub.HRelationQty_WWOrder.ToString() + "," + oSub.HRelationQty_Bad.ToString() + |
| | | "," + oSub.HProcNo.ToString() + "," + oSub.HProcID.ToString() + ",'" + oSub.HProcNumber + "','" + oSub.HWorkRemark + "'" + |
| | | "," + oSub.HCenterID.ToString() + "," + oSub.HDeptID.ToString() + ",'" + oSub.HDeptNumber + "'," + oSub.HGroupID.ToString() + |
| | | ",'" + oSub.HGroupNumber + "'," + oSub.HWorkerID.ToString() + ",'" + oSub.HWorkerNumber + "'," + oSub.HSourceID.ToString() + |
| | |
| | | ",'" + oSub.HKeyProc + "','" + oSub.HFstProc + "'," + oSub.HICMOInterID.ToString() + ",'" + oSub.HICMOBillNo + "'," + oSub.HWWOrderInterID.ToString() + |
| | | "," + oSub.HWWOrderEntryID.ToString() + ",'" + oSub.HWWOrderBillNo + "'," + oSub.HReportQty.ToString() + "," + Convert.ToString(oSub.HBackProc ? 1 : 0) + |
| | | "," + oSub.HSupID.ToString() + "," + Convert.ToString(oSub.HSupFlag ? 1 : 0) + "," + oSub.HOverRate.ToString() + "," + oSub.HMaxQty.ToString() + ",'" + oSub.HTechnologyParameter + "','" + oSub.HProcCheckNote + "','" + oSub.HPicNum + "'" + |
| | | ",'" + oSub.HMouldNo.ToString() + "','" + oSub.HProcWorkNum.ToString() + "'" + |
| | | ") "); |
| | | } |
| | | // |
| | |
| | | ",HProdMaterName,HCusName,HWorkRemark,HImportNote,HMaterNumber_A" + |
| | | ",HMaterNumber_B,HMaterNumber_C,HMaterNumber_D,HProdType,HMaterShortName" + |
| | | ",HMaterIDA,HMaterIDB,HMaterIDC,HMaterIDD,HICMOEntryID" + |
| | | ",HPicNumVer,HPicNumAssemble,HMaterTexture,HProductNum,HVerNum" + |
| | | ") " + |
| | | " values('" + this.BillType + "','" + this.HBillSubType + "'," + omodel.HInterID.ToString() + ",'" + omodel.HBillNo + "','" + omodel.HDate + "','" + omodel.HMaker + "',getdate()," + "" + (omodel.HPrevMainSourceInterID == 0 ? omodel.HInterID : omodel.HPrevMainSourceInterID) + |
| | | "," + omodel.HYear.ToString() + "," + omodel.HPeriod.ToString() + ",'" + omodel.HRemark + "','" + omodel.HBatchNo + "'," + omodel.HMainMaterID.ToString() + "," + omodel.HKeyMaterID.ToString() + "," + omodel.HNo.ToString() + ",'" + omodel.HOrderProcNO + "'" + |
| | |
| | | ",'" + omodel.HProdMaterName + "','" + omodel.HCusName + "','" + omodel.HWorkRemark + "','" + omodel.HImportNote + "','" + omodel.HMaterNumber_A + "'" + |
| | | ",'" + omodel.HMaterNumber_B + "','" + omodel.HMaterNumber_C + "','" + omodel.HMaterNumber_D + "','" + omodel.HProdType + "','" + omodel.HMaterShortName + "'" + |
| | | ",'" + omodel.HMaterIDA + "','" + omodel.HMaterIDB + "','" + omodel.HMaterIDC + "','" + omodel.HMaterIDD + "'," + omodel.HICMOEntryID + |
| | | ",'" + omodel.HPicNumVer + "','" + omodel.HPicNumAssemble + "','" + omodel.HMaterTexture + "','" + omodel.HProductNum + "','" + omodel.HVerNum + "'" + |
| | | ") "); |
| | | //æå
¥å表 |
| | | foreach (Model.ClsSc_ProcessExchangeBillSub oSub in DetailColl) |
| | | { |
| | | |
| | | string HInterID = omodel.HInterID.ToString(); |
| | | string HEntryID = oSub.HEntryID.ToString(); |
| | | string HBillNo = omodel.HBillNo; |
| | | string HCloseMan = oSub.HCloseMan; |
| | | string HEntryCloseDate = oSub.HEntryCloseDate.ToString(); |
| | | string HCloseType = Convert.ToString(oSub.HCloseType ? 1 : 0); |
| | | string HRemark = oSub.HRemark; |
| | | string HSourceInterID = oSub.HSourceInterID.ToString(); |
| | | string HSourceEntryID = oSub.HSourceEntryID.ToString(); |
| | | string HSourceBillNo = oSub.HSourceBillNo; |
| | | string HSourceBillType = oSub.HSourceBillType; |
| | | string HRelationQty = oSub.HRelationQty.ToString(); |
| | | string HRelationMoney = oSub.HRelationMoney.ToString(); |
| | | string HProcNo = oSub.HProcNo.ToString(); |
| | | string HProcID = oSub.HProcID.ToString(); |
| | | string HProcNumber = oSub.HProcNumber; |
| | | string HWorkRemark = oSub.HWorkRemark; |
| | | string HCenterID = oSub.HCenterID.ToString(); |
| | | string HDeptID = oSub.HDeptID.ToString(); |
| | | string HDeptNumber = oSub.HDeptNumber; |
| | | string HGroupID = oSub.HGroupID.ToString(); |
| | | string HGroupNumber = oSub.HGroupNumber; |
| | | string HWorkerID = oSub.HWorkerID.ToString(); |
| | | string HWorkerNumber = oSub.HWorkerNumber; |
| | | string HSourceID = oSub.HSourceID.ToString(); |
| | | string HQty = oSub.HQty.ToString(); |
| | | string HTimeUnit = oSub.HTimeUnit; |
| | | string HPlanWorkTimes = oSub.HPlanWorkTimes.ToString(); |
| | | string HPlanBeginDate = oSub.HPlanBeginDate.ToShortDateString(); |
| | | string HPlanEndDate = oSub.HPlanEndDate.ToShortDateString(); |
| | | string HRelBeginDate = oSub.HRelBeginDate.ToShortDateString(); |
| | | string HRelEndDate = oSub.HRelEndDate.ToShortDateString(); |
| | | string HReadyTime = oSub.HReadyTime.ToString(); |
| | | string HQueueTime = oSub.HQueueTime.ToString(); |
| | | string HMoveTime = oSub.HMoveTime.ToString(); |
| | | string HBeginDayQty = oSub.HBeginDayQty.ToString(); |
| | | string HBeginFixQty = oSub.HBeginFixQty.ToString(); |
| | | string HFixWorkDays = oSub.HFixWorkDays.ToString(); |
| | | string HTrunWorkDays = oSub.HTrunWorkDays.ToString(); |
| | | string HReadyTimes = oSub.HReadyTimes.ToString(); |
| | | string HMyWorkDays = oSub.HMyWorkDays.ToString(); |
| | | string HOutPrice = oSub.HOutPrice.ToString(); |
| | | string HOutMoney = oSub.HOutMoney.ToString(); |
| | | string HPassRate = oSub.HPassRate.ToString(); |
| | | string HLastProc = oSub.HLastProc; |
| | | string HKeyProc = oSub.HKeyProc; |
| | | string HFstProc = oSub.HFstProc; |
| | | string HICMOInterID = oSub.HICMOInterID.ToString(); |
| | | string HICMOBillNo = oSub.HICMOBillNo; |
| | | string HWWOrderInterID = oSub.HWWOrderInterID.ToString(); |
| | | string HWWOrderEntryID = oSub.HWWOrderEntryID.ToString(); |
| | | string HWWOrderBillNo = oSub.HWWOrderBillNo; |
| | | string HReportQty = oSub.HReportQty.ToString(); |
| | | string HBackProc = Convert.ToString(oSub.HBackProc ? 1 : 0); |
| | | string HSupID = oSub.HSupID.ToString(); |
| | | string HSupFlag = Convert.ToString(oSub.HSupFlag ? 1 : 0); |
| | | string HOverRate = oSub.HOverRate.ToString(); |
| | | string HMaxQty = oSub.HMaxQty.ToString(); |
| | | string HTechnologyParameter = oSub.HTechnologyParameter; |
| | | string HProcCheckNote = oSub.HProcCheckNote; |
| | | string HPicNum = oSub.HPicNum; |
| | | string HMouldNo = oSub.HMouldNo.ToString(); |
| | | string HProcWorkNum = oSub.HProcWorkNum.ToString(); |
| | | |
| | | oCn.RunProc("Insert into Sc_ProcessExchangeBillSub " + |
| | | " (HInterID,HEntryID,HBillNo_bak," + |
| | | "HCloseMan,HEntryCloseDate,HCloseType,HRemark," + |
| | |
| | | ",HFixWorkDays,HTrunWorkDays,HReadyTimes,HMyWorkDays,HOutPrice,HOutMoney,HPassRate" + |
| | | ",HLastProc,HKeyProc,HFstProc,HICMOInterID,HICMOBillNo,HWWOrderInterID,HWWOrderEntryID,HWWOrderBillNo,HReportQty,HBackProc" + |
| | | ",HSupID,HSupFlag,HOverRate,HMaxQty,HTechnologyParameter,HProcCheckNote,HPicNum" + |
| | | ",HMouldNo,HProcWorkNum" + |
| | | ") values(" |
| | | + omodel.HInterID.ToString() + "," + oSub.HEntryID.ToString() + ",'" + omodel.HBillNo + "'" + |
| | | ",'" + oSub.HCloseMan + "','" + oSub.HEntryCloseDate + "'," + Convert.ToString(oSub.HCloseType ? 1 : 0) + ",'" + oSub.HRemark + "'" + |
| | |
| | | ",'" + oSub.HKeyProc + "','" + oSub.HFstProc + "'," + oSub.HICMOInterID.ToString() + ",'" + oSub.HICMOBillNo + "'," + oSub.HWWOrderInterID.ToString() + |
| | | "," + oSub.HWWOrderEntryID.ToString() + ",'" + oSub.HWWOrderBillNo + "'," + oSub.HReportQty.ToString() + "," + Convert.ToString(oSub.HBackProc ? 1 : 0) + |
| | | "," + oSub.HSupID.ToString() + "," + Convert.ToString(oSub.HSupFlag ? 1 : 0) + "," + oSub.HOverRate.ToString() + "," + oSub.HMaxQty.ToString() + ",'" + oSub.HTechnologyParameter + "','" + oSub.HProcCheckNote + "','"+ oSub.HPicNum + "'" + |
| | | ",'" + oSub.HMouldNo.ToString() + "','" + oSub.HProcWorkNum.ToString() + "'" + |
| | | ") "); |
| | | //æ´æ°æéæµè½¬å¡æ°é |
| | | if (!oSub.HBackProc) |
| | |
| | | omodel.HWWOrderEntryID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HWWOrderEntryID"]); |
| | | omodel.HWWOrderBillNo = Ds.Tables[0].Rows[0]["HWWOrderBillNo"].ToString().Trim(); |
| | | omodel.HICMOInterID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HICMOInterID"]); |
| | | omodel.HICMOEntryID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HICMOEntryID"]); |
| | | omodel.HICMOBillNo = Ds.Tables[0].Rows[0]["HICMOBillNo"].ToString().Trim(); |
| | | omodel.HBatchNo = Ds.Tables[0].Rows[0]["HBatchNo"].ToString().Trim(); |
| | | omodel.HMaterID2 = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HMaterID2"]); |
| | |
| | | omodel.HWWOrderEntryID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HWWOrderEntryID"]); |
| | | omodel.HWWOrderBillNo = Ds.Tables[0].Rows[0]["HWWOrderBillNo"].ToString().Trim(); |
| | | omodel.HICMOInterID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HICMOInterID"]); |
| | | omodel.HICMOEntryID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HICMOEntryID"]); |
| | | omodel.HICMOBillNo = Ds.Tables[0].Rows[0]["HICMOBillNo"].ToString().Trim(); |
| | | omodel.HBatchNo = Ds.Tables[0].Rows[0]["HBatchNo"].ToString().Trim(); |
| | | omodel.HMaterID2 = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HMaterID2"]); |
| | |
| | | omodel.HPicNumAssemble = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HPicNumAssemble"]); |
| | | omodel.HMaterTexture = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HMaterTexture"]); |
| | | omodel.HVerNum = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HVerNum"]); |
| | | omodel.HProductNum = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HProductNum"]); |
| | | //å¾ªç¯ |
| | | DataSet DsSub; |
| | | if (bBack) |
| | |
| | | omodel.HWWOrderEntryID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HWWOrderEntryID"]); |
| | | omodel.HWWOrderBillNo = Ds.Tables[0].Rows[0]["HWWOrderBillNo"].ToString().Trim(); |
| | | omodel.HICMOInterID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HICMOInterID"]); |
| | | omodel.HICMOEntryID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HICMOEntryID"]); |
| | | omodel.HICMOBillNo = Ds.Tables[0].Rows[0]["HICMOBillNo"].ToString().Trim(); |
| | | omodel.HBatchNo = Ds.Tables[0].Rows[0]["HBatchNo"].ToString().Trim(); |
| | | omodel.HMaterID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HMaterID"]); |