| | |
| | | public Model.ClsSc_MouldMaintainPlanBillMain omodel = new Model.ClsSc_MouldMaintainPlanBillMain(); |
| | | public List<Model.ClsSc_MouldMaintainPlanBillSub> DetailColl = new List<Model.ClsSc_MouldMaintainPlanBillSub>(); |
| | | public List<Model.ClsSc_MouldMaintainPlanBillSub_Item> DetailCol = new List<Model.ClsSc_MouldMaintainPlanBillSub_Item>(); |
| | | public List<Model.ClsSc_MouldMaintainPlanBillSub_Plan> DetailCol2 = new List<Model.ClsSc_MouldMaintainPlanBillSub_Plan>(); |
| | | |
| | | public ClsSc_MouldMaintainPlanBill() |
| | | { |
| | | base.MvarItemKeySub = "Sc_MouldMaintainPlanBillSub"; |
| | | base.MvarItemKeySub2 = ""; |
| | | base.MvarItemKeySub2 = "Sc_MouldMaintainPlanBillSub_Plan"; |
| | | base.MvarItemKeySub3 = ""; |
| | | base.MvarItemKeySub4 = ""; |
| | | base.MvarItemKey="Sc_MouldMaintainPlanBillMain"; |
| | |
| | | DeleteRelation(ref sReturn, lngBillKey); |
| | | //鍒犻櫎瀛愯〃 |
| | | DeleteBillSub(lngBillKey); |
| | | DeleteBillSub2(lngBillKey); |
| | | oCn.RunProc("delete from Sc_MouldMaintainPlanBillSub_Item where HInterID=" + lngBillKey); |
| | | |
| | | omodel.HInterID = lngBillKey; |
| | |
| | | "," + Item.HSourceInterID.ToString() + "," + Item.HSourceEntryID.ToString() + ",'" + Item.HSourceBillNo + "','" + Item.HSourceBillType + "'," + Item.HRelationQty.ToString() + "," + Item.HRelationMoney.ToString() + ",'" + Item.HMaintainItem.ToString() + |
| | | "') "); |
| | | } |
| | | |
| | | //鎻掑叆鐐规璁″垝 |
| | | foreach (Model.ClsSc_MouldMaintainPlanBillSub_Plan Items in DetailCol2) |
| | | { |
| | | oCn.RunProc("Insert into Sc_MouldMaintainPlanBillSub_Plan " + |
| | | " (HInterID,HEntryID,HCloseMan,HEntryCloseDate,HCloseType,HRemark" + |
| | | ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney" + |
| | | ",HPlanDate,HPlanBeginTime,HPlanEndTime,HSafeEndTime,HErrBeginTime," + |
| | | "HRelationFlag,HSendFlag,HErrBeginQty,HUseNowQty,HUseEndQty" + |
| | | |
| | | ") values(" |
| | | + omodel.HInterID.ToString() + "," + Items.HEntryID.ToString() + ",'" + Items.HCloseMan + "','" + Items.HEntryCloseDate.ToShortDateString() + "'," + Convert.ToString(Items.HCloseType ? 1 : 0) + ",'" + Items.HRemark + "'" + |
| | | "," + Items.HSourceInterID.ToString() + "," + Items.HSourceEntryID.ToString() + ",'" + Items.HSourceBillNo + "','" + Items.HSourceBillType + "'," + Items.HRelationQty.ToString() + "," + Items.HRelationMoney.ToString() + |
| | | ",'" + Items.HPlanDate.ToString() + "','" + Items.HPlanBeginTime.ToString() + "','" + Items.HPlanEndTime.ToString() + "','" + Items.HSafeEndTime.ToString() + "','" + Items.HErrBeginTime.ToString() + "'," + |
| | | "'" + DBUtility.ClsPub.BoolToString(Items.HRelationFlag) + "','" + DBUtility.ClsPub.BoolToString(Items.HSendFlag) + "','" + Items.HErrBeginQty.ToString() + "','" + Items.HUseNowQty.ToString() + "','" + Items.HUseEndQty.ToString() + |
| | | "') "); |
| | | } |
| | | // |
| | | //foreach (Model.ClsSc_MouldMaintainPlanBillSub oSub in DetailColl) |
| | | //{ |