| | |
| | | omodel.HInterID = DBUtility.ClsPub.CreateBillID(BillType, ref DBUtility.ClsPub.sExeReturnInfo); |
| | | //若MAINDI重复则重新获取 |
| | | oCn.BeginTran(); |
| | | string sql = string.Format(@"Insert Into Sb_EquipRepairWorkBillMain " + |
| | | "(HBillType,HBillSubType,HInterID,HBillNo,HDate" + |
| | | ",HYear,HPeriod,HRemark,HMaker,HMakeDate" + |
| | | ",HEquipID,HRepairID,HPlanTimes,HEmpID,HManagerID,HTimes" + |
| | | ",HDeptID,HExplanation,HInnerBillNo,HRepairBeginDate,HRepairEndDate,HRepairContent,HCycleUnit" + |
| | | ") " + |
| | | " values('" + this.BillType + "','" + this.HBillSubType + "'," + omodel.HInterID.ToString() + ",'" + omodel.HBillNo + "','" + omodel.HDate + "'" + |
| | | ", " + omodel.HYear.ToString() + "," + omodel.HPeriod.ToString() + ",'" + omodel.HRemark + "','" + omodel.HMaker + "',getdate()" + |
| | | ", " + omodel.HEquipID.ToString() + "," + omodel.HRepairID.ToString() + "," + omodel.HPlanTimes.ToString() + "," + omodel.HEmpID.ToString() + "," + omodel.HManagerID.ToString() + "," + omodel.HTimes.ToString() + |
| | | ", " + omodel.HDeptID.ToString() + ",'" + omodel.HExplanation + "','" + omodel.HInnerBillNo + "','" + omodel.HRepairBeginDate.ToShortDateString() + "','" + omodel.HRepairEndDate.ToShortDateString() + "','" + omodel.HRepairContent + "','" + omodel.HCycleUnit + "'" + |
| | | ")"); |
| | | |
| | | //主表 |
| | | oCn.RunProc("Insert Into Sb_EquipRepairWorkBillMain " + |
| | | "(HBillType,HBillSubType,HInterID,HBillNo,HDate" + |
| | |
| | | //=================================================== |
| | | |
| | | oSub.HRepairExplanation = DBUtility.ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HRepairExplanation"]); |
| | | oSub.HRepairID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HRepairID"]); |
| | | oSub.HRepairID1 = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HRepairID"]); |
| | | oSub.HEmpID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HEmpID"]); |
| | | |
| | | |