Contracts view has been modified + new view for complicated query.

This commit is contained in:
Yuee Shiness 2023-05-06 16:08:57 +04:00
parent 1ad6ecf5e2
commit 9ba327a889
2 changed files with 55 additions and 0 deletions

View File

@ -58,4 +58,8 @@
</tbody>
</table>
}
<div class="contract">
<select id="contract" name="contract" class="form-control" asp-items="@(new SelectList(@ViewBag.Contracts,"ID","CustomerFullName"))"></select>
<input type="submit" id="contractbtn" value="Finished" class="btn btn-primary" />
</div>
</div>

View File

@ -0,0 +1,51 @@
@model List<TopCarsViewModel>
@{
ViewData["Title"] = "TopCars";
}
<div class="text-center">
<h2 class="display-4">Most popular cars</h2>
</div>
<div class="text-center">
@{
<table class="table">
<thead>
<tr>
<th>
Car
</th>
<th>
Total
</th>
<th>
ContractsQuantity
</th>
</tr>
</thead>
<tbody>
@foreach (var item in Model)
{
<tr>
<td>
@Html.DisplayFor(modelItem => item.CarInfo)
</td>
<td>
@Html.DisplayFor(modelItem => item.CustomerFullName)
</td>
<td>
@Html.DisplayFor(modelItem => item.CurDate)
</td>
<td>
@Html.DisplayFor(modelItem => item.ReturnDate)
</td>
<td>
@Html.DisplayFor(modelItem => item.Price)
</td>
<td>
@Html.DisplayFor(modelItem => item.Status)
</td>
</tr>
}
</tbody>
</table>
}
</div>