64 lines
1.1 KiB
Plaintext
64 lines
1.1 KiB
Plaintext
|
@using ElectronicsShopContracts.ViewModels
|
||
|
|
||
|
@model List<ProductViewModel>
|
||
|
|
||
|
@{
|
||
|
ViewData["Title"] = "Home Page";
|
||
|
}
|
||
|
|
||
|
<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="Create">Создать продукта</a>
|
||
|
</p>
|
||
|
<table class="table">
|
||
|
<thead>
|
||
|
<th>
|
||
|
<th>
|
||
|
Номер продукта
|
||
|
</th>
|
||
|
<th>
|
||
|
Статья затрат
|
||
|
</th>
|
||
|
<th>
|
||
|
Название продукта
|
||
|
</th>
|
||
|
<th>
|
||
|
Сумма
|
||
|
</th>
|
||
|
<th>
|
||
|
Статус оплаты
|
||
|
</th>
|
||
|
</th>
|
||
|
</thead>
|
||
|
<tbody>
|
||
|
@foreach (var item in Model) {
|
||
|
<th>
|
||
|
<th>
|
||
|
@Html.DisplayFor(modelItem => item.ID)
|
||
|
</th>
|
||
|
<th>
|
||
|
@Html.DisplayFor(modelItem => item.CostItemID)
|
||
|
</th>
|
||
|
<th>
|
||
|
@Html.DisplayFor(modelItem => item.ProductName)
|
||
|
</th>
|
||
|
<th>
|
||
|
@Html.DisplayFor(modelItem => item.Price)
|
||
|
</th>
|
||
|
</th>
|
||
|
}
|
||
|
</tbody>
|
||
|
</table>
|
||
|
}
|
||
|
</div>
|