@model IEnumerable @{ ViewBag.Title = "Customer"; }

Customer

@{ if (Model == null) {

Not Authorize

} else { /*

@Html.ActionLink("Create New", "Create")

*/ @if (ViewBag.CanCreate) {

@Html.ActionLink("Create New", "Create")

} @foreach (var item in Model) { }
@Html.DisplayNameFor(model => model.name) @Html.DisplayNameFor(model => model.lastname) @Html.DisplayNameFor(model => model.email) @Html.DisplayNameFor(model => model.number) @Html.DisplayNameFor(model => model.role_id) @Html.DisplayNameFor(model => model.jobs_id)
@Html.DisplayFor(modelItem => item.name) @Html.DisplayFor(modelItem => item.lastname) @Html.DisplayFor(modelItem => item.email) @Html.DisplayFor(modelItem => item.number) @Html.DisplayFor(modelItem => item.GetRoleName) @Html.DisplayFor(modelItem => item.GetJobName) @Html.ActionLink("Edit", "Edit", new { id = item.id }) | @Html.ActionLink("Details", "Details", new { id = item.id }) | @Html.ActionLink("Delete", "Delete", new { id = item.id })
} }