still in process
This commit is contained in:
parent
980013165b
commit
8aef75d227
@ -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; }
|
||||
|
@ -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<int, (IAccountModel, int)> WithdrawalAccounts { get; set; } = new();
|
||||
}
|
||||
}
|
||||
|
@ -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)
|
||||
|
@ -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();
|
||||
}
|
||||
|
32
Bank/BankManagersClientApp/Views/Home/TransferCreate.cshtml
Normal file
32
Bank/BankManagersClientApp/Views/Home/TransferCreate.cshtml
Normal file
@ -0,0 +1,32 @@
|
||||
@{
|
||||
ViewData["Title"] = "TransferCreate";
|
||||
}
|
||||
<div class="text-center">
|
||||
<h2 class="display-4">Создание счёта</h2>
|
||||
</div>
|
||||
<form method="post">
|
||||
<div class="row">
|
||||
<div class="col-4">Сумма:</div>
|
||||
<div class="col-8">
|
||||
<input type="number" name="sum" id="sum" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-4">Номер счета отправителя:</div>
|
||||
<div class="col-8">
|
||||
<input type="text" name="sender-number" id="number" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-4">Номер счета получателя:</div>
|
||||
<div class="col-8">
|
||||
<input type="text" name="recipient-number" id="number" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-8"></div>
|
||||
<div class="col-4">
|
||||
<input type="submit" value="Сделать перевод" class="btn btn-primary" />
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
@ -1,5 +1,5 @@
|
||||
@using BankContracts.ViewModels
|
||||
@model List<OperationViewModel>
|
||||
@model List<TransferViewModel>
|
||||
@{
|
||||
ViewData["Title"] = "Transfers";
|
||||
}
|
||||
@ -14,7 +14,7 @@
|
||||
return;
|
||||
}
|
||||
<p>
|
||||
<a asp-action="OperationCreate">Создать перевод</a>
|
||||
<a asp-action="TransferCreate">Сделать перевод</a>
|
||||
</p>
|
||||
<table class="table">
|
||||
<thead>
|
||||
@ -22,6 +22,7 @@
|
||||
<th>Номер</th>
|
||||
<th>Сумма</th>
|
||||
<th>Время выполнения</th>
|
||||
<th>Номер операции</th>
|
||||
<th>Отправитель</th>
|
||||
<th>Получатель</th>
|
||||
</tr>
|
||||
@ -40,15 +41,19 @@
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem =>
|
||||
item.OperationTime)
|
||||
item.TransferTime)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem =>
|
||||
item.SenderCardNumber)
|
||||
item.OperationId)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem =>
|
||||
item.RecipientCardNumber)
|
||||
item.SenderAccountNumber)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem =>
|
||||
item.RecipientAccountNumber)
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
|
@ -0,0 +1,5 @@
|
||||
@*
|
||||
For more information on enabling MVC for empty projects, visit https://go.microsoft.com/fwlink/?LinkID=397860
|
||||
*@
|
||||
@{
|
||||
}
|
53
Bank/BankManagersClientApp/Views/Home/Withdrawals.cshtml
Normal file
53
Bank/BankManagersClientApp/Views/Home/Withdrawals.cshtml
Normal file
@ -0,0 +1,53 @@
|
||||
@using BankContracts.ViewModels
|
||||
@model List<WithdrawalViewModel>
|
||||
@{
|
||||
ViewData["Title"] = "Withdrawals";
|
||||
}
|
||||
<div class="text-center">
|
||||
<h1 class="display-4">Выдачи наличных</h1>
|
||||
</div>
|
||||
<div class="text-center">
|
||||
@{
|
||||
if (Model == null)
|
||||
{
|
||||
<h3 class="display-4">Авторизируйтесь</h3>
|
||||
return;
|
||||
}
|
||||
<p>
|
||||
<a asp-action="WithdrawalCreate">Сделать выдачу</a>
|
||||
</p>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Номер выдачи</th>
|
||||
<th>Сумма</th>
|
||||
<th>Время выполнения</th>
|
||||
<th>Номер заявки</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach (var item in Model)
|
||||
{
|
||||
<tr>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem =>
|
||||
item.Id)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem =>
|
||||
item.Sum)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem =>
|
||||
item.WithdrawalTime)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem =>
|
||||
item.RequestId)
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
}
|
||||
</div>
|
Loading…
Reference in New Issue
Block a user