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

73 lines
1.3 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>
<p>
<a asp-action="UpdateCostItem">Изменить</a>
</p>
<p>
2024-05-29 21:21:17 +04:00
<a asp-action="DeleteCostItem">Удалить</a>
2024-05-28 12:50:24 +04:00
</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.EmployeeFIO)
</td>
<td>
@Html.DisplayFor(modelItem => item.Price)
</td>
<td>
@Html.DisplayFor(modelItem => item.CostNum)
</td>
</tr>
}
</tbody>
</table>
}
</div>