예제 #1
0
        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());
        }
예제 #3
0
 public async Task <IActionResult> TakeCreditForm(TakeCreditViewModel takeCreditViewModel)
 {
     return(View());
 }