From 841d1e435a1801f6ca992fb232828d2caa3b882a Mon Sep 17 00:00:00 2001 From: Programmist73 Date: Wed, 17 May 2023 17:42:40 +0400 Subject: [PATCH] Crediting.cshtml --- .../BankYouBankruptCashierApp/APICashier.cs | 2 - .../Controllers/HomeController.cs | 24 +++++++ .../Views/Home/Crediting.cshtml | 67 +++++++++++++++++++ .../Views/Shared/_Layout.cshtml | 10 ++- .../wwwroot/css/site.css | 4 ++ 5 files changed, 103 insertions(+), 4 deletions(-) create mode 100644 BankYouBankrupt/BankYouBankruptCashierApp/Views/Home/Crediting.cshtml diff --git a/BankYouBankrupt/BankYouBankruptCashierApp/APICashier.cs b/BankYouBankrupt/BankYouBankruptCashierApp/APICashier.cs index ffc69a1..7fb417b 100644 --- a/BankYouBankrupt/BankYouBankruptCashierApp/APICashier.cs +++ b/BankYouBankrupt/BankYouBankruptCashierApp/APICashier.cs @@ -33,8 +33,6 @@ namespace BankYouBankruptCashierApp { throw new Exception(result); } - - return JsonConvert.DeserializeObject(""); } //Post-запрос diff --git a/BankYouBankrupt/BankYouBankruptCashierApp/Controllers/HomeController.cs b/BankYouBankrupt/BankYouBankruptCashierApp/Controllers/HomeController.cs index 7bbcac9..96dd755 100644 --- a/BankYouBankrupt/BankYouBankruptCashierApp/Controllers/HomeController.cs +++ b/BankYouBankrupt/BankYouBankruptCashierApp/Controllers/HomeController.cs @@ -234,5 +234,29 @@ namespace BankYouBankruptCashierApp.Controllers return View(APICashier.GetRequest>($"/api/Account/FindOpenDebiting")); } + + //для страницы "Заявки на зачисление" + [HttpGet] + public IActionResult Crediting() + { + if (APICashier.Cashier == null) + { + throw new Exception("Вы как сюда попали? Суда вход только авторизованным"); + } + + return View(APICashier.GetRequest>($"/api/Account/FindOpenCrediting")); + } + + //для страницы "Переводы" + [HttpGet] + public IActionResult MoneyTransfers() + { + if (APICashier.Cashier == null) + { + throw new Exception("Вы как сюда попали? Суда вход только авторизованным"); + } + + return View(APICashier.GetRequest>($"/api/Account/FindOpenDebiting")); + } } } \ No newline at end of file diff --git a/BankYouBankrupt/BankYouBankruptCashierApp/Views/Home/Crediting.cshtml b/BankYouBankrupt/BankYouBankruptCashierApp/Views/Home/Crediting.cshtml new file mode 100644 index 0000000..b66e4ef --- /dev/null +++ b/BankYouBankrupt/BankYouBankruptCashierApp/Views/Home/Crediting.cshtml @@ -0,0 +1,67 @@ +@using BankYouBankruptContracts.ViewModels + +@model List + +@{ + ViewData["Title"] = "Заявки на зачисление"; +} + +
+

Заявки

+
+ +
+ @{ + if (Model == null) + { +

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

+ return; + } +

+ Одобрение заявки +

+ + + + + + + + + + + + @foreach (var item in Model) + { + + + + + + + + } + +
+ Номер заявки + + Номер карты + + Сумма зачисления + + Дата открытия заявки + + Статус заявки +
+ @Html.DisplayFor(modelItem => item.Id) + + @Html.DisplayFor(modelItem => item.CardNumber) + + @Html.DisplayFor(modelItem => item.Sum) + + @Html.DisplayFor(modelItem => item.DateOpen) + + @Html.DisplayFor(modelItem => item.Status) +
+ } +
diff --git a/BankYouBankrupt/BankYouBankruptCashierApp/Views/Shared/_Layout.cshtml b/BankYouBankrupt/BankYouBankruptCashierApp/Views/Shared/_Layout.cshtml index d31f9d8..fcef63f 100644 --- a/BankYouBankrupt/BankYouBankruptCashierApp/Views/Shared/_Layout.cshtml +++ b/BankYouBankrupt/BankYouBankruptCashierApp/Views/Shared/_Layout.cshtml @@ -3,13 +3,13 @@ - @ViewData["Title"] - BankYouBankruptCashierApp + @ViewData["Title"] - +