ISEbd-22_Alimova_M.S._Confe.../Confectionery/ConfectioneryClientApp/Views/Home/Index.cshtml

69 lines
1.2 KiB
Plaintext
Raw Permalink Normal View History

2024-05-03 20:14:20 +04:00
@using ConfectioneryContracts.ViewModels
@model List<OrderViewModel>
@{
ViewData["Title"] = "Home Page";
}
<div class="text-center">
2024-05-03 20:14:20 +04:00
<h1 class="display-4">Заказы</h1>
</div>
2024-05-03 20:14:20 +04:00
<div class="text-center">
@{
if (Model == null)
{
<h3 class="display-4">Авторизуйтесь</h3>
2024-05-03 20:14:20 +04:00
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)
2024-05-03 20:14:20 +04:00
</td>
<td>
@Html.DisplayFor(modelItem => item.PastryName)
2024-05-03 20:14:20 +04:00
</td>
<td>
@Html.DisplayFor(modelItem => item.DateCreate)
2024-05-03 20:14:20 +04:00
</td>
<td>
@Html.DisplayFor(modelItem => item.Count)
2024-05-03 20:14:20 +04:00
</td>
<td>
@Html.DisplayFor(modelItem => item.Sum)
2024-05-03 20:14:20 +04:00
</td>
<td>
@Html.DisplayFor(modelItem => item.Status)
2024-05-03 20:14:20 +04:00
</td>
</tr>
}
</tbody>
</table>
}
</div>