/// <summary> /// 调价单提交到表单 /// </summary> /// <param name="loggingSessionInfo"></param> /// <param name="adjustmentOrderInfo"></param> /// <returns></returns> private bool SetAdjustmentOrderInsertBill(LoggingSessionInfo loggingSessionInfo, AdjustmentOrderInfo adjustmentOrderInfo) { try { cPos.Model.BillModel bill = new BillModel(); cPos.Service.cBillService bs = new cBillService(); bill.Id = adjustmentOrderInfo.order_id; //order_id string order_type_id = bs.GetBillKindByCode(loggingSessionInfo, "ADJUSTMENTORDER").Id.ToString(); //loggingSession, OrderType bill.Code = bs.GetBillNextCode(loggingSessionInfo, "CreateAdjustmentPrice"); //BillKindCode bill.KindId = order_type_id; bill.UnitId = loggingSessionInfo.CurrentUserRole.UnitId; bill.AddUserId = loggingSessionInfo.CurrentUser.User_Id; BillOperateStateService state = bs.InsertBill(loggingSessionInfo, bill); if (state == BillOperateStateService.CreateSuccessful) { return(true); } else { return(false); } } catch (Exception ex) { return(false); throw (ex); } }
/// <summary> /// 用户表单提交 /// </summary> /// <param name="loggingSessionInfo">登录model</param> /// <param name="userInfo">用户model</param> /// <returns></returns> private bool SetUserInsertBill(LoggingSessionInfo loggingSessionInfo, UserInfo userInfo) { try { cPos.Model.BillModel bill = new BillModel(); cPos.Service.cBillService bs = new cBillService(); bill.Id = userInfo.User_Id; //order_id string order_type_id = bs.GetBillKindByCode(loggingSessionInfo, "USERMANAGER").Id.ToString(); //loggingSession, OrderType bill.Code = bs.GetBillNextCode(loggingSessionInfo, BillKindModel.CODE_USER_NEW); //BillKindCode bill.KindId = order_type_id; bill.UnitId = loggingSessionInfo.CurrentUserRole.UnitId; bill.AddUserId = loggingSessionInfo.CurrentUser.User_Id; BillOperateStateService state = bs.InsertBill(loggingSessionInfo, bill); if (state == BillOperateStateService.CreateSuccessful) { return(true); } else { throw (new System.Exception(state.ToString())); } } catch (Exception ex) { throw (ex); } }