private TakeCreditViewModel FillTakeCreditViewModel(string creditProductName, int creditProductId, int clientId) { var model = new TakeCreditViewModel { CreditProductName = creditProductName, CreditProductId = creditProductId, ClientId = clientId }; return(model); }
public async Task <IActionResult> TakeCreditForm(TakeCreditViewModel takeCreditViewModel) { if (ModelState.IsValid) { //оформление кредита var applyCredit = await _mediator.Send(new ApplyCreditCommand(takeCreditViewModel.Credit)); return(RedirectToAction("AllCredits", new { idClient = takeCreditViewModel.IdClient })); } return(View()); }
public async Task <IActionResult> TakeCreditForm(TakeCreditViewModel takeCreditViewModel) { return(View()); }