File was renamed from WebAPI/Controllers/XSGL/YF_PayMentOtherBillController.cs |
| | |
| | | var _value = msg["msg"].ToString(); |
| | | string msg1 = _value.ToString(); |
| | | string[] sArray = msg1.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries); |
| | | string msg2 = sArray[0].ToString(); //表头数据 |
| | | string refSav = sArray[1].ToString(); //操作方式 |
| | | string msg4 = sArray[2].ToString(); //用户 |
| | | string msg2 = sArray[0].ToString(); |
| | | string msg3 = sArray[1].ToString(); //子表 |
| | | string refSav = sArray[2].ToString();//操作方式数据类型 1添加 3修改 2 复制 |
| | | string msg4 = sArray[3].ToString();//用户名 |
| | | |
| | | DBUtility.ClsPub.CurUserName = msg4; |
| | | |
| | |
| | | oBill.omodel = oItem; |
| | | } |
| | | |
| | | // 表体数据 |
| | | //按 },{来拆分数组 //去掉【和】 |
| | | msg3 = msg3.Substring(1, msg3.Length - 2); |
| | | msg3 = msg3.Replace("\\", ""); |
| | | msg3 = msg3.Replace("\n", ""); //\n |
| | | List<Model.ClsYF_PayMentOtherBillSub> ls = new List<Model.ClsYF_PayMentOtherBillSub>(); |
| | | ls = oListModels.getObjectByJson_YF_PayMentOtherBillSub(msg3); |
| | | int i = 0; |
| | | foreach (Model.ClsYF_PayMentOtherBillSub oItemSub in ls) |
| | | { |
| | | i++; |
| | | oItemSub.HEntryID = i; |
| | | |
| | | |
| | | oItemSub.HEntryCloseDate = DBUtility.ClsPub.isDate(DateTime.Now); |
| | | oItemSub.HCloseType = false; //关闭类型 |
| | | |
| | | oBill.DetailColl.Add(oItemSub); |
| | | |
| | | } |
| | | |
| | | //保存 |
| | | //保存完毕后处理 |
| | | bool bResult; |
| | |
| | | { |
| | | try |
| | | { |
| | | ds = oCN.RunProcReturn("select * from h_v_YF_PayMentOtherBillMainList where hmainid=" + HInterID, "h_v_YF_PayMentOtherBillMainList"); |
| | | List<DataTable> tableList = new List<DataTable>(); |
| | | |
| | | ds = oCN.RunProcReturn("exec h_p_YF_PayMentOtherBillMain_Edit " + HInterID, "h_p_YF_PayMentOtherBillMain_Edit"); |
| | | tableList.Add(ds.Tables[0]); |
| | | tableList.Add(ds.Tables[1]); |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "Sucess!"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | objJsonResult.data = tableList; |
| | | return objJsonResult; |
| | | } |
| | | } |