Example #1
0
        // GET: PeriodRoom
        public ActionResult Index()
        {
            ViewBag.HotelId = UserContext.CurrentUser.HotelId;
            var periodRoomBase = PeriodRoomBaseBll.GetByHotelId(UserContext.CurrentUser.HotelId);

            if (periodRoomBase == null)
            {
                periodRoomBase = new PeriodRoomBase();
            }
            return(View(periodRoomBase));
        }
Example #2
0
        public JsonResult PeriodRoomBaseSave(PeriodRoomBase model)
        {
            var apiResult = new APIResult();

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

            return(Json(apiResult));
        }