PIbd-21_BatylkinaAO_MusoevD.../Canteen/CanteenVisitorApp/Views/Home/Orders.cshtml
2023-04-09 19:28:29 +04:00

33 lines
1.5 KiB
Plaintext

@{
ViewData["Title"] = "Orders";
}
<body>
<div class="container">
<h2>Список обедов</h2>
<button type="button" class="btn btn-info" onclick="location.href='@Url.Action("CreateOrder", "Home")'">Добавить заказ</button>
<button type="button" class="btn btn-danger" onclick="location.href='@Url.Action("CreateOrder", "Home")'">Удалить заказ</button>
<button type="button" class="btn btn-warning" onclick="location.href='@Url.Action("CreateOrder", "Home")'">Обновить заказ</button>
<button type="button" class="btn btn-success" onclick="location.href='@Url.Action("CreateOrder", "Home")'">Привязать повара</button>
<table class="table">
<thead>
<tr>
<th>Номер</th>
<th>Номер посетителя</th>
<th>Описание обеда</th>
<th>Сумма</th>
</tr>
</thead>
<tbody>
@foreach (var cook in ViewBag.Orders)
{
<tr>
<td>@cook.Id</td>
<td>@cook.VisitorId</td>
<td>@cook.Description</td>
<td>@cook.Sum</td>
</tr>
}
</tbody>
</table>
</div>
</body>