PIbd-22_Katysheva_N.E._Pizz.../Pizzeria/PizzeriaClientApp/Views/Home/Index.cshtml

75 lines
1.2 KiB
Plaintext
Raw Normal View History

2024-05-08 12:14:52 +04:00
@using PizzeriaContracts.ViewModels
2024-05-22 02:01:59 +04:00
2024-05-08 12:14:52 +04:00
@model List<OrderViewModel>
2024-05-22 02:01:59 +04:00
2024-05-08 12:14:52 +04:00
@{
ViewData["Title"] = "Home Page";
}
2024-05-22 02:01:59 +04:00
2024-05-08 12:14:52 +04:00
<div class="text-center">
<h1 class="display-4">Заказы</h1>
</div>
2024-05-22 02:01:59 +04:00
2024-05-08 12:14:52 +04:00
<div class="text-center">
@{
if (Model == null)
{
<h3 class="display-4">Авторизируйтесь</h3>
return;
}
2024-05-22 02:01:59 +04:00
2024-05-08 12:14:52 +04:00
<p>
<a asp-action="Create">Создать заказ</a>
</p>
<table class="table">
<thead>
<tr>
<th>
Номер
</th>
<th>
2024-05-22 02:01:59 +04:00
Пицца
2024-05-08 12:14:52 +04:00
</th>
<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.PizzaName)
</td>
<td>
@Html.DisplayFor(modelItem => item.DateCreate)
</td>
<td>
@Html.DisplayFor(modelItem => item.Count)
</td>
<td>
@Html.DisplayFor(modelItem => item.Sum)
</td>
<td>
@Html.DisplayFor(modelItem => item.Status)
</td>
</tr>
}
</tbody>
</table>
}
</div>