Sergey Kozyrev
8e9e4dd321
Around the world, around the world Around the world, around the world Around the world, around the world Around the world, around the world
67 lines
1.3 KiB
Plaintext
67 lines
1.3 KiB
Plaintext
@using Contracts.ViewModels
|
|
|
|
@model List<ProductionViewModel>
|
|
|
|
@{
|
|
ViewData["Title"] = "Productions";
|
|
}
|
|
|
|
<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="CreateProduction">Создать производство</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="CreateProduction" 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> |