コード例 #1
0
ファイル: AdminController.cs プロジェクト: harsh18594/jpfc
        public async Task <IActionResult> MortgageRate(CreateMortgageRateViewModel model)
        {
            _logger.LogInformation(GetLogDetails());

            var userId = _userManager.GetUserId(User);
            var result = await _mortgageService.SaveMortgageRateAsync(model, userId);

            if (result.Success)
            {
                SetSiteMessage(MessageType.Success, DisplayFor.FullRequest, "Mortgage rate has been saved successfully.");
            }
            else
            {
                SetSiteMessage(MessageType.Error, DisplayFor.FullRequest, result.Error);
            }
            return(RedirectToAction(nameof(Index)));
        }