diff --git a/Controllers/DestinazioniController.cs b/Controllers/DestinazioniController.cs index 0a1574c..7afccd6 100644 --- a/Controllers/DestinazioniController.cs +++ b/Controllers/DestinazioniController.cs @@ -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 diff --git a/Views/Destinazioni/Index.cshtml b/Views/Destinazioni/Index.cshtml index d6447c4..45a5cc5 100644 --- a/Views/Destinazioni/Index.cshtml +++ b/Views/Destinazioni/Index.cshtml @@ -12,6 +12,15 @@

Lista destinazioni

+

+ Data giro: @ViewBag.dataGiro +
+ @ViewBag.CodAutista - @ViewBag.Autista +
+ @ViewBag.CodMezzo - @ViewBag.Automezzo +

+Torna alla lista + @*

Create New

@@ -37,7 +46,7 @@ - + @foreach (var item in Model) { @if (item.ConsFatta != null) diff --git a/Views/Giri/Index.cshtml b/Views/Giri/Index.cshtml index 85c7acd..1496dcd 100644 --- a/Views/Giri/Index.cshtml +++ b/Views/Giri/Index.cshtml @@ -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 @@

Giri di consegna

- Aggiungi nuovo giro di consegna + Elenco giri di consegna da creare

@using (Html.BeginForm()) { + Data giro:
@Html.TextBox("data", null, new { type = "date", @class = "agy-form-field require" })
 
+ Autista:
@Html.DropDownList("codAutista", ViewBag.Autisti, null, new { @class = "agy-form-field require" })
 
+ Automezzo:
@Html.DropDownList("codMezzo", ViewBag.CodMezzo, null, new { @class = "agy-form-field require" })
 
@@ -97,7 +100,12 @@ } - nocons + nocons nocons nocons