SoftwayWeb/Views/Giri/Index.cshtml
2024-07-09 17:40:30 +02:00

115 lines
5.2 KiB
Plaintext

@* @model IEnumerable<SoftwayWeb.Models.GiriConsegnaView> *@
@model IPagedList<SoftwayWeb.Models.GiriConsegnaView>
@using X.PagedList;
@using X.PagedList.Mvc.Core;
@using X.PagedList;
@* @using X.PagedList.Web.Common; *@
@{
ViewData["Title"] = "Giri di consegna";
Layout = "~/Views/Shared/_LayoutAreaRis.cshtml";
}
@*
@{
ViewData["Title"] = "Index";
}
<h1>Giri di consegna</h1> *@
<h1>Giri di consegna</h1>
<p>
<a asp-action="Create">Aggiungi nuovo giro di consegna</a>
</p>
@using (Html.BeginForm())
{
@* <div>@Html.TextBox("codAutista", null, new { placeholder = "Codice autista", @class = "agy-form-field require" })</div> *@
<div>@Html.DropDownList("codAutista", ViewBag.Autisti, null, new { @class = "agy-form-field require" })</div>
<br />
<div>@Html.TextBox("data", null, new { type = "date", @class = "agy-form-field require" })</div>
<br />
<div>
@Html.CheckBox("aperto", new { placeholder ="aperto", @checked = true, })
@Html.Label("aperto", "aperto")
</div>
<br />
<div style="float:left;width:57%;"><input type="submit" value="Cerca" class="agy-btn submitForm" /></div>
}
<table class="table">
<thead>
<tr>
<th>Data</th>
<th>Autista</th>
<th>Automezzo</th>
<th><img alt="nocons" src="@Url.Content("~/images/pallet.png")" style="width:31px;height:31px;">Par</th>
<th><img alt="nocons" src="@Url.Content("~/images/icons8-euro-30.png")" style="width:31px;height:31px;">Par</th>
<th><img alt="nocons" src="@Url.Content("~/images/pallet.png")" style="width:31px;height:31px;">Rit</th>
<th><img alt="nocons" src="@Url.Content("~/images/icons8-euro-30.png")" style="width:31px;height:31px;">Rit</th>
<th><img alt="nocons" src="@Url.Content("~/images/pallet.png")" style="width:31px;height:31px;">Temp</th>
<th><img alt="nocons" src="@Url.Content("~/images/icons8-euro-30.png")" style="width:31px;height:31px;">Temp</th>
<th style="width:12%;">&nbsp;</th>
</tr>
</thead>
<tbody>
@foreach (var item in Model)
{
<tr>
<td>
@Html.DisplayFor(modelItem => item.DataGiro)
</td>
<td>
@Html.DisplayFor(modelItem => item.CodAutista) - @Html.DisplayFor(modelItem => item.Autista)
</td>
<td>
@Html.DisplayFor(modelItem => item.CodMezzo) - @Html.DisplayFor(modelItem => item.Automezzo)
</td>
<td>
@Html.DisplayFor(modelItem => item.BancaliCaricati)
</td>
<td>
@Html.DisplayFor(modelItem => item.ImportoDaRecuperare)
</td>
<td>
@Html.DisplayFor(modelItem => item.BancaliRecuperati)
</td>
<td>
@Html.DisplayFor(modelItem => item.ImportoRecuperato)
</td>
<td>
@Html.DisplayFor(modelItem => item.parzialeBanRec)
</td>
<td>
@Html.DisplayFor(modelItem => item.parzialeImpRec)
</td>
<td>
<a href="@Url.ActionLink("Index", "Destinazioni", new { id=item.SerialeGiro, codAutista=item.CodAutista, dataGiro=item.DataGiro, codMezzo=item.CodMezzo })" title="Destinazioni" class="links"><img alt="nocons" src="@Url.Content("~/images/icons8-oggetti-puntiforme-30.png")" style="width:24px;height:24px;"></a>
<a href="@Url.ActionLink("Bancali", "GiriChiudi", new { id=item.SerialeGiro })" title="Bancali" class="links"><img alt="nocons" src="@Url.Content("~/images/icons8-bancale-24.png")" style="width:24px;height:24px;"></a>
<a href="@Url.ActionLink("Chiudi", "GiriChiudi", new { id=item.SerialeGiro })" title="Chiudi" class="links"><img alt="nocons" src="@Url.Content("~/images/icons8-bandiera-a-scacchi-64.png")" style="width:24px;height:24px;"></a>
<a href="@Url.ActionLink("Riapri", "GiriChiudi", new { id=item.SerialeGiro })" title="Riapri" class="links"><img alt="nocons" src="@Url.Content("~/images/icons8-riduzione-32.png")" style="width:24px;height:24px;"></a>
<a href="@Url.ActionLink("Elimina", "GiriElimina", new { id=item.SerialeGiro })" title="Elimina" class="links"><img alt="nocons" src="@Url.Content("~/images/icons8-rimuovere-24.png")" style="width:24px;height:24px;"></a>
</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 = "Successiva",
LinkToPreviousPageFormat = "Precedente",
MaximumPageNumbersToDisplay = 5,
DisplayLinkToPreviousPage = PagedListDisplayMode.Always,
DisplayLinkToNextPage = PagedListDisplayMode.Always
})
</nav>