diff --git a/BankYouBankrupt/BankYouBankruptCashierApp/Controllers/HomeController.cs b/BankYouBankrupt/BankYouBankruptCashierApp/Controllers/HomeController.cs index 6ed9020..c923804 100644 --- a/BankYouBankrupt/BankYouBankruptCashierApp/Controllers/HomeController.cs +++ b/BankYouBankrupt/BankYouBankruptCashierApp/Controllers/HomeController.cs @@ -52,7 +52,7 @@ namespace BankYouBankruptCashierApp.Controllers //изменение данных Post-ом [HttpPost] - public void Privacy(string login, string password, string name, string surname, string patronymic, string telephone, string email) + public void Privacy(string login, string password, string name, string surname, string patronymic, string telephone) { if (APICashier.Cashier == null) { @@ -61,7 +61,7 @@ namespace BankYouBankruptCashierApp.Controllers if (string.IsNullOrEmpty(login) || string.IsNullOrEmpty(password) || string.IsNullOrEmpty(name) || string.IsNullOrEmpty(surname) || string.IsNullOrEmpty(patronymic) - || string.IsNullOrEmpty(telephone) || string.IsNullOrEmpty(email)) + || string.IsNullOrEmpty(telephone)) { throw new Exception("Введите логин, пароль, ФИО и телефон"); } @@ -83,9 +83,8 @@ namespace BankYouBankruptCashierApp.Controllers APICashier.Cashier.Email = login; APICashier.Cashier.Password = password; APICashier.Cashier.Telephone = telephone; - APICashier.Cashier.Email = email; - Response.Redirect("Index"); + Response.Redirect("Enter"); } [HttpGet] @@ -112,6 +111,13 @@ namespace BankYouBankruptCashierApp.Controllers Response.Redirect("Enter"); } + + [HttpPost] + public IActionResult Logout() + { + APICashier.Cashier = null; + return Redirect("~/Home/Enter"); + } #endregion #region Вывод ошибок diff --git a/BankYouBankrupt/BankYouBankruptCashierApp/Views/Home/CloseCrediting.cshtml b/BankYouBankrupt/BankYouBankruptCashierApp/Views/Home/CloseCrediting.cshtml index ab596ae..181489c 100644 --- a/BankYouBankrupt/BankYouBankruptCashierApp/Views/Home/CloseCrediting.cshtml +++ b/BankYouBankrupt/BankYouBankruptCashierApp/Views/Home/CloseCrediting.cshtml @@ -29,10 +29,7 @@