public void FeeItemAccounting(int orderType) { mMsg = string.Empty; if (orderType == 3) { // 去空白行 RemoveEmpty(mIDocOrderExpenseCheck.LongOrderList); // 找出数量等于小于0的账单 DataRow[] arrayDr = mIDocOrderExpenseCheck.LongOrderList.Select("Amount<=0"); if (arrayDr.Length > 0) { string msg = string.Empty; for (int i = 0; i < arrayDr.Length; i++) { msg += "[" + arrayDr[i]["ItemName"] + "]、"; } msg = msg.Substring(0, msg.Length - 1); msg += "等项目数量小于或等于0,请输入正确数量!"; MessageBoxShowSimple(msg); return; } } else if (orderType == 2) { // 长期账单未勾选任何费用时不进行任何操作 if (!mIFeePresDate.BedOrderChecked && !mIFeePresDate.PresDateChecked) { return; } } Action <ClientRequestData> requestAction = ((ClientRequestData request) => { request.AddData(mIDocOrderExpenseCheck.LongOrderList); request.AddData(LoginUserInfo.EmpId); if (orderType == 2) { request.AddData(mIFeePresDate.EndTime); request.AddData(mIFeePresDate.BedOrderChecked); request.AddData(mIFeePresDate.PresDateChecked); } else { //request.AddData(DateTime.Now); request.AddData(DateTime.Now); request.AddData(false); request.AddData(true); } request.AddData(mIDocOrderExpenseCheck.PatListID); }); ServiceResponseData retdata = InvokeWcfService("IPProject.Service", "DocOrderExpenseCheckController", "FeeItemAccounting", requestAction); bool result = retdata.GetData <bool>(0); if (result) { string msg = "费用记账成功!"; mMsg = msg; if (orderType == 2) { mIFeePresDate.CloseForm(); } else { MessageBoxShowSimple(msg); GetPatLongFeeItemGenerate(orderType); // 获取病人最新费用信息 GetPatFeeInfo(); } } else { // 记账失败提示Msg List <string> msgList = retdata.GetData <List <string> >(1); MessageBoxShowSimple(msgList[0]); } }
public void FeeItemAccounting(int orderType) { if (orderType == 3) { // 去空白行 RemoveEmpty(iDoctorsOrderSccounting.LongOrderList); // 找出数量等于小于0的账单 DataRow[] arrayDr = iDoctorsOrderSccounting.LongOrderList.Select("Amount<=0"); if (arrayDr.Length > 0) { string msg = string.Empty; for (int i = 0; i < arrayDr.Length; i++) { msg += "[" + arrayDr[i]["ItemName"] + "]、"; } msg = msg.Substring(0, msg.Length - 1); msg += "等项目数量小于或等于0,请输入正确数量!"; MessageBoxShowSimple(msg); return; } } Action <ClientRequestData> requestAction = ((ClientRequestData request) => { request.AddData(iDoctorsOrderSccounting.LongOrderList); request.AddData(LoginUserInfo.EmpId); //request.AddData(LoginUserInfo.DeptId); if (orderType == 2) { request.AddData(iFeePresDate.StartTime); request.AddData(iFeePresDate.EndTime); request.AddData(iFeePresDate.BedOrderChecked); request.AddData(iFeePresDate.PresDateChecked); } else { request.AddData(DateTime.Now); request.AddData(DateTime.Now); request.AddData(false); request.AddData(true); } }); ServiceResponseData retdata = InvokeWcfService("IPProject.Service", "DoctorsOrderSccountingController", "FeeItemAccounting", requestAction); bool result = retdata.GetData <bool>(0); List <string> msgList = retdata.GetData <List <string> >(1); if (result) { string msg = "费用记账成功!"; if (msgList.Count > 0) { msg += "其中"; msg += string.Join("、", msgList.ToArray()); msg += "等药品库存数不够!"; } mMsg = msg; if (orderType == 2) { iFeePresDate.CloseForm(); } else { MessageBoxShowSimple(msg); GetPatLongFeeItemGenerate(mPatListId, orderType); GetPatSumPay(mPatListId); } } else { MessageBoxShowError(msgList[0]); } }