// GET: HourRoom public ActionResult Index() { ViewBag.HotelId = UserContext.CurrentUser.HotelId; var hourRoomBase = HourRoomBaseBll.GetByHotelId(UserContext.CurrentUser.HotelId); if (hourRoomBase == null) { hourRoomBase = new HourRoomBase(); } return(View(hourRoomBase)); }
public JsonResult HourRoomBaseSave(HourRoomBase model) { var apiResult = new APIResult(); try { HourRoomBaseBll.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)); }