main
Last change
on this file was 118e414, checked in by ElenaMoskova <elena.moskova99@…>, 3 months ago |
fix access
implement multiple access pages with different roles
optimize present three structure of BlogPost and Answer
|
-
Property mode
set to
100644
|
File size:
2.3 KB
|
Rev | Line | |
---|
[2aea0fd] | 1 | @model IEnumerable<PostgreSqlDotnetCore.Models.UsersClass>
|
---|
| 2 |
|
---|
| 3 | @{
|
---|
| 4 | ViewBag.Title = "Customer";
|
---|
| 5 | }
|
---|
| 6 |
|
---|
| 7 | <h2>Customer</h2>
|
---|
| 8 | @{
|
---|
| 9 | if (Model == null)
|
---|
| 10 | {
|
---|
| 11 | <b>
|
---|
| 12 | <br />
|
---|
| 13 | <h4>Not Authorize</h4>
|
---|
| 14 | </b>
|
---|
| 15 | }
|
---|
| 16 | else
|
---|
| 17 | {
|
---|
| 18 |
|
---|
[118e414] | 19 | /* <p>
|
---|
[2aea0fd] | 20 | @Html.ActionLink("Create New", "Create")
|
---|
| 21 | </p>
|
---|
[118e414] | 22 | */
|
---|
| 23 |
|
---|
| 24 | @if (ViewBag.CanCreate)
|
---|
| 25 | {
|
---|
| 26 | <p>
|
---|
| 27 | @Html.ActionLink("Create New", "Create")
|
---|
| 28 | </p>
|
---|
| 29 | }
|
---|
[2aea0fd] | 30 | <table class="table">
|
---|
| 31 | <tr>
|
---|
| 32 | <th>
|
---|
| 33 | @Html.DisplayNameFor(model => model.name)
|
---|
| 34 | </th>
|
---|
| 35 | <th>
|
---|
| 36 | @Html.DisplayNameFor(model => model.lastname)
|
---|
| 37 | </th>
|
---|
| 38 | <th>
|
---|
| 39 | @Html.DisplayNameFor(model => model.email)
|
---|
| 40 | </th>
|
---|
| 41 | <th>
|
---|
| 42 | @Html.DisplayNameFor(model => model.number)
|
---|
| 43 | </th>
|
---|
| 44 | <th>
|
---|
| 45 | @Html.DisplayNameFor(model => model.role_id)
|
---|
| 46 | </th>
|
---|
| 47 | <th>
|
---|
| 48 | @Html.DisplayNameFor(model => model.jobs_id)
|
---|
| 49 | </th>
|
---|
| 50 | <th></th>
|
---|
| 51 | </tr>
|
---|
| 52 |
|
---|
| 53 | @foreach (var item in Model)
|
---|
| 54 | {
|
---|
| 55 | <tr>
|
---|
| 56 | <td>
|
---|
| 57 | @Html.DisplayFor(modelItem => item.name)
|
---|
| 58 | </td>
|
---|
| 59 | <td>
|
---|
| 60 | @Html.DisplayFor(modelItem => item.lastname)
|
---|
| 61 | </td>
|
---|
| 62 |
|
---|
| 63 | <td>
|
---|
| 64 | @Html.DisplayFor(modelItem => item.email)
|
---|
| 65 | </td>
|
---|
| 66 | <td>
|
---|
| 67 | @Html.DisplayFor(modelItem => item.number)
|
---|
| 68 | </td>
|
---|
| 69 | <td>
|
---|
| 70 | @Html.DisplayFor(modelItem => item.GetRoleName)
|
---|
| 71 | </td>
|
---|
| 72 | <td>
|
---|
| 73 | @Html.DisplayFor(modelItem => item.GetJobName)
|
---|
| 74 | </td>
|
---|
| 75 | <td>
|
---|
| 76 | @Html.ActionLink("Edit", "Edit", new { id = item.id }) |
|
---|
| 77 | @Html.ActionLink("Details", "Details", new { id = item.id }) |
|
---|
| 78 | @Html.ActionLink("Delete", "Delete", new { id = item.id })
|
---|
| 79 | </td>
|
---|
| 80 | </tr>
|
---|
| 81 | }
|
---|
| 82 |
|
---|
| 83 | </table>
|
---|
| 84 | }
|
---|
| 85 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.