diff --git a/BankYouBankrupt/BankYouBankruptClientApp/Controllers/HomeController.cs b/BankYouBankrupt/BankYouBankruptClientApp/Controllers/HomeController.cs index d86b531..e63d530 100644 --- a/BankYouBankrupt/BankYouBankruptClientApp/Controllers/HomeController.cs +++ b/BankYouBankrupt/BankYouBankruptClientApp/Controllers/HomeController.cs @@ -341,9 +341,19 @@ namespace BankYouBankruptClientApp.Controllers CardList = cards.Where(x => x.IsChecked).Select(x => x.Id).ToList() }); - return Redirect("~/Home/Enter"); + return Redirect("ReportSuccess"); } + [HttpGet] + public IActionResult ReportSuccess() { + if (APIClient.Client == null) + { + throw new Exception("Не авторизованы"); + } + return View(); + } + + //отчёт клиента по пополнениям [HttpPost] public IActionResult CreateCreditingExcelReport(List cards) @@ -358,8 +368,8 @@ namespace BankYouBankruptClientApp.Controllers CardList = cards.Where(x => x.IsChecked).Select(x => x.Id).ToList() }); - return Redirect("~/Home/Enter"); - } + return Redirect("ReportSuccess"); + } //отчёт клиента по снятиям [HttpPost] @@ -375,8 +385,8 @@ namespace BankYouBankruptClientApp.Controllers CardList = cards.Where(x => x.IsChecked).Select(x => x.Id).ToList() }); - return Redirect("~/Home/Enter"); - } + return Redirect("ReportSuccess"); + } #endregion @@ -396,8 +406,8 @@ namespace BankYouBankruptClientApp.Controllers CardList = cards.Where(x => x.IsChecked).Select(x => x.Id).ToList() }); - return Redirect("~/Home/Enter"); - } + return Redirect("ReportSuccess"); + } //отчёт клиента по пополнениям [HttpPost] @@ -413,8 +423,8 @@ namespace BankYouBankruptClientApp.Controllers CardList = cards.Where(x => x.IsChecked).Select(x => x.Id).ToList() }); - return Redirect("~/Home/Enter"); - } + return Redirect("ReportSuccess"); + } //отчёт клиента по снятиям [HttpPost] @@ -430,8 +440,8 @@ namespace BankYouBankruptClientApp.Controllers CardList = cards.Where(x => x.IsChecked).Select(x => x.Id).ToList() }); - return Redirect("~/Home/Enter"); - } + return Redirect("ReportSuccess"); + } #endregion diff --git a/BankYouBankrupt/BankYouBankruptClientApp/Views/Home/ReportSuccess.cshtml b/BankYouBankrupt/BankYouBankruptClientApp/Views/Home/ReportSuccess.cshtml new file mode 100644 index 0000000..81d53b4 --- /dev/null +++ b/BankYouBankrupt/BankYouBankruptClientApp/Views/Home/ReportSuccess.cshtml @@ -0,0 +1,16 @@ +@using BankYouBankruptСlientApp +@{ + ViewData["Title"] = "Список карт"; +} + + +
+ @{ + if (APIClient.Client == null) + { +

Сначала авторизируйтесь

+ return; + } + } +

Отчeт был отправлен на почту @APIClient.Client.Email

+
\ No newline at end of file