Files
First_Exercise/test/Views/Users/Index.cshtml
2025-07-15 11:14:03 +03:30

58 lines
1.4 KiB
Plaintext

@model IEnumerable<test.Models.User>
@{
ViewBag.Title = "Index";
}
<h2>Index</h2>
<p>
@Html.ActionLink("Create New", "Create")
</p>
<table class="table">
<tr>
<th>
@Html.DisplayNameFor(model => model.User_Name)
</th>
<th>
@Html.DisplayNameFor(model => model.User_LastName)
</th>
<th>
@Html.DisplayNameFor(model => model.User_PhoneNumber)
</th>
<th>
@Html.DisplayNameFor(model => model.User_Password)
</th>
<th>
@Html.DisplayNameFor(model => model.User_Status)
</th>
<th></th>
</tr>
@foreach (var item in Model) {
<tr>
<td>
@Html.DisplayFor(modelItem => item.User_Name)
</td>
<td>
@Html.DisplayFor(modelItem => item.User_LastName)
</td>
<td>
@Html.DisplayFor(modelItem => item.User_PhoneNumber)
</td>
<td>
@Html.DisplayFor(modelItem => item.User_Password)
</td>
<td>
@Html.DisplayFor(modelItem => item.User_Status)
</td>
<td>
@Html.ActionLink("Edit", "Edit", new { id=item.User_ID }) |
@Html.ActionLink("Details", "Details", new { id=item.User_ID }) |
@Html.ActionLink("Delete", "Delete", new { id=item.User_ID })
</td>
</tr>
}
</table>