コード例 #1
0
        // GET: XfCommission
        public ActionResult Index(long roomRegId)
        {
            var roomReg = RoomRegBll.GetById(roomRegId);

            if (roomReg == null)
            {
                roomReg = new Model.RoomReg();
            }
            var model = new XfCommission()
            {
                Id = 0, RoomRegId = roomReg.Id, DjdanNum = roomReg.DanJuNum, RoomNO = roomReg.RoomNO
            };

            ViewBag.RoomRegId = roomRegId;
            ViewBag.HotelId   = UserContext.CurrentUser.HotelId;;
            return(View(model));
        }
コード例 #2
0
        public JsonResult Edit(XfCommission model)
        {
            var apiResult = new APIResult();
            var user      = UserContext.CurrentUser;

            try
            {
                XfCommissionBll.AddOrUpdate(model, user.HotelId, user.Id, user.UserName);
            }
            catch (Exception ex)
            {
                apiResult.Ret = -1;
                apiResult.Msg = ex.Message;
                if (!(ex is OperationExceptionFacade))
                {
                    LogFactory.GetLogger().Log(LogLevel.Error, ex);
                }
            }

            return(Json(apiResult));
        }