diff --git a/Controllers/GiriController.cs b/Controllers/GiriController.cs index b342eaa..beda4a5 100644 --- a/Controllers/GiriController.cs +++ b/Controllers/GiriController.cs @@ -23,7 +23,7 @@ namespace SoftwayWeb.Controllers apiUrl = key; } - public IActionResult Index(string? codAutista, DateTime? data, bool aperto = true) + public IActionResult Index(string? codAutista, DateTime data, bool aperto = true) { helper = new SessionHelper(this); token = helper.GetStringValue("tok"); @@ -51,6 +51,11 @@ namespace SoftwayWeb.Controllers { ViewData["CurrentFilter"] = null; } + + if (data.Date != DateTime.MinValue) + { + modelList = modelList.Where(x => x.DataGiro.GetValueOrDefault().Date == data.Date).ToList(); + } //var shortList = modelList.ToPagedList(); return View(modelList); }