PIbd-21_Kouvshinoff_T._A._A.../AutomobilePlant/AutomobilePlantClientApp/Views/Home/Index.cshtml
2024-04-05 23:37:18 +04:00

70 lines
2.0 KiB
Plaintext

@using AutomobilePlantContracts.ViewModels
@model List<OrderViewModel>
@{
ViewData["Title"] = "Home Page";
}
<div class="text-center">
<h1 class="display-4">Orders</h1>
</div>
<div class="text-center">
@{
if (Model == null)
{
<h3 class="display-4">Log in!</h3>
return;
}
<p>
<a asp-action="Create">Create order</a>
</p>
<table class="table">
<thead>
<tr>
<th>
Number
</th>
<th>
Car
</th>
<th>
Date of creation
</th>
<th>
Count
</th>
<th>
Sum
</th>
<th>
Status
</th>
</tr>
</thead>
<tbody>
@foreach (var item in Model)
{
<tr>
<td>
@Html.DisplayFor(modelItem => item.Id)
</td>
<td>
@Html.DisplayFor(modelItem => item.CarName)
</td>
<td>
@Html.DisplayFor(modelItem => item.DateCreate)
</td>
<td>
@Html.DisplayFor(modelItem => item.Count)
</td>
<td>
@Html.DisplayFor(modelItem => item.Sum)
</td>
<td>
@Html.DisplayFor(modelItem => item.Status)
</td>
</tr>
}
</tbody>
</table>
}
</div>