CourseWorkElectronicsShop/ElectronicsShop/ElectronicsShopShopClientApp/Views/Home/Orders.cshtml

60 lines
1.3 KiB
Plaintext
Raw Normal View History

@using ElectronicsShopContracts.ViewModels
@model List<OrderViewModel>
@{
ViewData["Title"] = "Orders";
}
<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="CreateOrder">Добавить корзину</a>
</p>
<table class="table">
<thead>
<tr>
<th>
Номер
</th>
<th>
Дата создания
</th>
<th>
Сумма
</th>
</tr>
</thead>
<tbody>
@foreach (var item in Model) {
<tr>
<th>
@Html.DisplayFor(modelItem => item.ID)
</th>
<th>
@Html.DisplayFor(modelItem => item.DateCreate)
</th>
<th>
@Html.DisplayFor(modelItem => item.Sum)
</th>
<td>
2024-06-01 03:18:46 +04:00
<a class="btn btn-primary btn-sm" asp-action="Payment" asp-route-ID="@item.ID">Оплатить</a>
2024-06-01 00:42:46 +04:00
<a class="btn btn-primary btn-sm" asp-action="EditOrder" asp-route-ID="@item.ID">Изменить</a>
2024-06-09 20:35:36 +04:00
<a class="btn btn-primary btn-sm" asp-action="DeleteOrder" style="background-color:red;" asp-route-ID="@item.ID">Удалить</a>
</td>
</tr>
}
</tbody>
</table>
}
</div>