2024-04-28 17:11:40 +04:00
|
|
|
@using Contracts.ViewModels
|
|
|
|
|
|
|
|
@model List<ProductViewModel>
|
|
|
|
|
|
|
|
@{
|
|
|
|
ViewData["Title"] = "Productions";
|
|
|
|
}
|
|
|
|
|
|
|
|
<div class="text-center">
|
|
|
|
<h1 class="display-4">Изедлия</h1>
|
|
|
|
</div>
|
|
|
|
|
2024-04-30 00:44:32 +04:00
|
|
|
<a class="nav-link text-dark" asp-area="" asp-controller="Home" asp-action="ProductMachineAdd">Привязать станок к изделию</a>
|
2024-04-28 17:11:40 +04:00
|
|
|
|
|
|
|
<div class="text-center">
|
|
|
|
@{
|
|
|
|
if (Model == null)
|
|
|
|
{
|
|
|
|
<h3 class="display-4">Авторизируйтесь</h3>
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
<p>
|
|
|
|
<a asp-action="CreateProduct">Создать изделие</a>
|
|
|
|
</p>
|
|
|
|
<table class="table">
|
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<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)
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
@Html.DisplayFor(modelItem => item.Name)
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
@Html.DisplayFor(modelItem => item.Cost)
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
<a asp-action="CreateProduct" asp-route-id="@item.Id" class="btn btn-primary">Изменить</a>
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
<a asp-action="Delete" asp-route-id="@item.Id" class="btn btn-danger">Удалить</a>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
}
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
}
|
|
|
|
</div>
|