public ActionResult Cash() { if (IsPinChecked) { ExecutionResult<CardDto> result = CommandBus.ExecuteCommand(new CardRequest() { Value = CardDto.Number }) as ExecutionResult<CardDto>; if (result != null && result.Success && result.TypedResult != null) { CardDto = result.TypedResult; var model = new CashModel() { CurrencyType = (CurrencyTypeEnum)CardDto.AccountIdObject.CurrencyType }; return View(model); } return RedirectToAction("Index"); } LastActionUrl = Url.Action("Cash"); PinFailCount = 0; return RedirectToAction("CheckPin"); }
public ActionResult Cash(CashModel model) { if (ModelState.IsValid) { var result = CommandBus.ExecuteCommand(new CashRequest {AccountId = CardDto.AccountId, Summ = model.Value}); if (result.Success) { return View("Success"); } return View("Fail"); } IsPinChecked = false; return RedirectToAction("Cash"); }