150 lines
4.4 KiB
Plaintext
150 lines
4.4 KiB
Plaintext
@model IPagedList<VirtualTask.Models.Impianto>
|
|
@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"] = "Impianti";
|
|
}
|
|
|
|
<h1>Impianti</h1>
|
|
|
|
<p>
|
|
<a asp-action="Create">Create New</a>
|
|
</p>
|
|
@using (Html.BeginForm())
|
|
{
|
|
<p>
|
|
Find by indirizzo: @Html.TextBox("SearchString")
|
|
<input type="submit" value="Search" />
|
|
</p>
|
|
}
|
|
<table class="table">
|
|
<thead>
|
|
<tr>
|
|
<th>
|
|
Cod. Impianto
|
|
</th>
|
|
<th>
|
|
Azienda
|
|
</th>
|
|
<th>
|
|
Descrizione
|
|
</th>
|
|
<th>Indirizzo</th>
|
|
@* <th>
|
|
@Html.DisplayNameFor(model => model.imindiri1)
|
|
</th>
|
|
<th>
|
|
@Html.DisplayNameFor(model => model.imindiri2)
|
|
</th>
|
|
<th>
|
|
@Html.DisplayNameFor(model => model.imindiri3)
|
|
</th>
|
|
<th>
|
|
@Html.DisplayNameFor(model => model.imindiri4)
|
|
</th>
|
|
<th>
|
|
@Html.DisplayNameFor(model => model.imindiri5)
|
|
</th>
|
|
<th>
|
|
@Html.DisplayNameFor(model => model.imlocali)
|
|
</th>
|
|
<th>
|
|
@Html.DisplayNameFor(model => model.imcodcap)
|
|
</th>
|
|
<th>
|
|
@Html.DisplayNameFor(model => model.imcomune)
|
|
</th>
|
|
<th>
|
|
@Html.DisplayNameFor(model => model.improvin)
|
|
</th>*@
|
|
<th>
|
|
Cod. Cliente
|
|
</th>
|
|
<th></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
@foreach (var item in Model) {
|
|
|
|
string message = string.Empty;
|
|
if (!string.IsNullOrEmpty(item.imindiri1))
|
|
message = message + item.imindiri1;
|
|
if (!string.IsNullOrEmpty(item.imindiri2))
|
|
message = " "+message + item.imindiri2;
|
|
if (item.imindiri3!=null)
|
|
message = "," + message + Convert.ToString( item.imindiri3);
|
|
|
|
|
|
|
|
<tr>
|
|
<td>
|
|
@Html.DisplayFor(modelItem => item.imcodimp)
|
|
</td>
|
|
<td>
|
|
@Html.DisplayFor(modelItem => item.imcodazi)
|
|
</td>
|
|
<td>
|
|
@Html.DisplayFor(modelItem => item.imdescri)
|
|
</td>
|
|
<td>
|
|
@Html.DisplayFor(modelItem => item.indirizzo)
|
|
</td>
|
|
@* <td>
|
|
@Html.DisplayFor(modelItem => item.imindiri1)
|
|
</td>
|
|
<td>
|
|
@Html.DisplayFor(modelItem => item.imindiri2)
|
|
</td>
|
|
<td>
|
|
@Html.DisplayFor(modelItem => item.imindiri3)
|
|
</td>
|
|
<td>
|
|
@Html.DisplayFor(modelItem => item.imindiri4)
|
|
</td>
|
|
<td>
|
|
@Html.DisplayFor(modelItem => item.imindiri5)
|
|
</td>
|
|
<td>
|
|
@Html.DisplayFor(modelItem => item.imlocali)
|
|
</td>
|
|
<td>
|
|
@Html.DisplayFor(modelItem => item.imcodcap)
|
|
</td>
|
|
<td>
|
|
@Html.DisplayFor(modelItem => item.imcomune)
|
|
</td>
|
|
<td>
|
|
@Html.DisplayFor(modelItem => item.improvin)
|
|
</td>*@
|
|
|
|
<td>
|
|
@Html.DisplayFor(modelItem => item.imultcli)
|
|
</td>
|
|
<td>
|
|
@Html.ActionLink("Edit", "Edit", new { /* id=item.PrimaryKey */ }) |
|
|
@Html.ActionLink("Details", "Details", new { /* id=item.PrimaryKey */ }) |
|
|
@Html.ActionLink("Delete", "Delete", new { /* id=item.PrimaryKey */ })
|
|
</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>
|