// 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)); }
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)); }