PIbd-21_BatylkinaAO_MusoevD.../Canteen/CanteenVisitorApp/Views/Home/Lunches.cshtml

40 lines
2.0 KiB
Plaintext

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