CourseWorkElectronicsShop/ElectronicsShop/ElectronicsShopEmployeeApp/Views/Home/CostItem.cshtml

71 lines
1.4 KiB
Plaintext
Raw Normal View History

2024-05-28 12:50:24 +04:00
@using ElectronicsShopContracts.ViewModels
@model List<CostItemViewModel>
@{
ViewData["Title"] = "CostItem";
}
<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="CreateCostItem">Создать</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>
2024-05-30 13:08:24 +04:00
<th>
2024-05-28 12:50:24 +04:00
@Html.DisplayFor(modelItem => item.ID)
2024-05-30 13:08:24 +04:00
</th>
<th>
2024-05-28 12:50:24 +04:00
@Html.DisplayFor(modelItem => item.Name)
2024-05-30 13:08:24 +04:00
</th>
<th>
2024-05-28 12:50:24 +04:00
@Html.DisplayFor(modelItem => item.EmployeeFIO)
2024-05-30 13:08:24 +04:00
</th>
<th>
2024-05-28 12:50:24 +04:00
@Html.DisplayFor(modelItem => item.Price)
2024-05-30 13:08:24 +04:00
</th>
<th>
2024-05-28 12:50:24 +04:00
@Html.DisplayFor(modelItem => item.CostNum)
2024-05-30 13:08:24 +04:00
</th>
<td>
<a class="btn btn-primary btn-sm" asp-action="EditCostItem" asp-route-ID="@item.ID">Изменить</a>
<a class="btn btn-primary btn-sm" asp-action="DeleteCostItem" asp-route-ID="@item.ID">Удалить</a>
2024-05-28 12:50:24 +04:00
</td>
</tr>
}
</tbody>
</table>
}
</div>