66 lines
1.2 KiB
Plaintext
66 lines
1.2 KiB
Plaintext
@using ComputerShopContracts.ViewModels
|
|
|
|
@model List<AssemblyViewModel>
|
|
|
|
@{
|
|
ViewData["Title"] = "Assembly";
|
|
}
|
|
|
|
<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="CreateAssembly">Создать сборку</a>
|
|
</p>
|
|
<p>
|
|
<a asp-action="EditAssembly">Изменить сборку</a>
|
|
</p>
|
|
<p>
|
|
<a asp-action="DeleteAssembly">Удалить сборку</a>
|
|
</p>
|
|
<p>
|
|
<a asp-action="AddComponentToAssembly">Добавить комплектующее к сборке</a>
|
|
</p>
|
|
<table class="table">
|
|
<thead>
|
|
<tr>
|
|
<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.AssemblyName)
|
|
</td>
|
|
<td>
|
|
@Html.DisplayFor(modelItem => item.Price)
|
|
</td>
|
|
</tr>
|
|
}
|
|
</tbody>
|
|
</table>
|
|
}
|
|
</div> |