public JsonResult GetBillSet() { var model = BillSetBll.GetByHotelId(UserContext.CurrentUser.Id); return(Json(model ?? new Model.BillSet() { HotelId = UserContext.CurrentUser.HotelId })); }
// GET: BillSet public ActionResult Index() { var billSet = BillSetBll.GetByHotelId(UserContext.CurrentUser.HotelId); if (billSet == null) { billSet = new BillSet(); } ViewBag.BillSet = billSet; return(View()); }
public JsonResult EditBillSet(BillSet model) { var apiResult = new APIResult(); try { BillSetBll.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)); }