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

69 lines
2.3 KiB
Plaintext
Raw Normal View History

2024-08-09 15:14:33 +04:00
@using ElectronicsShopContracts.ViewModels
@model (List<ProductViewModel>, string)
@{
ViewData["Title"] = "ReportSearchFix";
}
<div class="text-center">
<h1 class="row align-items-center mb-3">
<div class="text-center">
<label>Предпросмотр отчета:</label>
</div>
<div class="text-end">
<a class="btn btn-primary btn-sm" asp-action="CreateWordReport" asp-route-ids="@Model.Item2" style="background-color:#335a95;">Экспорт отчета в .docx</a>
<a class="btn btn-primary btn-sm" asp-action="CreateExcelReport" asp-route-ids="@Model.Item2" style="background-color:#04713A;">Экспорт отчета в .xlsx</a>
</div>
</h1>
</div>
<div class="text-center">
@{
if (Model.Item1 == null) {
<h3 class="display-4">Авторизируйтесь</h3>
return;
}
<table class="table">
<thead>
<tr>
<th>
Номер товара
</th>
<th>
Наименование товара
</th>
<th>
Стоимость
</th>
<th>
Номер статьи затрат
</th>
<th>
Наименование статьи затрат
</th>
</tr>
</thead>
<tbody>
@foreach (var item in Model.Item1) {
<tr>
<th>
@Html.DisplayFor(modelItem => item.ID)
</th>
<th>
@Html.DisplayFor(modelItem => item.ProductName)
</th>
<th>
@Html.DisplayFor(modelItem => item.Price)
</th>
<th>
@Html.DisplayFor(modelItem => item.CostItemID)
</th>
<th>
@Html.DisplayFor(modelItem => item.CostItemName)
</th>
</tr>
}
</tbody>
</table>
}
</div>