public ActionResult Close(CloseModel model) { Domain.Dispatcher.SendCommand(new CloseTab { Id = Domain.OpenTabQueries.TabIdForTable(model.Id), AmountPaid = model.AmountPaid }); return(RedirectToAction("Index", "Home")); }
public ActionResult CloseDialogAndRedirect(string url) { var model = new CloseModel { Url = url, CloseAction = CloseAction.CloseAndRedirect }; return(View("_CloseDialog", model)); }
public ActionResult Close(CloseModel model) { var tabId = _dispatcher.DispatchQuery(new TabIdForTable {TableNumber = model.TableNumber}); _dispatcher.DispatchCommand( new CloseTab { TabId = tabId, AmountPaid = model.AmountPaid }); return RedirectToAction("Index", "Home"); }
public ActionResult Close(CloseModel model) { var tabId = _dispatcher.DispatchQuery(new TabIdForTable { TableNumber = model.TableNumber }); _dispatcher.DispatchCommand( new CloseTab { TabId = tabId, AmountPaid = model.AmountPaid }); return(RedirectToAction("Index", "Home")); }
public IActionResult Update(int id, [FromBody] CloseModel model) { var account = _mapper.Map <Account>(model); account.Id = id; try { _accountService.Close(account); return(Ok()); } catch (AppException ex) { return(BadRequest(new { message = ex.Message })); } }