diff --git a/Bank/BankContracts/ViewModels/TransferViewModel.cs b/Bank/BankContracts/ViewModels/TransferViewModel.cs index 5748b60..a22e9b6 100644 --- a/Bank/BankContracts/ViewModels/TransferViewModel.cs +++ b/Bank/BankContracts/ViewModels/TransferViewModel.cs @@ -14,7 +14,7 @@ namespace BankContracts.ViewModels public int Id { get; set; } [DisplayName("Сумма")] public int Sum { get; set; } - [DisplayName("Время")] + [DisplayName("Время перевода")] public DateTime TransferTime { get; set; } = DateTime.Now; [DisplayName("Номер операции")] public int? OperationId { get; set; } diff --git a/Bank/BankContracts/ViewModels/WithdrawalViewModel.cs b/Bank/BankContracts/ViewModels/WithdrawalViewModel.cs index 037064f..b5e7386 100644 --- a/Bank/BankContracts/ViewModels/WithdrawalViewModel.cs +++ b/Bank/BankContracts/ViewModels/WithdrawalViewModel.cs @@ -16,6 +16,8 @@ namespace BankContracts.ViewModels public DateTime WithdrawalTime { get; set; } = DateTime.Now; [DisplayName("Номер заявки")] public int? RequestId { get; set; } + [DisplayName("Сумма")] + public int? Sum { get; set; } public Dictionary WithdrawalAccounts { get; set; } = new(); } } diff --git a/Bank/BankDatabaseImplement/Models/Withdrawal.cs b/Bank/BankDatabaseImplement/Models/Withdrawal.cs index 39230f4..839ece2 100644 --- a/Bank/BankDatabaseImplement/Models/Withdrawal.cs +++ b/Bank/BankDatabaseImplement/Models/Withdrawal.cs @@ -62,7 +62,8 @@ namespace BankDatabaseImplement.Models Id = Id, WithdrawalTime = WithdrawalTime, WithdrawalAccounts = WithdrawalAccounts, - RequestId = RequestId + RequestId = RequestId, + Sum = Request?.Sum, }; public void UpdateAccounts(BankDatabase context, WithdrawalBindingModel model) diff --git a/Bank/BankManagersClientApp/Controllers/HomeController.cs b/Bank/BankManagersClientApp/Controllers/HomeController.cs index fbbdd7a..a719aa2 100644 --- a/Bank/BankManagersClientApp/Controllers/HomeController.cs +++ b/Bank/BankManagersClientApp/Controllers/HomeController.cs @@ -22,13 +22,17 @@ namespace BankManagersClientApp.Controllers return View(); } - [HttpGet] - public IActionResult Enter() + public IActionResult Privacy() { + if (APIClient.Manager == null) + { + return Redirect("~/Home/Enter"); + } return View(); } - public IActionResult Privacy() + [HttpGet] + public IActionResult Enter() { return View(); } diff --git a/Bank/BankManagersClientApp/Views/Home/TransferCreate.cshtml b/Bank/BankManagersClientApp/Views/Home/TransferCreate.cshtml new file mode 100644 index 0000000..7c1d7a2 --- /dev/null +++ b/Bank/BankManagersClientApp/Views/Home/TransferCreate.cshtml @@ -0,0 +1,32 @@ +@{ + ViewData["Title"] = "TransferCreate"; +} +
+

Создание счёта

+
+
+
+
Сумма:
+
+ +
+
+
+
Номер счета отправителя:
+
+ +
+
+
+
Номер счета получателя:
+
+ +
+
+
+
+
+ +
+
+
diff --git a/Bank/BankManagersClientApp/Views/Home/Transfers.cshtml b/Bank/BankManagersClientApp/Views/Home/Transfers.cshtml index 5729a07..6a7d62e 100644 --- a/Bank/BankManagersClientApp/Views/Home/Transfers.cshtml +++ b/Bank/BankManagersClientApp/Views/Home/Transfers.cshtml @@ -1,5 +1,5 @@ @using BankContracts.ViewModels -@model List +@model List @{ ViewData["Title"] = "Transfers"; } @@ -14,7 +14,7 @@ return; }

- Создать перевод + Сделать перевод

@@ -22,6 +22,7 @@ + @@ -40,15 +41,19 @@ + } diff --git a/Bank/BankManagersClientApp/Views/Home/WithdrawalCreate.cshtml b/Bank/BankManagersClientApp/Views/Home/WithdrawalCreate.cshtml new file mode 100644 index 0000000..e1dd794 --- /dev/null +++ b/Bank/BankManagersClientApp/Views/Home/WithdrawalCreate.cshtml @@ -0,0 +1,5 @@ +@* + For more information on enabling MVC for empty projects, visit https://go.microsoft.com/fwlink/?LinkID=397860 +*@ +@{ +} diff --git a/Bank/BankManagersClientApp/Views/Home/Withdrawals.cshtml b/Bank/BankManagersClientApp/Views/Home/Withdrawals.cshtml new file mode 100644 index 0000000..a9255d0 --- /dev/null +++ b/Bank/BankManagersClientApp/Views/Home/Withdrawals.cshtml @@ -0,0 +1,53 @@ +@using BankContracts.ViewModels +@model List +@{ + ViewData["Title"] = "Withdrawals"; +} +
+

Выдачи наличных

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

Авторизируйтесь

+ return; + } +

+ Сделать выдачу +

+
Номер Сумма Время выполненияНомер операции Отправитель Получатель
@Html.DisplayFor(modelItem => - item.OperationTime) + item.TransferTime) @Html.DisplayFor(modelItem => - item.SenderCardNumber) + item.OperationId) @Html.DisplayFor(modelItem => - item.RecipientCardNumber) + item.SenderAccountNumber) + + @Html.DisplayFor(modelItem => + item.RecipientAccountNumber)
+ + + + + + + + + + @foreach (var item in Model) + { + + + + + + + } + +
Номер выдачиСуммаВремя выполненияНомер заявки
+ @Html.DisplayFor(modelItem => + item.Id) + + @Html.DisplayFor(modelItem => + item.Sum) + + @Html.DisplayFor(modelItem => + item.WithdrawalTime) + + @Html.DisplayFor(modelItem => + item.RequestId) +
+ } + \ No newline at end of file