CourseWork_Bank/Bank/BankClientApp/Views/Home/Purchases.cshtml

34 lines
1012 B
Plaintext
Raw Permalink Normal View History

2024-05-01 01:31:46 +04:00
@using BankContracts.ViewModels;
@model List<PurchaseViewModel>
@{
ViewData["Title"] = "Сделки";
}
<h1>@ViewData["Title"]</h1>
<div class="text-center">
<a asp-action="Purchase">Создать сделку</a>
<table class="table">
<thead>
<tr>
<th>Номер телефона клиента</th>
<th>Дата</th>
<th>Изменить</th>
<th>Удалить</th>
</tr>
</thead>
<tbody>
@foreach (var purchase in Model)
{
<tr>
<td>@Html.DisplayFor(modelItem => purchase.ClientPhoneNumber)</td>
<td>@Html.Raw(purchase.DatePurchase)</td>
<td><a asp-action="Purchase" asp-route-id="@purchase.Id">Изменить</a></td>
<td><a asp-action="RemovePurchase" asp-route-id="@purchase.Id">Удалить</a></td>
</tr>
}
</tbody>
</table>
</div>