| | |
| | | |
| | | if (OperationType == 1)//新增 |
| | | { |
| | | LogService.Write("Insert Into Sb_EquipRepairSendWorkBillMain" + |
| | | "(HBillType,HBillSubType,HInterID,HBillNo,HDate" + |
| | | ",HYear,HPeriod,HRemark,HMaker,HMakeDate" + |
| | | ",HEquipID,HExplanation,HInnerBillNo,HRepairID,HEmpID" + |
| | | ",HManagerID,HDeptID,HRepairContent,HRepairPlanBeginDate,HRepairPlanEndDate" + |
| | | ",HPlanTimes,HCycleUnit" + |
| | | ") " + |
| | | " values('" + BillType + "','" + BillType + "'," + omodel.HInterID.ToString() + ",'" + omodel.HBillNo + "','" + omodel.HDate + "'" + |
| | | ", " + omodel.HYear.ToString() + "," + omodel.HPeriod.ToString() + ",'" + omodel.HRemark + "','" + omodel.HMaker + "',getdate()" + |
| | | ", " + omodel.HEquipID.ToString() + ",'" + omodel.HExplanation + "','" + omodel.HInnerBillNo + "'," + omodel.HRepairID.ToString() + "," + omodel.HEmpID.ToString() + |
| | | "," + omodel.HManagerID.ToString() + "," + omodel.HDeptID.ToString() + ",'" + omodel.HRepairContent + "','" + omodel.HRepairPlanBeginDate + "','" + omodel.HRepairPlanEndDate + "'" + |
| | | "," + omodel.HPlanTimes.ToString() + ",'" + omodel.HCycleUnit + "'" + |
| | | ") "); |
| | | //主表 |
| | | oCN.RunProc("Insert Into Sb_EquipRepairSendWorkBillMain" + |
| | | "(HBillType,HBillSubType,HInterID,HBillNo,HDate" + |
| | |
| | | //插入子表 |
| | | foreach (Models.ClsSb_EquipRepairSendWorkBillSub oSub in DetailColl) |
| | | { |
| | | LogService.Write("Insert into Sb_EquipRepairSendWorkBillSub " + |
| | | " (HInterID,HEntryID,HCloseMan,HEntryCloseDate,HCloseType,HRemark" + |
| | | ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney" + |
| | | ",HRepairID,HManagerID,HRepairExplanation" + |
| | | ") values(" |
| | | + omodel.HInterID.ToString() + "," + (hentryid == -1 ? i : hentryid) + ",'" + oSub.HCloseMan + "'," + oSub.HEntryCloseDate.ToShortDateString() + "," + 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.HRepairID.ToString() + "," + oSub.HManagerID.ToString() + ",'" + oSub.HRepairExplanation + "'" + |
| | | ") "); |
| | | oCN.RunProc("Insert into Sb_EquipRepairSendWorkBillSub " + |
| | | " (HInterID,HEntryID,HCloseMan,HEntryCloseDate,HCloseType,HRemark" + |
| | | ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney" + |