74 lines
1.4 KiB
Plaintext
74 lines
1.4 KiB
Plaintext
|
@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>
|
||
|
<a asp-action="CreateWorkshop">Создать цех</a>
|
||
|
</p>
|
||
|
<table class="table">
|
||
|
<thead>
|
||
|
<tr>
|
||
|
<th>
|
||
|
Номер
|
||
|
</th>
|
||
|
<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.Title)
|
||
|
</td>
|
||
|
<td>
|
||
|
@Html.DisplayFor(modelItem => item.Address)
|
||
|
</td>
|
||
|
<td>
|
||
|
@Html.DisplayFor(modelItem => item.Director)
|
||
|
</td>
|
||
|
<td>
|
||
|
<a asp-action="CreateWorkshop" 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>
|