VirtualTask/Views/CommesseVT/Index.cshtml
2025-11-14 15:30:49 +01:00

187 lines
9.3 KiB
Plaintext

@using X.PagedList.Mvc.Core;
@using X.PagedList.Web.Common;
@using X.PagedList;
@model IPagedList<VirtualTask.Models.CommesseVT>
<link href="~/Content/PagedList.css" rel="stylesheet" type="text/css" />
@{
ViewData["Title"] = "Commesse";
Layout = "~/Views/Shared/_LayoutAreaRiservata.cshtml";
}
@* <h1>Index</h1> *@
<div class="agy-project-wrapper agy-project-page-wrapper">
<div class="container">
<div class="row">
<p>
<a asp-action="Create" class="info-data"><img src="~/assets/images/icons8-nuovo-50.png" alt="Crea nuova commessa" /></a>
</p>
@using (Html.BeginForm())
{
<div class="card">
<h5 class="card-header">Ricerca</h5>
<div class="table-responsive text-nowrap">
<table class="table">
<tbody class="table-border-bottom-0">
<tr>
<td>
<span class="fw-medium">@Html.TextBox("SearchString", null, new { placeholder = "Cerca per Cliente", @class = "agy-form-field require"})</span>
</td>
<td>
<i class="bx bxl-angular bx-sm text-black me-3">&nbsp;</i>
<span class="fw-medium"><input type="submit" value="Cerca" class="agy-btn submitForm" /></span>
</td>
</tr>
</tbody>
</table>
</div>
</div>
@* <div>
<div style="float:left;width:40%;padding:0 20px;">@Html.TextBox("SearchString", null, new { placeholder = "Cerca per commessa", @class = "agy-form-field require" })</div>
<div style="float:left;width:2%;">&nbsp;</div>
<div style="float:left;width:57%;"><input type="submit" value="Cerca" class="agy-btn submitForm" /></div>
</div> *@
}
<div style="width:100%;height:30px;">
&nbsp;
</div>
<div class="card">
<h5 class="card-header">Commesse</h5>
<div class="table-responsive text-nowrap">
<table class="table table-striped">
<thead>
<tr>
<th hidden>Seriale Commessa</th>
<th hidden>Azienda</th>
<th>Codice Commessa</th>
<th>Descrizione</th>
<th hidden>Fine validita Commessa</th>
<th hidden>Tipo</th>
@* <th>Cod. Cliente</th> *@
<th>Cliente</th>
<th>Impianto</th>
<th hidden>tipo ind</th>
<th hidden>indirizzo</th>
<th hidden>numero</th>
<th hidden>lettera</th>
<th hidden>scala</th>
<th hidden>CAP</th>
<th hidden>provincia</th>
<th></th>
</tr>
</thead>
<tbody class="table-border-bottom-0">
@foreach (var item in Model)
{
<tr>
<td hidden>
@Html.DisplayFor(modelItem => item.laserial)
</td>
<td hidden>
@Html.DisplayFor(modelItem => item.lacodazi)
</td>
<td>
@Html.DisplayFor(modelItem => item.lacodcom)
</td>
<td>
@Html.DisplayFor(modelItem => item.ladeslav)
</td>
<td hidden>
@Html.DisplayFor(modelItem => item.ladatchi)
</td>
<td hidden>
@Html.DisplayFor(modelItem => item.latipcli)
</td>
@* <td>
@Html.DisplayFor(modelItem => item.lacodcli)
</td> *@
<td>
@Html.DisplayFor(modelItem => item.andescri)
</td>
<td>
@Html.DisplayFor(modelItem => item.imcodimp)
</td>
<td hidden>
@Html.DisplayFor(modelItem => item.imindiri1)
</td>
<td hidden>
@Html.DisplayFor(modelItem => item.imindiri2)
</td>
<td hidden>
@Html.DisplayFor(modelItem => item.imindiri3)
</td>
<td hidden>
@Html.DisplayFor(modelItem => item.imindiri4)
</td>
<td hidden>
@Html.DisplayFor(modelItem => item.imindiri5)
</td>
<td hidden>
@Html.DisplayFor(modelItem => item.imlocali)
</td>
<td hidden>
@Html.DisplayFor(modelItem => item.imcodcap)
</td>
<td hidden>
@Html.DisplayFor(modelItem => item.improvin)
</td>
@Html.HiddenFor(modelItem => item.lacodcli)
<td>
<a href="@Url.Action("Edit", "CommesseVT", new { id=item.laserial, azienda = item.lacodazi })" title="Modifica" class="links">
<img alt="Modifica" src="@Url.Content("~/assets/images/icons8-modificare-64.png")" style="width:30px;height:30px;">
</a>
<a href="@Url.Action("Details", "CommesseVT", new { id=item.laserial, azienda = item.lacodazi })" title="Dettaglio" class="links">
<img alt="Dettaglio" src="@Url.Content("~/assets/images/icons8-visualizza-file-64.png")" style="width:30px;height:30px;">
</a>
@{
string _url_del = @Url.Action("Delete", "CommesseVT", new { id = item.laserial, azienda = item.lacodazi });
string flagComGen = string.Empty;
flagComGen = string.IsNullOrEmpty(item.lacomgen) ? "N" : item.lacomgen;
if (!flagComGen.Equals("S"))
{
<a href="@_url_del" title="Elimina" class="links">
<img alt="Elimina" src="~/assets/images/icons8-elimina-50.png" style="width:30px;height:30px;">
</a>
}
}
</td>
</tr>
}
</tbody>
</table>
</div>
</div>
<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 = "Successiva",
LinkToPreviousPageFormat = "Precedente",
MaximumPageNumbersToDisplay = 5,
DisplayLinkToPreviousPage = PagedListDisplayMode.Always,
DisplayLinkToNextPage = PagedListDisplayMode.Always
})
</nav>
</div>
</div>
</div>