2024-04-28 17:11:40 +04:00
|
|
|
@using Contracts.ViewModels
|
|
|
|
|
|
|
|
@model List<ProductViewModel>
|
|
|
|
|
|
|
|
@{
|
|
|
|
ViewData["Title"] = "Productions";
|
|
|
|
}
|
|
|
|
|
|
|
|
<div class="text-center">
|
2024-04-30 17:03:49 +04:00
|
|
|
<h1 class="display-4">Изделия</h1>
|
2024-04-28 17:11:40 +04:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="text-center">
|
|
|
|
@{
|
|
|
|
if (Model == null)
|
|
|
|
{
|
|
|
|
<h3 class="display-4">Авторизируйтесь</h3>
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
<p>
|
2024-05-23 20:02:34 +04:00
|
|
|
<a asp-action="CreateProduct" asp-route-id="0">Создать изделие</a>
|
2024-04-28 17:11:40 +04:00
|
|
|
</p>
|
|
|
|
<table class="table">
|
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<th>
|
|
|
|
Номер
|
|
|
|
</th>
|
|
|
|
<th>
|
|
|
|
Название изделия
|
|
|
|
</th>
|
|
|
|
<th>
|
|
|
|
Цена
|
|
|
|
</th>
|
2024-05-26 23:23:24 +04:00
|
|
|
<th>
|
|
|
|
Станок
|
|
|
|
</th>
|
2024-04-30 17:03:49 +04:00
|
|
|
<th>
|
|
|
|
Привязка станка к изделию
|
|
|
|
</th>
|
2024-04-28 17:11:40 +04:00
|
|
|
<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>
|
2024-05-26 23:23:24 +04:00
|
|
|
<td>
|
|
|
|
@Html.DisplayFor(modelItem => item.MachineName)
|
|
|
|
</td>
|
2024-04-30 17:03:49 +04:00
|
|
|
<td>
|
|
|
|
<a asp-action="ProductMachineAdd" asp-route-id="@item.Id" class="btn btn-primary">Привязать станок</a>
|
|
|
|
</td>
|
2024-04-28 17:11:40 +04:00
|
|
|
<td>
|
|
|
|
<a asp-action="CreateProduct" asp-route-id="@item.Id" class="btn btn-primary">Изменить</a>
|
|
|
|
</td>
|
|
|
|
<td>
|
2024-05-23 20:02:34 +04:00
|
|
|
<form method="post">
|
|
|
|
<input type="text" title="id" name="id" value="@item.Id" hidden="hidden" />
|
|
|
|
<input type="submit" class="btn btn-danger" value="Удалить" />
|
|
|
|
</form>
|
2024-04-28 17:11:40 +04:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
}
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
}
|
|
|
|
</div>
|