public async Task <IActionResult> Details(int id) { var loanType = await _loanTypeService.GetLoanType(id); if (loanType == null) { return(NotFound()); } return(View(loanType)); }
public async Task <IActionResult> Create(int?id) { if (id == null) { return(NotFound()); } var user = await _userManager.GetUserAsync(HttpContext.User); ViewData[ViewDataKeys.UserAccountId] = new SelectList(await _bankAccountService.GetUserAccounts(user.Id), "Id", "Name"); ViewData[ViewDataKeys.LoanType] = await _loanTypeService.GetLoanType((int)id); ViewData[ViewDataKeys.EmploymentTypeId] = new SelectList(_employmentTypeService.GetAllTypes(), "Id", "Name"); return(View()); }
public async Task <IActionResult> LoanTypeDetails(int LoanTypeId) { try { var response = await _service.GetLoanType(LoanTypeId); if (response != null) { return(Ok(response)); } return(StatusCode(StatusCodes.Status204NoContent)); } catch (Exception ex) { throw ex; } }