Files
rent-a-car/RentACar/WebApp/Views/Users/Index.cshtml
2022-04-08 22:09:31 +03:00

69 lines
1.7 KiB
Plaintext

@model IEnumerable<Data.Entities.User>
@{
ViewData["Title"] = "Users";
}
<h1>Users</h1>
<p>
<a type="button" class="btn btn-primary" asp-action="Create">Create user</a>
</p>
<table class="table table-striped">
<thead>
<tr>
<th>
First name
</th>
<th>
Last name
</th>
<th>
ID number
</th>
<th>
Username
</th>
<th>
E-mail
</th>
<th>
Phone number
</th>
<th>
Actions
</th>
</tr>
</thead>
<tbody>
@foreach (var item in Model)
{
<tr>
<td>
@Html.DisplayFor(modelItem => item.FirstName)
</td>
<td>
@Html.DisplayFor(modelItem => item.LastName)
</td>
<td>
@Html.DisplayFor(modelItem => item.PersonalNumber)
</td>
<td>
@Html.DisplayFor(modelItem => item.UserName)
</td>
<td>
@Html.DisplayFor(modelItem => item.Email)
</td>
<td>
@Html.DisplayFor(modelItem => item.PhoneNumber)
</td>
<td>
<a asp-action="Edit" asp-route-id="@item.Id">Edit</a> |
<a asp-action="Details" asp-route-id="@item.Id">Details</a> |
<a asp-action="Delete" asp-route-id="@item.Id">Delete</a>
</td>
</tr>
}
</tbody>
</table>