| | |
| | | string msg3 = sArray[1].ToString(); |
| | | string msg4 = sArray[2].ToString(); |
| | | string msg5 = sArray[3].ToString(); |
| | | SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); |
| | | |
| | | ListModels oListModels = new ListModels(); |
| | | try |
| | |
| | | List<Model.ClsSc_MouldMaintainRuleBillMain> lsmain = new List<Model.ClsSc_MouldMaintainRuleBillMain>(); |
| | | msg2 = msg2.Replace("\\", ""); |
| | | msg2 = msg2.Replace("\n", ""); //\n |
| | | |
| | | |
| | | //主表 |
| | | lsmain = oListModels.getObjectByJson_Sc_MouldMaintainRuleBillMain(msg2); |
| | | foreach (Model.ClsSc_MouldMaintainRuleBillMain oItem in lsmain) |
| | |
| | | return objJsonResult; |
| | | } |
| | | oBill.omodel = oItem; |
| | | |
| | | if (oItem.HInterID == 0) |
| | | { |
| | | // 判断新增的表单与表格中的表单是否有重复 |
| | | DataSet ds = oCN.RunProcReturn("select * from h_v_Sc_MouldMaintainRuleBillList where 单据号 = '" + oItem.HBillNo + "'", "h_v_Sc_MouldMaintainRuleBillList"); |
| | | if (ds.Tables[0].Rows.Count > 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "保存失败!单据号不得有重复!"; |
| | | objJsonResult.data = 1; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | //保养项表体数据 |
| | | //按 },{来拆分数组 //去掉【和】 |
| | |
| | | //保存完毕后处理 |
| | | bool bResult; |
| | | if (oBill.omodel.HInterID == 0) |
| | | { |
| | | { |
| | | // bResult = oBill.AddBill(ref DBUtility.ClsPub.sExeReturnInfo); |
| | | bResult = oBill.AddBill(ref DBUtility.ClsPub.sExeReturnInfo); |
| | | } |