71 lines
1.4 KiB
Plaintext
71 lines
1.4 KiB
Plaintext
@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>
|
|
<th>
|
|
@Html.DisplayFor(modelItem => item.ID)
|
|
</th>
|
|
<th>
|
|
@Html.DisplayFor(modelItem => item.Name)
|
|
</th>
|
|
<th>
|
|
@Html.DisplayFor(modelItem => item.EmployeeFIO)
|
|
</th>
|
|
<th>
|
|
@Html.DisplayFor(modelItem => item.Price)
|
|
</th>
|
|
<th>
|
|
@Html.DisplayFor(modelItem => item.CostNum)
|
|
</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>
|
|
</td>
|
|
</tr>
|
|
}
|
|
</tbody>
|
|
</table>
|
|
}
|
|
</div> |