VirtualTask/Views/Anag/Index.cshtml

132 lines
3.7 KiB
Plaintext

@model IPagedList<VirtualTask.Models.Anag>
@using X.PagedList;
@using X.PagedList.Mvc.Core;
@using X.PagedList.Web.Common;
<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 Rag. Sociale: @Html.TextBox("SearchString")
<input type="submit" value="Search" />
</p>
}
<table class="table">
<thead>
<tr>
@* <th>
@Html.DisplayNameFor(model => model.antipcon)
</th>*@
<th>
Codice
</th>
<th>
Rag. Sociale
</th>
@* <th>
@Html.DisplayNameFor(model => model.an_email)
</th>*@
<th>
Codice Fiscale
</th>
<th>
Partita Iva
</th>
@*
<th>
@Html.DisplayNameFor(model => model.anindiri)
</th>
<th>
@Html.DisplayNameFor(model => model.antelefo)
</th>
<th>
@Html.DisplayNameFor(model => model.annumcel)
</th>
<th>
@Html.DisplayNameFor(model => model.an_empec)
</th>
<th>
@Html.DisplayNameFor(model => model.annumlis)
</th>
<th>
@Html.DisplayNameFor(model => model.andtobso)
</th>*@
<th></th>
</tr>
</thead>
<tbody>
@foreach (var item in Model) {
<tr>
@* <td>
@Html.DisplayFor(modelItem => item.antipcon)
</td>*@
<td>
@Html.DisplayFor(modelItem => item.ancodice)
</td>
<td>
@Html.DisplayFor(modelItem => item.andescri)
</td>
@* <td>
@Html.DisplayFor(modelItem => item.an_email)
</td>*@
<td>
@Html.DisplayFor(modelItem => item.ancodfis)
</td>
<td>
@Html.DisplayFor(modelItem => item.anpariva)
</td>
@* <td>
@Html.DisplayFor(modelItem => item.anindiri)
</td>
<td>
@Html.DisplayFor(modelItem => item.antelefo)
</td>
<td>
@Html.DisplayFor(modelItem => item.annumcel)
</td>
<td>
@Html.DisplayFor(modelItem => item.an_empec)
</td>
<td>
@Html.DisplayFor(modelItem => item.annumlis)
</td>
<td>
@Html.DisplayFor(modelItem => item.andtobso)
</td>*@
<td>
@Html.ActionLink("Edit", "Edit", new { id = item.ancodice }) |
@Html.ActionLink("Details", "Details", new { id = item.ancodice }) |
@Html.ActionLink("Delete", "Delete", new { id = item.ancodice })
</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>