Advertisement
MadCortez

Untitled

Jun 27th, 2023
1,230
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 0.78 KB | None | 0 0
  1. @{
  2.     ViewData["Title"] = "Home Page";
  3. }
  4.  
  5. @model IEnumerable<MyCloud.ViewModels.Account.UserViewModel>
  6. @if (User.Identity.IsAuthenticated && User.IsInRole("Admin"))
  7. {
  8.        <table class="table">
  9.            <tr><th>Имя</th><th>Почта</th><th>Права</th><th>Действия</th></tr>
  10.        @foreach (var item in Model)
  11.        {
  12.                    <tr>
  13.                        <td>@item.Name</td>
  14.                        <td>@item.Mail</td>
  15.                        <td>@item.Role</td>
  16.                        <td>
  17.                            <a asp-action="DeleteUser" asp-controller="Account" method="post" asp-route-id="@item.Id" asp-route-name="@item.Name">Удалить</a>
  18.                        </td>
  19.                    </tr>
  20.        }
  21.        </table>
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement