diff --git a/BankYouBankrupt/BankYouBankruptCashierApp/Controllers/HomeController.cs b/BankYouBankrupt/BankYouBankruptCashierApp/Controllers/HomeController.cs index 54d09a9..6e42958 100644 --- a/BankYouBankrupt/BankYouBankruptCashierApp/Controllers/HomeController.cs +++ b/BankYouBankrupt/BankYouBankruptCashierApp/Controllers/HomeController.cs @@ -509,7 +509,7 @@ namespace BankYouBankruptCashierApp.Controllers AccountId = int.Parse(accountId) }); - return Redirect("~/Home/Enter"); + return Redirect("ReportSuccess"); } //создание excel отчёта у касира @@ -526,7 +526,7 @@ namespace BankYouBankruptCashierApp.Controllers AccountId = int.Parse(accountId) }); - return Redirect("~/Home/Enter"); + return Redirect("ReportSuccess"); } [HttpPost] @@ -534,7 +534,7 @@ namespace BankYouBankruptCashierApp.Controllers { if (APICashier.Cashier == null) { - return Redirect("~/Home/Enter"); + return Redirect("ReportSuccess"); } ViewBag.Accounts = APICashier.GetRequest>("/api/Account/GetAllAccounts"); @@ -644,6 +644,16 @@ namespace BankYouBankruptCashierApp.Controllers }); } - #endregion - } + #endregion + + [HttpGet] + public IActionResult ReportSuccess() + { + if (APICashier.Cashier == null) + { + throw new Exception("Не авторизованы"); + } + return View(); + } + } } \ No newline at end of file