Files
predavanja/MVC-SimpleCRUD-Layered/MVC-SimpleCRUD-Layered.Web/Views/People/_PersonRow.cshtml
Boris Milašinović 1415005b82 MVC (layered variant)
2026-04-26 13:40:03 +02:00

43 lines
1.5 KiB
Plaintext

@model PersonInfo
@{
var pagingInfo = ViewData[Constants.ViewDataKeys.PagingInfo] as PagingInfo ?? new PagingInfo();
}
<tr>
<td>@Model.FirstNameTranscription</td>
<td>@Model.LastNameTranscription</td>
<td>@Model.OriginalName</td>
<td>@Model.BirthDate.ToString("dd.MM.yyyy.")</td>
<td>@Model.CountryName</td>
<td class="text-end">
<div class="d-inline-flex gap-2">
<a
asp-action="Edit"
asp-route-id="@Model.Id"
asp-route-page="@pagingInfo.CurrentPage"
asp-route-pageSize="@pagingInfo.ItemsPerPage"
asp-route-sorts="@pagingInfo.Sorts"
asp-route-searchText="@pagingInfo.SearchText"
class="btn btn-sm btn-outline-primary"
>
Edit
</a>
<form
asp-action="Delete"
asp-route-id="@Model.Id"
method="post"
class="d-inline">
<input type="hidden" name="page" value="@pagingInfo.CurrentPage" />
<input type="hidden" name="pageSize" value="@pagingInfo.ItemsPerPage" />
<input type="hidden" name="sorts" value="@pagingInfo.Sorts" />
<input type="hidden" name="searchText" value="@pagingInfo.SearchText" />
<button type="submit"
class="btn btn-sm btn-outline-danger delete">
Delete
</button>
</form>
</div>
</td>
</tr>