Michele: data, autista, mezzo su destinazioni index
This commit is contained in:
parent
0bf53f3c2f
commit
b88344ea5c
@ -28,7 +28,7 @@ namespace SoftwayWeb.Controllers
|
||||
apiUrl = key;
|
||||
}
|
||||
|
||||
public IActionResult Index(string id, string? codAutista, DateTime dataGiro, string? codMezzo, int? page = 1)
|
||||
public IActionResult Index(string id, string? codAutista, string? nomeAutista, DateTime dataGiro, string? codMezzo, string? desMezzo, int? page = 1)
|
||||
{
|
||||
helper = new SessionHelper(this);
|
||||
|
||||
@ -43,6 +43,12 @@ namespace SoftwayWeb.Controllers
|
||||
string dataGi = string.Empty;
|
||||
string mezzo = string.Empty;
|
||||
|
||||
ViewBag.CodAutista = codAutista;
|
||||
ViewBag.Autista = nomeAutista;
|
||||
ViewBag.CodMezzo = codMezzo;
|
||||
ViewBag.Automezzo = desMezzo;
|
||||
ViewBag.dataGiro = dataGiro.ToString("dd/MM/yyyy");
|
||||
|
||||
if (!string.IsNullOrEmpty(codAutista))
|
||||
{
|
||||
helper.SetStringValue("codAutista", codAutista.TrimEnd());
|
||||
@ -92,9 +98,11 @@ namespace SoftwayWeb.Controllers
|
||||
{
|
||||
page = 1;
|
||||
}
|
||||
|
||||
var pageSize = 10;
|
||||
|
||||
var shortList = modelList.ToPagedList(page ?? 1, pageSize);
|
||||
|
||||
return View(shortList);
|
||||
}
|
||||
else
|
||||
|
||||
@ -12,6 +12,15 @@
|
||||
|
||||
<h1>Lista destinazioni</h1>
|
||||
|
||||
<p>
|
||||
<b>Data giro: @ViewBag.dataGiro</b>
|
||||
<br />
|
||||
<b>@ViewBag.CodAutista - @ViewBag.Autista</b>
|
||||
<br />
|
||||
<b>@ViewBag.CodMezzo - @ViewBag.Automezzo</b>
|
||||
</p>
|
||||
<a asp-action="Index" asp-controller="Giri" value="Torna alla lista" class="agy-btn submitForm">Torna alla lista</a>
|
||||
|
||||
@* <p>
|
||||
<a asp-action="Create">Create New</a>
|
||||
</p>
|
||||
@ -37,7 +46,7 @@
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tbody>
|
||||
@foreach (var item in Model) {
|
||||
<tr>
|
||||
@if (item.ConsFatta != null)
|
||||
|
||||
@ -3,15 +3,15 @@
|
||||
@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";
|
||||
}
|
||||
@ -21,15 +21,18 @@
|
||||
<h1>Giri di consegna</h1>
|
||||
|
||||
<p>
|
||||
<a asp-action="Create">Aggiungi nuovo giro di consegna</a>
|
||||
<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"> </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"> </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"> </div>
|
||||
|
||||
@ -97,7 +100,12 @@
|
||||
}
|
||||
|
||||
<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("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>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user