34 lines
793 B
Plaintext
34 lines
793 B
Plaintext
@{
|
|
ViewData["Title"] = "Запчасти";
|
|
}
|
|
|
|
<div class="text-center">
|
|
<h1 class="display-4">Запчасти</h1>
|
|
@if (ViewBag.Items.Count != 0)
|
|
{
|
|
<center>
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th>Название</th>
|
|
<th>Цена (в рублях)</th>
|
|
<th>Количество на складе</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
@foreach (var item in ViewBag.Items)
|
|
{
|
|
<tr>
|
|
<td>@item.Name</td>
|
|
<td>@item.Price</td>
|
|
<td>@item.Count</td>
|
|
<td><a href="/Home/Item/@item.Id">Изменить</a></td>
|
|
</tr>
|
|
}
|
|
</tbody>
|
|
</table>
|
|
</center>
|
|
}
|
|
<div><center><a asp-controller="Home" asp-action="CreateItem" class="btn btn-primary">Добавить</a></center></div>
|
|
<div>@ViewBag.Exception</div>
|
|
</div> |