49 lines
1.5 KiB
Plaintext
49 lines
1.5 KiB
Plaintext
@using CarShowroomDataModels.Views
|
|
@model List<ClientView>
|
|
@{
|
|
ViewData["Title"] = "Clients";
|
|
}
|
|
<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="ClientCreate">Зарегистрировать клиента</a>
|
|
<a asp-action="ClientUpdate">Обновить данные клиента</a>
|
|
</p>
|
|
<table class="table">
|
|
<thead>
|
|
<tr>
|
|
<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.Name)
|
|
</td>
|
|
<td>
|
|
@Html.DisplayFor(modelItem =>
|
|
item.PhoneNumber)
|
|
</td>
|
|
</tr>
|
|
}
|
|
</tbody>
|
|
</table>
|
|
}
|
|
</div> |