| | |
| | | string[] sArray = msg1.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries); |
| | | string msg2 = sArray[0].ToString(); |
| | | string msg3 = sArray[1].ToString(); |
| | | |
| | | string msg4 = sArray[2].ToString(); |
| | | |
| | | string UserName = ""; |
| | | ListModels oListModels = new ListModels(); |
| | |
| | | } |
| | | oBill.omodel = oItem; |
| | | } |
| | | //表体数据 |
| | | //保养项表体数据 |
| | | //按 },{来拆分数组 //去掉【和】 |
| | | msg3 = msg3.Substring(1, msg3.Length - 2); |
| | | msg3 = msg3.Replace("\\", ""); |
| | | msg3 = msg3.Replace("\n", ""); //\n |
| | | //msg2 = msg2.Replace("'", "’"); |
| | | List<Model.ClsSb_EquipMaintainPlanBillSub> ls = new List<Model.ClsSb_EquipMaintainPlanBillSub>(); |
| | | ls = oListModels.getObjectByJson_Sb_EquipMaintainPlanBillSub(msg3); |
| | | List<Model.ClsSc_EquipMaintainPlanBillSub_Item> ls = new List<Model.ClsSc_EquipMaintainPlanBillSub_Item>(); |
| | | ls = oListModels.getObjectByJson_Sc_EquipMaintainPlanBillSub_Item(msg3); |
| | | int i = 0; |
| | | foreach (Model.ClsSb_EquipMaintainPlanBillSub oItemSub in ls) |
| | | foreach (Model.ClsSc_EquipMaintainPlanBillSub_Item item in ls) |
| | | { |
| | | |
| | | i++; |
| | | oItemSub.HEntryID = i; |
| | | item.HEntryID = i; |
| | | //oItemSub.HCloseMan = ""; //行关闭 |
| | | item.HEntryCloseDate = DBUtility.ClsPub.isDate(DateTime.Now); |
| | | item.HCloseType = false; //关闭类型 |
| | | //oItemSub.HRemark = ""; //备注 |
| | | item.HSourceInterID = 0; // 源单主内码 |
| | | item.HSourceEntryID = 0; //源单子内码 |
| | | //oItemSub.HSourceBillNo = ""; //源单单号 |
| | | //oItemSub.HSourceBillType = ""; //源单类型 |
| | | item.HRelationQty = 0; //关联数量 |
| | | oBill.DetailCol.Add(item); |
| | | |
| | | } |
| | | //配件项表体数据 |
| | | //按 },{来拆分数组 //去掉【和】 |
| | | msg4 = msg4.Substring(1, msg4.Length - 2); |
| | | msg4 = msg4.Replace("\\", ""); |
| | | msg4 = msg4.Replace("\n", ""); //\n |
| | | //msg2 = msg2.Replace("'", "’"); |
| | | List<Model.ClsSb_EquipMaintainPlanBillSub> ls1 = new List<Model.ClsSb_EquipMaintainPlanBillSub>(); |
| | | ls1 = oListModels.getObjectByJson_Sb_EquipMaintainPlanBillSub(msg4); |
| | | int j = 0; |
| | | foreach (Model.ClsSb_EquipMaintainPlanBillSub oItemSub in ls1) |
| | | { |
| | | |
| | | j++; |
| | | oItemSub.HEntryID = j; |
| | | //oItemSub.HCloseMan = ""; //行关闭 |
| | | oItemSub.HEntryCloseDate = DBUtility.ClsPub.isDate(DateTime.Now); |
| | | oItemSub.HCloseType = false; //关闭类型 |
| | |
| | | string sql = "select HMaintainItemID, 保养项目代码 HMaintainItemNumber,保养项目名称 HMaintainItem,保养部位 HMaintainPart,具体要求 HClaim,HManagerID,负责人代码 HManagerNumber,负责人 HManagerName,表体备注 HRemark from h_v_Sb_EquipMaintainBillSub_Item where 1 = 1 " + Swhere + ""; |
| | | ds = oCN.RunProcReturn(sql, "h_v_Sb_EquipMaintainBillSub_Item"); |
| | | //获取配件项目编辑数据 |
| | | string sql1 = "select HMaterID, 配件代码 HMaterNumber,配件名称 HMaterName,规格型号 HMaterSpec,单位ID,单位代码 HUnitNumber,单位名称 HUnitName,用量 HQty,标准用量 HQtyMust,表体备注 HRemark from h_v_Sb_EquipMaintainPlanBillList where 1 = 1 " + Swhere + ""; |
| | | string sql1 = "select HMaterID, 配件代码 HMaterNumber,配件名称 HMaterName,单位ID,单位代码 HUnitNumber,单位名称 HUnitName,用量 HQty,标准用量 HQtyMust,表体备注 HRemark from h_v_Sb_EquipMaintainPlanBillList where 1 = 1 " + Swhere + ""; |
| | | ds1 = oCN.RunProcReturn(sql1, "h_v_Sb_EquipMaintainPlanBillList"); |
| | | list.Add(ds.Tables[0]); |
| | | list.Add(ds1.Tables[0]); |