|  |  |  | 
|---|
|  |  |  | lsmain = oListModels.getObjectByJson_Gy_MouldRepairWorkBillMain(msg2); | 
|---|
|  |  |  | foreach (Model.ClsSb_MouldRepairWorkBillMain oItem in lsmain) | 
|---|
|  |  |  | { | 
|---|
|  |  |  | //oItem.HMaker = ""; | 
|---|
|  |  |  | oItem.HMaker = msg4; | 
|---|
|  |  |  | UserName = msg4;  //制单人 | 
|---|
|  |  |  | oItem.HBillType = "3807"; | 
|---|
|  |  |  | oItem.HBillSubType = "3807"; | 
|---|
|  |  |  | 
|---|
|  |  |  | string msg3 = sArray[1].ToString(); | 
|---|
|  |  |  | string msg4 = sArray[2].ToString(); | 
|---|
|  |  |  | string msg5 = sArray[3].ToString(); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | string msg6 = sArray[4].ToString(); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | string UserName = ""; | 
|---|
|  |  |  | ListModels oListModels = new ListModels(); | 
|---|
|  |  |  | 
|---|
|  |  |  | //oItem.HBillNo = ""; | 
|---|
|  |  |  | oItem.HDate = DBUtility.ClsPub.isDate(DateTime.Now.ToString("yyyy-MM-dd"));//  --日期 | 
|---|
|  |  |  | oItem.HYear = DBUtility.ClsPub.isLong(DateTime.Now.Year); | 
|---|
|  |  |  | oItem.HPeriod = DBUtility.ClsPub.isLong(DateTime.Now.Month); | 
|---|
|  |  |  | //oItem.HMakeDate = ""; | 
|---|
|  |  |  | //oItem.HYear = ""; | 
|---|
|  |  |  | //oItem.HPeriod = ""; | 
|---|
|  |  |  | 
|---|
|  |  |  | oBill.DetailColl.Add(oItemSub); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | //表体数据 | 
|---|
|  |  |  | //按 },{来拆分数组 //去掉【和】 | 
|---|
|  |  |  | //如果是编辑就允许保存,否则不允许 | 
|---|
|  |  |  | if (oBill.omodel.HInterID != 0) | 
|---|
|  |  |  | { | 
|---|
|  |  |  | msg6 = msg6.Substring(1, msg6.Length - 2); | 
|---|
|  |  |  | msg6 = msg6.Replace("\\", ""); | 
|---|
|  |  |  | msg6 = msg6.Replace("\n", ""); | 
|---|
|  |  |  | List<Model.ClsSc_MouldMaintainPlanBillSub_Plan> lss = new List<Model.ClsSc_MouldMaintainPlanBillSub_Plan>(); | 
|---|
|  |  |  | lss = oListModels.getObjectByJson_Sc_MouldMaintainPlanBillSub_Plan(msg6); | 
|---|
|  |  |  | int l = 0; | 
|---|
|  |  |  | foreach (Model.ClsSc_MouldMaintainPlanBillSub_Plan oItem in lss) | 
|---|
|  |  |  | { | 
|---|
|  |  |  |  | 
|---|
|  |  |  | l++; | 
|---|
|  |  |  | oItem.HEntryID = l; | 
|---|
|  |  |  | oItem.HEntryCloseDate = DBUtility.ClsPub.isDate(DateTime.Now); | 
|---|
|  |  |  | oItem.HCloseType = false;   //关闭类型 | 
|---|
|  |  |  | oItem.HSourceInterID = 0;     // 源单主内码 | 
|---|
|  |  |  | oItem.HSourceEntryID = 0;   //源单子内码 | 
|---|
|  |  |  | oItem.HRelationQty = 0;     //关联数量 | 
|---|
|  |  |  | oBill.DetailCol2.Add(oItem); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | //保存 | 
|---|
|  |  |  | //保存完毕后处理 | 
|---|
|  |  |  | bool bResult; | 
|---|
|  |  |  | 
|---|
|  |  |  | foreach (Model.ClsSc_MouldMaintainBillMain oItem in lsmain) | 
|---|
|  |  |  | { | 
|---|
|  |  |  | UserName = oItem.HMaker;  //制单人 | 
|---|
|  |  |  | DBUtility.ClsPub.CurUserName = UserName; | 
|---|
|  |  |  | DBUtility.ClsPub.CurUserName = msg5; | 
|---|
|  |  |  | oItem.HBillType = "3819"; | 
|---|
|  |  |  | oItem.HBillSubType = "3819"; | 
|---|
|  |  |  |  | 
|---|