VirtualTask/Views/Chiusure/Index.cshtml
2023-09-27 09:28:06 +02:00

91 lines
2.5 KiB
Plaintext

@using X.PagedList.Mvc.Core;
@using X.PagedList.Web.Common;
@using X.PagedList;
@model IPagedList<VirtualTask.Models.Chiusure>
<link href="~/Content/PagedList.css" rel="stylesheet" type="text/css" />
@{
ViewData["Title"] = "Index";
}
<h1>Index</h1>
<p>
<a asp-action="Create">Create New</a>
</p>
@using (Html.BeginForm())
{
<p>
Find by name: @Html.TextBox("SearchString")
<input type="submit" value="search"/>
</p>
}
<table class="table">
<thead>
<tr>
<th>
@* @Html.DisplayNameFor(model => model.cccodazi) *@
AZIENDA
</th>
<th>
@* @Html.DisplayNameFor(model => model.cccodice) *@
CODICE
</th>
<th>
@* @Html.DisplayNameFor(model => model.ccdescr) *@
DESCRIZIONE
</th>
<th>
@* @Html.DisplayNameFor(model => model.ccdessup) *@
DESC. SUP.
</th>
<th></th>
</tr>
</thead>
<tbody>
@foreach (var item in Model) {
<tr>
<td>
@Html.DisplayFor(modelItem => item.cccodazi)
</td> @* => *@
<td>
@Html.DisplayFor(modelItem => item.cccodice)
</td>
<td>
@Html.DisplayFor(modelItem => item.ccdescr)
</td>
<td>
@Html.DisplayFor(modelItem => item.ccdessup)
</td>
<td>
@Html.ActionLink("Edit", "Edit", new { id=item.cccodice }) |
@Html.ActionLink("Delete", "Delete", new { id=item.cccodice }) |
@Html.ActionLink("Details", "Details", new { id=item.cccodice })
</td>
</tr>
}
</tbody>
</table>
<br />
<nav>
@Html.PagedListPager(Model, page => Url.Action("index", new { page = page, searchString=@ViewData["CurrentFilter"] }), new PagedListRenderOptions()
{
ActiveLiElementClass = "active",
PageClasses = new[]{ "page-link"},
LiElementClasses=new[] { "page-item" },
UlElementClasses = new[] { "pagination","justify-content-center", "mt-3" },
LinkToNextPageFormat = "Next",
LinkToPreviousPageFormat = "Previous",
MaximumPageNumbersToDisplay = 5,
DisplayLinkToPreviousPage = PagedListDisplayMode.Always,
DisplayLinkToNextPage = PagedListDisplayMode.Always
})
</nav>