@using Microsoft.AspNetCore.Identity @inject SignInManager SignInManager @* IEnumerable*@ @model IEnumerable @{ ViewBag.Title = "VetCenter"; }

Vet Center

@*

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

*@ @if (ViewBag.hasAccess != null && ViewBag.hasAccess == true) {

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

} @foreach (var item in Model) { @* @if ((SignInManager.IsSignedIn(User))) { } *@ @* Додадете условие за проверка на улогите *@ @if (SignInManager.IsSignedIn(User) && (ViewBag.hasAccess != null && ViewBag.hasAccess == true)) { } }
@Html.DisplayNameFor(model => model.vet_center_name) @Html.DisplayNameFor(model => model.adress) @Html.DisplayNameFor(model => model.workinghours) @Html.DisplayNameFor(model => model.description) @Html.DisplayNameFor(model => model.phonenumber) @Html.DisplayNameFor(model => model.latitude) @Html.DisplayNameFor(model => model.longitude) @Html.DisplayNameFor(model => model.city_name)
@Html.DisplayFor(modelItem => item.vet_center_name) @Html.DisplayFor(modelItem => item.adress) @Html.DisplayFor(modelItem => item.workinghours) @Html.DisplayFor(modelItem => item.description) @Html.DisplayFor(modelItem => item.phonenumber) @Html.DisplayFor(modelItem => item.latitude) @Html.DisplayFor(modelItem => item.longitude) @Html.DisplayFor(modelItem => item.city_name) @*@Html.DisplayFor(modelItem => item.email)*@ @*@Html.DisplayFor(modelItem => item.number)*@ @Html.ActionLink("Edit", "Edit", new { id = item.id }) | @Html.ActionLink("Details", "Details", new { id = item.id }) | @Html.ActionLink("Delete", "Delete", new { id = item.id }) @Html.ActionLink("Edit", "Edit", new { id = item.id }) | @Html.ActionLink("Details", "Details", new { id = item.id }) | @Html.ActionLink("Delete", "Delete", new { id = item.id })