2024-04-30 00:42:26 +04:00
|
|
|
@using Contracts.ViewModels
|
|
|
|
|
|
|
|
@model List<WorkshopViewModel>
|
|
|
|
|
|
|
|
@{
|
|
|
|
ViewData["Title"] = "Workshops";
|
|
|
|
}
|
|
|
|
|
|
|
|
<div class="text-center">
|
|
|
|
<h1 class="display-4">Цеха</h1>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="text-center">
|
|
|
|
@{
|
|
|
|
if (Model == null)
|
|
|
|
{
|
|
|
|
<h3 class="display-4">Авторизируйтесь</h3>
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
<p>
|
2024-05-27 21:03:42 +04:00
|
|
|
<a asp-action="CreateWorkshop" asp-route-id="0">Создать цех</a>
|
2024-04-30 00:42:26 +04:00
|
|
|
</p>
|
|
|
|
<table class="table">
|
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<th>
|
|
|
|
Номер
|
|
|
|
</th>
|
|
|
|
<th>
|
|
|
|
Название цеха
|
|
|
|
</th>
|
|
|
|
<th>
|
|
|
|
Адрес цеха
|
|
|
|
</th>
|
|
|
|
<th>
|
|
|
|
Директор цеха
|
|
|
|
</th>
|
|
|
|
<th>
|
2024-05-27 21:03:42 +04:00
|
|
|
Работник
|
2024-04-30 00:42:26 +04:00
|
|
|
</th>
|
|
|
|
<th>
|
2024-05-27 21:03:42 +04:00
|
|
|
Привязка производства к цеху
|
|
|
|
</th>
|
|
|
|
<th>
|
|
|
|
Изменить цех
|
|
|
|
</th>
|
|
|
|
<th>
|
|
|
|
Удалить цех
|
2024-04-30 00:42:26 +04:00
|
|
|
</th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
@foreach (var item in Model)
|
|
|
|
{
|
|
|
|
<tr>
|
|
|
|
<td>
|
|
|
|
@Html.DisplayFor(modelItem => item.Id)
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
@Html.DisplayFor(modelItem => item.Title)
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
@Html.DisplayFor(modelItem => item.Address)
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
@Html.DisplayFor(modelItem => item.Director)
|
|
|
|
</td>
|
2024-05-27 21:03:42 +04:00
|
|
|
<th>
|
|
|
|
@Html.DisplayFor(modelItem => item.ProductionName)
|
|
|
|
</th>
|
2024-04-30 00:42:26 +04:00
|
|
|
<td>
|
|
|
|
<a asp-action="CreateWorkshop" asp-route-id="@item.Id" class="btn btn-primary">Изменить</a>
|
|
|
|
</td>
|
|
|
|
<td>
|
2024-05-27 21:03:42 +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-30 00:42:26 +04:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
}
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
}
|
|
|
|
</div>
|