55 lines
1.6 KiB
Plaintext
55 lines
1.6 KiB
Plaintext
@using CarShowroomDataModels.Views
|
|
@model List<SaleView>
|
|
@{
|
|
ViewData["Title"] = "Sales";
|
|
}
|
|
<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="SaleCreate">Создать продажу</a>
|
|
<a asp-action="SaleDelete">Удалить продажу</a>
|
|
</p>
|
|
<table class="table">
|
|
<thead>
|
|
<tr>
|
|
<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.Cost)
|
|
</td>
|
|
<td>
|
|
@Html.DisplayFor(modelItem =>
|
|
item.EmployeeName)
|
|
</td>
|
|
<td>
|
|
@Html.DisplayFor(modelItem =>
|
|
item.ClientName)
|
|
</td>
|
|
</tr>
|
|
}
|
|
</tbody>
|
|
</table>
|
|
}
|
|
</div>
|