| | |
| | | oCn.BeginTran(); |
| | | //æ´æ°ä¸»è¡¨ |
| | | oCn.RunProc("UpDate Gy_RoutingBillMain set " + |
| | | ",HPRDORGID=" + omodel.HPRDORGID.ToString() + |
| | | " HName='" + omodel.HName + "'" + |
| | | " HPRDORGID=" + omodel.HORGID.ToString() + |
| | | ",HName='" + omodel.HName + "'" + |
| | | ",HBillNo='" + omodel.HBillNo + "'" + |
| | | ",HMaterTypeID=" + omodel.HMaterTypeID.ToString() + |
| | | ",HMaterID=" + omodel.HMaterID.ToString() + |
| | |
| | | ",HDate='" + omodel.HDate + "'" + |
| | | ",HYear=" + omodel.HYear.ToString() + "" + |
| | | ",HPeriod=" + omodel.HPeriod.ToString() + "" + |
| | | ",HUpDater='" + omodel.HUpDater + "'" + |
| | | ",HUpDateDate='" + omodel.HUpDateDate + "'" + |
| | | ",HRemark='" + omodel.HRemark + "'" + |
| | | ",HUpDater='" + DBUtility.ClsPub.CurUserName + "'" + |
| | | ",HUpDateDate=getdate()" + |
| | | |
| | | ",HMainGroupID=" + omodel.HMainGroupID.ToString() + |
| | | ",HMainProcID=" + omodel.HMainProcID.ToString() + |
| | | ",HMainCenterID=" + omodel.HMainCenterID.ToString() + |
| | | ",HMainTimeUnit='" + omodel.HMainTimeUnit.ToString() + "'" + |
| | | ",HMainTimeUnit='" + omodel.HMainTimeUnit + "'" + |
| | | ",HMainUnitTime=" + omodel.HMainUnitTime.ToString() + |
| | | ",HMainWorkQty=" + omodel.HMainWorkQty.ToString() + |
| | | ",HMainPrice=" + omodel.HMainPrice.ToString() + |
| | | ",HStdSourceQty=" + omodel.HStdSourceQty.ToString() + |
| | | ",HAddSourceRate=" + omodel.HAddSourceRate.ToString() + |
| | | ",HDelSourceRate=" + omodel.HDelSourceRate.ToString() + |
| | | ",HPicNumVer='" + omodel.HPicNumVer.ToString() + "'" + |
| | | ",HPicNumAssemble='" + omodel.HPicNumAssemble.ToString() + "'" + |
| | | ",HMaterTexture='" + omodel.HMaterTexture.ToString() + "'" + |
| | | ",HProductNum='" + omodel.HProductNum.ToString() + "'" + |
| | | ",HVerNum='" + omodel.HVerNum.ToString() + "'" + |
| | | ",HPicNumVer='" + omodel.HPicNumVer + "'" + |
| | | ",HPicNumAssemble='" + omodel.HPicNumAssemble + "'" + |
| | | ",HMaterTexture='" + omodel.HMaterTexture + "'" + |
| | | ",HProductNum='" + omodel.HProductNum + "'" + |
| | | ",HVerNum='" + omodel.HVerNum + "'" + |
| | | ",HORGID=" + omodel.HORGID.ToString() + |
| | | |
| | | " where HInterID=" + lngBillKey.ToString()); |
| | | //å é¤å
³è |
| | |
| | | ",HProcID_S,HCenterID_S,HWorkQty_S,HSubStdEmpQty_S,HMouldNo,HChangeMould" + |
| | | ",HPackStd,HPack,HPutArea,HMyWorkDays,HMyFixWorkDays,HPassRate" + |
| | | ",HTechnologyParameter,HPicNum,HProcCheckNote" + |
| | | ",HOverRate" + |
| | | ",HOverRate,HWorkTimes_S,HSNCtrl" + |
| | | ") values(" |
| | | + omodel.HInterID.ToString() + "," + oSub.HEntryID.ToString() + "," + oSub.HProcID.ToString() + "," + oSub.HProcNo.ToString() + "," + oSub.HSupID.ToString() + "," + Convert.ToString(oSub.HSupFlag ? 1 : 0) + "" + |
| | | "," + oSub.HWorkQty.ToString() + "," + oSub.HCenterID.ToString() + ",'" + oSub.HTimeUnit.ToString() + "'," + oSub.HUnitTime.ToString() + |
| | |
| | | "," + oSub.HProcID_S.ToString() + "," + oSub.HCenterID_S.ToString() + "," + oSub.HWorkQty_S.ToString() + "," + oSub.HSubStdEmpQty_S.ToString() + ",'" + oSub.HMouldNo + "'," + oSub.HChangeMould.ToString() + |
| | | ",'" + oSub.HPackStd + "','" + oSub.HPack + "','" + oSub.HPutArea + "'," + oSub.HMyWorkDays.ToString() + "," + oSub.HMyFixWorkDays.ToString() + "," + oSub.HPassRate.ToString() + |
| | | ",'" + oSub.HTechnologyParameter.ToString() + "','" + oSub.HPicNum.ToString() + "','" + oSub.HProcCheckNote.ToString() + |
| | | "', " + oSub.HOverRate.ToString() + |
| | | "', " + oSub.HOverRate.ToString() + "," + oSub.HWorkTimes_S.ToString() + "," + Convert.ToString(oSub.HSNCtrl ? 1 : 0) + |
| | | ") "); |
| | | } |
| | | // |
| | |
| | | { |
| | | try |
| | | { |
| | | string orgid = DBUtility.ClsPub.HOrgID.ToString(); |
| | | //å¾å°mainid |
| | | omodel.HInterID = DBUtility.ClsPub.CreateBillID(BillType, ref DBUtility.ClsPub.sExeReturnInfo); |
| | | //è¥MAINDIéå¤åéæ°è·å |
| | |
| | | //string HProductNum = omodel.HProductNum.ToString(); |
| | | //string HVerNum = omodel.HVerNum.ToString(); |
| | | //主表 |
| | | //oCn.RunProc("Insert Into Gy_RoutingBillMain " + |
| | | //"(HBillType,HInterID,HBillNo,HDate" + |
| | | //",HYear,HPeriod,HRemark,HMaker,Hmakedate,HMaterID,HName,HMaterTypeID" + |
| | | //",HRoutingGroupID,HUnitID,HMaterNumber,HUnitNumber,HStandard" + |
| | | //",HMainGroupID,HMainProcID,HMainCenterID,HMainTimeUnit,HMainUnitTime,HMainWorkQty" + |
| | | //",HMainPrice,HStdSourceQty,HAddSourceRate,HDelSourceRate" + |
| | | //",HPicNumVer,HPicNumAssemble,HMaterTexture,HProductNum,HPRDORGID,HVerNum" + |
| | | //") " + |
| | | //" values('" + this.BillType + "'," + omodel.HInterID.ToString() + ",'" + omodel.HBillNo + "','" + omodel.HDate + "'" + |
| | | //"," + omodel.HYear.ToString() + "," + omodel.HPeriod.ToString() + ",'" + omodel.HRemark + "','" + DBUtility.ClsPub.CurUserName + "',getdate()," + omodel.HMaterID.ToString() + ",'" + omodel.HName + "'," + omodel.HMaterTypeID.ToString() + |
| | | //",'" + omodel.HRoutingGroupID.ToString() + "'," + omodel.HUnitID.ToString() + ",'" + omodel.HMaterNumber + "','" + omodel.HUnitNumber + "'," + DBUtility.ClsPub.BoolToString(omodel.HStandard) + |
| | | //"," + omodel.HMainGroupID.ToString() + "," + omodel.HMainProcID.ToString() + "," + omodel.HMainCenterID.ToString() + ",'" + omodel.HMainTimeUnit + "'," + omodel.HMainUnitTime.ToString() + "," + omodel.HMainWorkQty.ToString() + |
| | | //"," + omodel.HMainPrice.ToString() + "," + omodel.HStdSourceQty.ToString() + "," + omodel.HAddSourceRate + "," + omodel.HDelSourceRate.ToString() + |
| | | //",'" + omodel.HPicNumVer.ToString() + "','" + omodel.HPicNumAssemble.ToString() + "','" + omodel.HMaterTexture.ToString() + "','" + omodel.HProductNum.ToString() + "','"+omodel.HPRDORGID.ToString()+"','" + omodel.HVerNum.ToString() + "'"+ |
| | | //") "); |
| | | |
| | | oCn.RunProc("Insert Into Gy_RoutingBillMain " + |
| | | "(HBillType,HInterID,HBillNo,HDate" + |
| | | ",HYear,HPeriod,HRemark,HMaker,Hmakedate,HMaterID,HName,HMaterTypeID" + |
| | | ",HRoutingGroupID,HUnitID,HMaterNumber,HUnitNumber,HStandard" + |
| | | ",HMainGroupID,HMainProcID,HMainCenterID,HMainTimeUnit,HMainUnitTime,HMainWorkQty" + |
| | | ",HMainPrice,HStdSourceQty,HAddSourceRate,HDelSourceRate" + |
| | | ",HPicNumVer,HPicNumAssemble,HMaterTexture,HProductNum,HPRDORGID,HVerNum" + |
| | | ",HPicNumVer,HPicNumAssemble,HMaterTexture,HProductNum,HPRDORGID,HORGID,HVerNum" + |
| | | ") " + |
| | | " values('" + this.BillType + "'," + omodel.HInterID.ToString() + ",'" + omodel.HBillNo + "','" + omodel.HDate + "'" + |
| | | "," + omodel.HYear.ToString() + "," + omodel.HPeriod.ToString() + ",'" + omodel.HRemark + "','" + DBUtility.ClsPub.CurUserName + "',getdate()," + omodel.HMaterID.ToString() + ",'" + omodel.HName + "'," + omodel.HMaterTypeID.ToString() + |
| | | ",'" + omodel.HRoutingGroupID.ToString() + "'," + omodel.HUnitID.ToString() + ",'" + omodel.HMaterNumber + "','" + omodel.HUnitNumber + "'," + DBUtility.ClsPub.BoolToString(omodel.HStandard) + |
| | | "," + omodel.HMainGroupID.ToString() + "," + omodel.HMainProcID.ToString() + "," + omodel.HMainCenterID.ToString() + ",'" + omodel.HMainTimeUnit + "'," + omodel.HMainUnitTime.ToString() + "," + omodel.HMainWorkQty.ToString() + |
| | | "," + omodel.HMainPrice.ToString() + "," + omodel.HStdSourceQty.ToString() + "," + omodel.HAddSourceRate + "," + omodel.HDelSourceRate.ToString() + |
| | | ",'" + omodel.HPicNumVer.ToString() + "','" + omodel.HPicNumAssemble.ToString() + "','" + omodel.HMaterTexture.ToString() + "','" + omodel.HProductNum.ToString() + "','"+omodel.HPRDORGID.ToString()+"','" + omodel.HVerNum.ToString() + "'"+ |
| | | ",'" + omodel.HPicNumVer + "','" + omodel.HPicNumAssemble + "','" + omodel.HMaterTexture + "','" + omodel.HProductNum + "'," + omodel.HORGID.ToString() + "," + omodel.HORGID.ToString() + ",'" + omodel.HVerNum + "'" + |
| | | ") "); |
| | | //æå
¥å表 |
| | | foreach (Model.ClsGy_RoutingBillSub oSub in DetailColl) |
| | |
| | | ",HProcID_S,HCenterID_S,HWorkQty_S,HSubStdEmpQty_S,HMouldNo,HChangeMould" + |
| | | ",HPackStd,HPack,HPutArea,HMyWorkDays,HMyFixWorkDays,HPassRate" + |
| | | ",HTechnologyParameter,HPicNum,HProcCheckNote" + |
| | | ",HOverRate,HProcWorkNum" + |
| | | ",HOverRate,HProcWorkNum,HWorkTimes_S,HSNCtrl" + |
| | | ") values(" |
| | | + omodel.HInterID.ToString() + "," + oSub.HEntryID.ToString() + "," + oSub.HProcID.ToString() + "," + oSub.HProcNo.ToString() + "," + oSub.HSupID.ToString() + "," + Convert.ToString(oSub.HSupFlag ? 1 : 0) + "" + |
| | | "," + oSub.HWorkQty.ToString() + "," + oSub.HCenterID.ToString() + ",'" + oSub.HTimeUnit.ToString() + "'," + oSub.HUnitTime.ToString() + |
| | |
| | | "," + oSub.HProcID_S.ToString() + "," + oSub.HCenterID_S.ToString() + "," + oSub.HWorkQty_S.ToString() + ", " + oSub.HSubStdEmpQty_S.ToString() + ",'" + oSub.HMouldNo + "'," + oSub.HChangeMould.ToString() + |
| | | ",'" + oSub.HPackStd + "','" + oSub.HPack + "','" + oSub.HPutArea + "'," + oSub.HMyWorkDays.ToString() + "," + oSub.HMyFixWorkDays.ToString() + "," + oSub.HPassRate.ToString() + |
| | | ",'"+ oSub.HTechnologyParameter.ToString() + "','" + oSub.HPicNum.ToString() + "','" + oSub.HProcCheckNote.ToString() + |
| | | "', " + oSub.HOverRate.ToString() + ",'" + oSub.HProcWorkNum.ToString() + "'" + |
| | | "', " + oSub.HOverRate.ToString() + ",'" + oSub.HProcWorkNum.ToString() + "'," + oSub.HWorkTimes_S.ToString() + "," + Convert.ToString(oSub.HSNCtrl ? 1 : 0) + |
| | | ") "); |
| | | } |
| | | // |
| | |
| | | omodel.HMaterTexture = Ds.Tables[0].Rows[0]["HMaterTexture"].ToString().Trim(); |
| | | omodel.HProductNum = Ds.Tables[0].Rows[0]["HProductNum"].ToString().Trim(); |
| | | omodel.HVerNum = Ds.Tables[0].Rows[0]["HVerNum"].ToString().Trim(); |
| | | |
| | | omodel.HPRDORGID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HPRDORGID"].ToString()); |
| | | omodel.HORGID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HORGID"].ToString()); |
| | | //å¾ªç¯ |
| | | DataSet DsSub ; |
| | | DsSub = oCn.RunProcReturn("Select * from Gy_RoutingBillSub Where HInterID=" + lngBillKey.ToString() + " Order by HEntryID ", "Gy_RoutingBillSub"); |
| | |
| | | oSub.HPicNum = DBUtility.ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HPicNum"]); |
| | | oSub.HProcCheckNote = DBUtility.ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HProcCheckNote"]); |
| | | oSub.HOverRate = DBUtility.ClsPub.isDoule(DsSub.Tables[0].Rows[i]["HOverRate"]); |
| | | oSub.HWorkTimes_S = DBUtility.ClsPub.isDoule(DsSub.Tables[0].Rows[i]["HWorkTimes_S"]); |
| | | oSub.HSNCtrl = DBUtility.ClsPub.isBool(DsSub.Tables[0].Rows[i]["HSNCtrl"]); |
| | | DetailColl.Add(oSub); |
| | | } |
| | | sReturn = "æ¾ç¤ºåæ®æåï¼"; |