SoftwayWeb/Views/Giri/Index.cshtml

131 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">Elenco giri di consegna da creare</a>
</p>
@using (Html.BeginForm())
{
<th><b>Data giro:</b></th>
<div>@Html.TextBox("data", null, new { type = "date", @class = "agy-form-field require" })</div>
<div class="col-lg-6 col-md-6 col-sm-12 col-12">&nbsp;</div>
<th><b>Autista:</b></th>
<div>@Html.DropDownList("codAutista", ViewBag.Autisti, null, new { @class = "agy-form-field require" })</div>
<div class="col-lg-6 col-md-6 col-sm-12 col-12">&nbsp;</div>
<th><b>Automezzo:</b></th>
<div>@Html.DropDownList("codMezzo", ViewBag.CodMezzo, null, new { @class = "agy-form-field require" })</div>
<div class="col-lg-6 col-md-6 col-sm-12 col-12">&nbsp;</div>
<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;">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>
@if (item.parzialeBanRec != null && item.parzialeBanRec > 0)
{
<td>
@Html.DisplayFor(modelItem => item.parzialeBanRec)
</td>
}
else
{
<td>&nbsp;</td>
}
@if (item.parzialeImpRec != null && item.parzialeImpRec > 0)
{
<td>
@Html.DisplayFor(modelItem => item.parzialeImpRec)
</td>
}
else
{
<td>&nbsp;</td>
}
<td>
<a href="@Url.ActionLink("Index", "Destinazioni", new { id=item.SerialeGiro,
codAutista=item.CodAutista,
nomeAutista=item.Autista,
dataGiro=item.DataGiro,
codMezzo=item.CodMezzo,
desMezzo=item.Automezzo})" 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", "Giri", 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,nbanc=item.parzialeBanRec,imp=item.parzialeImpRec })" title="Chiudi" class="links"><img alt="nocons" src="@Url.Content("~/images/icons8-bandiera-a-scacchi-64.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>