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 @@
+ Data giro: @ViewBag.dataGiro
+
+ @ViewBag.CodAutista - @ViewBag.Autista
+
+ @ViewBag.CodMezzo - @ViewBag.Automezzo
+
- Aggiungi nuovo giro di consegna + Elenco giri di consegna da creare
@using (Html.BeginForm()) { +