From 65e07519a42673db388e50ff9b5df58247f83346 Mon Sep 17 00:00:00 2001 From: Programmist73 Date: Mon, 3 Apr 2023 00:03:07 +0400 Subject: [PATCH] =?UTF-8?q?=D0=92=D0=90=D0=96=D0=9D=D0=AB=D0=99=20=D0=9A?= =?UTF-8?q?=D0=9E=D0=9C=D0=9C=D0=98=D0=A2.=20=D0=97=D0=94=D0=95=D0=A1?= =?UTF-8?q?=D0=AC=20=D0=A3=D0=94=D0=90=D0=9B=D0=95=D0=9D=D0=9E/=D0=97?= =?UTF-8?q?=D0=90=D0=9A=D0=9A=D0=9E=D0=9C=D0=95=D0=9D=D0=A2=D0=98=D0=A0?= =?UTF-8?q?=D0=9E=D0=92=D0=90=D0=9D=D0=9D=D0=9E=20=D0=A2=D0=9E,=20=D0=A7?= =?UTF-8?q?=D0=A2=D0=9E=20=D0=9D=D0=95=D0=9E=D0=91=D0=A5=D0=9E=D0=94=D0=98?= =?UTF-8?q?=D0=9C=D0=9E=20=D0=92=20=D0=9F=D0=9E=D0=A1=D0=9B=D0=95=D0=94?= =?UTF-8?q?=D0=A1=D0=A2=D0=92=D0=98=D0=98=20=D0=94=D0=9B=D0=AF=20=D0=A0?= =?UTF-8?q?=D0=90=D0=91=D0=9E=D0=A2=D0=AB.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../BankYouBankruptCashierApp/APICashier.cs | 18 ++++++----- .../Controllers/HomeController.cs | 12 ++++---- .../Views/Home/Create.cshtml | 2 +- .../Views/Home/Index.cshtml | 30 ++++--------------- .../Views/Home/Privacy.cshtml | 12 ++++---- 5 files changed, 29 insertions(+), 45 deletions(-) diff --git a/BankYouBankrupt/BankYouBankruptCashierApp/APICashier.cs b/BankYouBankrupt/BankYouBankruptCashierApp/APICashier.cs index 7fb417b..ba338e0 100644 --- a/BankYouBankrupt/BankYouBankruptCashierApp/APICashier.cs +++ b/BankYouBankrupt/BankYouBankruptCashierApp/APICashier.cs @@ -25,14 +25,16 @@ namespace BankYouBankruptCashierApp var response = _client.GetAsync(requestUrl); var result = response.Result.Content.ReadAsStringAsync().Result; - if (response.Result.IsSuccessStatusCode) - { - return JsonConvert.DeserializeObject(result); - } - else - { - throw new Exception(result); - } + //if (response.Result.IsSuccessStatusCode) + //{ + // return JsonConvert.DeserializeObject(result); + //} + //else + //{ + // throw new Exception(result); + //} + + return JsonConvert.DeserializeObject(""); } //Post-запрос diff --git a/BankYouBankrupt/BankYouBankruptCashierApp/Controllers/HomeController.cs b/BankYouBankrupt/BankYouBankruptCashierApp/Controllers/HomeController.cs index 4255244..f8b6cbc 100644 --- a/BankYouBankrupt/BankYouBankruptCashierApp/Controllers/HomeController.cs +++ b/BankYouBankrupt/BankYouBankruptCashierApp/Controllers/HomeController.cs @@ -21,10 +21,12 @@ namespace BankYouBankruptCashierApp.Controllers { if (APICashier.Cashier == null) { - return Redirect("~/Home/Enter"); + //return Redirect("~/Home/Enter"); } - return View(APICashier.GetRequest>($"api/main/getaccounts?cashierId={APICashier.Cashier.Id}")); + //return View(APICashier.GetRequest>($"api/main/getaccounts?cashierId={APICashier.Cashier.Id}")); + + return View(); } //изменемение ланных Get-ом @@ -33,7 +35,7 @@ namespace BankYouBankruptCashierApp.Controllers { if (APICashier.Cashier == null) { - return Redirect("~/Home/Enter"); + //return Redirect("~/Home/Enter"); } return View(APICashier.Cashier); @@ -147,7 +149,7 @@ namespace BankYouBankruptCashierApp.Controllers [HttpGet] public IActionResult Create() { - ViewBag.Accountes = APICashier.GetRequest>("api/main/getaccountlist"); + //ViewBag.Accountes = APICashier.GetRequest>("api/main/getaccountlist"); return View(); } @@ -158,7 +160,7 @@ namespace BankYouBankruptCashierApp.Controllers { if (APICashier.Cashier == null) { - throw new Exception("Вы как сюда попали? Суда вход только авторизованным"); + //throw new Exception("Вы как сюда попали? Суда вход только авторизованным"); } if (count <= 0) diff --git a/BankYouBankrupt/BankYouBankruptCashierApp/Views/Home/Create.cshtml b/BankYouBankrupt/BankYouBankruptCashierApp/Views/Home/Create.cshtml index 876727a..968c393 100644 --- a/BankYouBankrupt/BankYouBankruptCashierApp/Views/Home/Create.cshtml +++ b/BankYouBankrupt/BankYouBankruptCashierApp/Views/Home/Create.cshtml @@ -9,7 +9,7 @@
Клиент:
- +
diff --git a/BankYouBankrupt/BankYouBankruptCashierApp/Views/Home/Index.cshtml b/BankYouBankrupt/BankYouBankruptCashierApp/Views/Home/Index.cshtml index 3f63442..c762fc1 100644 --- a/BankYouBankrupt/BankYouBankruptCashierApp/Views/Home/Index.cshtml +++ b/BankYouBankrupt/BankYouBankruptCashierApp/Views/Home/Index.cshtml @@ -12,11 +12,11 @@
@{ - if (Model == null) - { -

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

- return; - } + //if (Model == null) + //{ + //

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

+ // return; + //}

Открыть счёт @@ -42,26 +42,6 @@ - @foreach (var item in Model) - { - - - @Html.DisplayFor(modelItem => item.Id) - - - @Html.DisplayFor(modelItem => item.Name) - - - @Html.DisplayFor(modelItem => item.Patronymic) - - - @Html.DisplayFor(modelItem => item.Balance) - - - @Html.DisplayFor(modelItem => item.DateOpen) - - - } } diff --git a/BankYouBankrupt/BankYouBankruptCashierApp/Views/Home/Privacy.cshtml b/BankYouBankrupt/BankYouBankruptCashierApp/Views/Home/Privacy.cshtml index 7b3bcbb..f587edd 100644 --- a/BankYouBankrupt/BankYouBankruptCashierApp/Views/Home/Privacy.cshtml +++ b/BankYouBankrupt/BankYouBankruptCashierApp/Views/Home/Privacy.cshtml @@ -12,23 +12,23 @@

Логин:
-
+
Пароль:
-
+
Имя:
-
+
Фамилия:
-
+
Отчество:
-
+
Телефон:
-
+