ISEbd-21.Gordeev.I.V.SushiB.../SushiBar/SushiBarClientApp/Views/Home/Index.cshtml

75 lines
2.2 KiB
Plaintext
Raw Normal View History

2024-04-25 13:16:23 +04:00
@using SushiBarContracts.ViewModels
@model List<OrderViewModel>
@{
2024-05-01 10:50:16 +04:00
ViewData["Title"] = "Home Page";
2024-04-25 13:16:23 +04:00
}
<div class="text-center">
2024-05-01 10:50:16 +04:00
<h1 class="display-4">Заказы</h1>
2024-04-25 13:16:23 +04:00
</div>
<div class="text-center">
2024-05-01 10:50:16 +04:00
@{
if (Model == null)
{
<h3 class="display-4">Авторизируйтесь</h3>
return;
}
<p>
<a asp-action="Create">Создать заказ</a>
</p>
<table class="table">
<thead>
<tr>
<th>
Номер
</th>
<th>
Суши
</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.SushiName)
</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>
}
2024-04-25 13:16:23 +04:00
</div>