59 lines
1.5 KiB
Plaintext
59 lines
1.5 KiB
Plaintext
|
@using ComputerHardwareStoreContracts.ViewModels
|
||
|
@model List<ComponentViewModel>
|
||
|
@{
|
||
|
ViewData["Title"] = "Components";
|
||
|
}
|
||
|
<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 class="text-decoration-none me-3 text-black h5" asp-action="CreateComponent">Создать комплектующее</a>
|
||
|
<a class="text-decoration-none me-3 text-black h5" asp-action="UpdateComponent">Изменить комплектующее</a>
|
||
|
<a class="text-decoration-none me-3 text-black h5" asp-action="ComponentToBuild">Привязать комплектующее к сборке</a>
|
||
|
<a class="text-decoration-none text-black h5" asp-action="DeleteComponent">Удалить комплектующее</a>
|
||
|
</p>
|
||
|
|
||
|
<table class="componentTable">
|
||
|
<thead>
|
||
|
<tr>
|
||
|
<th>
|
||
|
Номер
|
||
|
</th>
|
||
|
<th>
|
||
|
Название
|
||
|
</th>
|
||
|
<th>
|
||
|
Цена
|
||
|
</th>
|
||
|
|
||
|
</tr>
|
||
|
</thead>
|
||
|
<tbody>
|
||
|
<tbody>
|
||
|
@foreach (var component in Model)
|
||
|
{
|
||
|
<tr>
|
||
|
<td>
|
||
|
@Html.DisplayFor(modelItem => component.Id)
|
||
|
</td>
|
||
|
<td>
|
||
|
@Html.DisplayFor(modelItem => component.ComponentName)
|
||
|
</td>
|
||
|
<td>
|
||
|
@Html.DisplayFor(modelItem => component.ComponentPrice)
|
||
|
</td>
|
||
|
</tr>
|
||
|
}
|
||
|
</tbody>
|
||
|
</tbody>
|
||
|
</table>
|
||
|
}
|
||
|
</div>
|