Lieb-Website/Lieb/Pages/Users/Index.cshtml
2022-02-15 21:59:44 +01:00

48 lines
1.2 KiB
Text

@page
@model Lieb.Pages.Users.IndexModel
@{
ViewData["Title"] = "Index";
}
<h1>Index</h1>
<p>
<a asp-page="Create">Create New</a>
</p>
<table class="table">
<thead>
<tr>
<th>
@Html.DisplayNameFor(model => model.User[0].DiscordUserId)
</th>
<th>
@Html.DisplayNameFor(model => model.User[0].Name)
</th>
<th>
@Html.DisplayNameFor(model => model.User[0].Birthday)
</th>
<th></th>
</tr>
</thead>
<tbody>
@foreach (var item in Model.User) {
<tr>
<td>
@Html.DisplayFor(modelItem => item.DiscordUserId)
</td>
<td>
@Html.DisplayFor(modelItem => item.Name)
</td>
<td>
@Html.DisplayFor(modelItem => item.Birthday)
</td>
<td>
<a asp-page="./Edit" asp-route-id="@item.UserId">Edit</a> |
<a asp-page="./Details" asp-route-id="@item.UserId">Details</a> |
<a asp-page="./Delete" asp-route-id="@item.UserId">Delete</a>
</td>
</tr>
}
</tbody>
</table>