PIbd-21_BatylkinaAO_MusoevD.../Canteen/CanteenManagerApp/Views/Home/Dishes.cshtml

32 lines
1.3 KiB
Plaintext
Raw Normal View History

2023-04-09 19:05:54 +04:00
@{
ViewData["Title"] = "Dishes";
}
<body>
<div class="container">
<h2>Список блюд</h2>
<button type="button" class="btn btn-info" onclick="location.href='@Url.Action("CreateDish", "Home")'">Добавить блюдо</button>
<button type="button" class="btn btn-danger" onclick="location.href='@Url.Action("CreateDish", "Home")'">Удалить блюдо</button>
<button type="button" class="btn btn-warning" onclick="location.href='@Url.Action("CreateDish", "Home")'">Обновить блюдо</button>
<table class="table">
<thead>
<tr>
<th>Номер</th>
<th>Название блюда</th>
<th>Цена</th>
<th>Менеджер</th>
</tr>
</thead>
<tbody>
@foreach (var cook in ViewBag.Dishes)
{
<tr>
<td>@cook.Id</td>
<td>@cook.DishName</td>
<td>@cook.Price</td>
<td>@cook.ManagerId</td>
</tr>
}
</tbody>
</table>
</div>
</body>