| | |
| | | |
| | | namespace DAL |
| | | { |
| | | public class ClsGy_MaterialTechParamBillMain : DBUtility.ClsXt_BaseBill |
| | | public class ClsGy_MaterialTechParamBillMain : DBUtility.ClsXt_BaseBill |
| | | { |
| | | public Model.ClsGy_MaterialTechParamBillMain omodel = new Model.ClsGy_MaterialTechParamBillMain(); |
| | | public List<Model.ClsGy_MaterialTechParamBillSub> DetailColl = new List<Model.ClsGy_MaterialTechParamBillSub>(); |
| | |
| | | base.MvarItemKeySub2 = ""; |
| | | base.MvarItemKeySub3 = ""; |
| | | base.MvarItemKeySub4 = ""; |
| | | base.MvarItemKey= "Gy_MaterialTechParamBillMain"; |
| | | base.MvarReportTitle= "产åå·¥èºåæ°æ¸
å"; |
| | | base.BillType="3334"; |
| | | base.MvarItemKey = "Gy_MaterialTechParamBillMain"; |
| | | base.MvarReportTitle = "产åå·¥èºåæ°æ¸
å"; |
| | | base.BillType = "3334"; |
| | | base.HBillSubType = "3334"; |
| | | |
| | | } |
| | |
| | | "', HUpDater = '" + omodel.HUpDater + |
| | | "', HUpDateDate = getdate()" + |
| | | //=============================================================== |
| | | |
| | | |
| | | ", HDeptID = '" + omodel.HDeptID + |
| | | "', HEmpID = '" + omodel.HEmpID + |
| | | "', HMaterID = '" + omodel.HMaterID + |
| | |
| | | |
| | | //æå
¥å表 |
| | | omodel.HInterID = lngBillKey; |
| | | //æå
¥å表 |
| | | foreach (Model.ClsGy_MaterialTechParamBillSub oSub in DetailColl) |
| | | { |
| | | string subSql = "insert into Gy_MaterialTechParamBillSub" + |
| | | "" + |
| | | "" + |
| | | "" + |
| | | "(HInterID,HEntryID,HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType" + |
| | | ",HTechParamID,HTechParamUnitID,HStd,HMax,HMin,HDataForm,HDataUnit,HDataTimes) " + |
| | | " values(" + |
| | | "" + omodel.HInterID.ToString() + |
| | | "," + oSub.HEntryID.ToString() + |
| | | "," + oSub.HSourceInterID + |
| | | "," + oSub.HSourceEntryID + |
| | | ",'" + oSub.HSourceBillNo + |
| | | "','" + oSub.HSourceBillType + |
| | | "','" + oSub.HTechParamID + |
| | | "','" + oSub.HTechParamUnitID + |
| | | "'," + oSub.HStd + |
| | | "," + oSub.HMax + |
| | | ",'" + oSub.HMin + |
| | | "','" + oSub.HDataForm + |
| | | "','" + oSub.HDataUnit + |
| | | "'," + oSub.HDataTimes + |
| | | ")"; |
| | | "(HInterID,HEntryID,HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType" + |
| | | ",HTechParamID,HTechParamUnitID,HStd,HMax,HMin,HDataForm,HDataUnit,HDataTimes,HTechParamClassID,HSNO,HStdNextTimes,HTechParamIDStd) " + |
| | | " values(" + |
| | | "" + omodel.HInterID.ToString() + |
| | | "," + oSub.HEntryID.ToString() + |
| | | "," + oSub.HSourceInterID + |
| | | "," + oSub.HSourceEntryID + |
| | | ",'" + oSub.HSourceBillNo + |
| | | "','" + oSub.HSourceBillType + |
| | | "','" + oSub.HTechParamID + |
| | | "','" + oSub.HTechParamUnitID + |
| | | "'," + oSub.HStd + |
| | | "," + oSub.HMax + |
| | | ",'" + oSub.HMin + |
| | | "','" + oSub.HDataForm + |
| | | "','" + oSub.HDataUnit + |
| | | "','" + oSub.HDataTimes + |
| | | "','" + oSub.HTechParamClassID + |
| | | "','" + oSub.HSNO + |
| | | "','" + oSub.HStdNextTimes + |
| | | "','" + oSub.HTechParamIDStd + |
| | | "')"; |
| | | oCn.RunProc(subSql); |
| | | } |
| | | |
| | |
| | | return true; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | { |
| | | sReturn = e.Message; |
| | | oCn.RollBack(); |
| | | throw (e); |
| | |
| | | while (true) |
| | | { |
| | | ds = oCn.RunProcReturn("select * from Gy_MaterialTechParamBillMain where HInterID = " + omodel.HInterID, "Gy_MaterialTechParamBillMain"); |
| | | if(ds!=null && ds.Tables[0].Rows.Count > 0) |
| | | if (ds != null && ds.Tables[0].Rows.Count > 0) |
| | | { |
| | | omodel.HInterID = DBUtility.ClsPub.CreateBillID(BillType, ref DBUtility.ClsPub.sExeReturnInfo); |
| | | } |
| | |
| | | foreach (Model.ClsGy_MaterialTechParamBillSub oSub in DetailColl) |
| | | { |
| | | string subSql = "insert into Gy_MaterialTechParamBillSub" + |
| | | "" + |
| | | "" + |
| | | "" + |
| | | "(HInterID,HEntryID,HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType" + |
| | | ",HTechParamID,HTechParamUnitID,HStd,HMax,HMin,HDataForm,HDataUnit,HDataTimes) " + |
| | | ",HTechParamID,HTechParamUnitID,HStd,HMax,HMin,HDataForm,HDataUnit,HDataTimes,HTechParamClassID,HSNO,HStdNextTimes,HTechParamIDStd) " + |
| | | " values(" + |
| | | "" + omodel.HInterID.ToString() + |
| | | "," + oSub.HEntryID.ToString() + |
| | |
| | | ",'" + oSub.HSourceBillNo + |
| | | "','" + oSub.HSourceBillType + |
| | | "','" + oSub.HTechParamID + |
| | | "','" + oSub.HTechParamUnitID + |
| | | "','" + oSub.HTechParamUnitID + |
| | | "'," + oSub.HStd + |
| | | "," + oSub.HMax + |
| | | ",'" + oSub.HMin + |
| | | "','" + oSub.HDataForm + |
| | | "','" + oSub.HDataUnit + |
| | | "'," + oSub.HDataTimes + |
| | | ")"; |
| | | "','" + oSub.HDataUnit + |
| | | "','" + oSub.HDataTimes + |
| | | "','" + oSub.HTechParamClassID + |
| | | "','" + oSub.HSNO + |
| | | "','" + oSub.HStdNextTimes + |
| | | "','" + oSub.HTechParamIDStd + |
| | | "')"; |
| | | oCn.RunProc(subSql); |
| | | } |
| | | sReturn = "æ°å¢åæ®æåï¼"; |
| | |
| | | //======================================================== |
| | | |
| | | omodel.HOrgID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HOrgID"]); |
| | | |
| | | |
| | | // |
| | | |
| | | //å¾ªç¯ |
| | |
| | | oSub.HEntryCloseDate = DBUtility.ClsPub.isDate(DsSub.Tables[0].Rows[i]["HEntryCloseDate"]); |
| | | oSub.HRemark = DsSub.Tables[0].Rows[i]["HRemark"].ToString().Trim(); |
| | | //=================================================== |
| | | |
| | | |
| | | DetailColl.Add(oSub); |
| | | } |
| | | sReturn = "æ¾ç¤ºåæ®æåï¼"; |