diff --git a/Controllers/ChiamateController.cs b/Controllers/ChiamateController.cs index 306c8ba..a273ccf 100644 --- a/Controllers/ChiamateController.cs +++ b/Controllers/ChiamateController.cs @@ -89,7 +89,7 @@ namespace VirtualTask.Controllers if (!string.IsNullOrEmpty(tecnico)) { - modelList = modelList.Where(s => s.chtchiam.Contains(tecnico)).ToList(); + modelList = modelList.Where(s => s.chtchiam !=null && s.chtchiam.Contains(tecnico)).ToList(); ViewData["CurrentFilter"] = tecnico; diff --git a/Controllers/CommesseVTController.cs b/Controllers/CommesseVTController.cs index 330cd9b..0033a34 100644 --- a/Controllers/CommesseVTController.cs +++ b/Controllers/CommesseVTController.cs @@ -68,7 +68,7 @@ namespace VirtualTask.Controllers if (!string.IsNullOrEmpty(searchString)) { - modelList = modelList.Where(s => s.andescri.ToUpper().Contains(searchString.ToUpper())).ToList(); + modelList = modelList.Where(s => s.andescri!=null && s.andescri.ToUpper().Contains(searchString.ToUpper())).ToList(); ViewData["CurrentFilter"] = searchString; } diff --git a/Views/Chiamate/Index.cshtml b/Views/Chiamate/Index.cshtml index 9f00231..1ca2dce 100644 --- a/Views/Chiamate/Index.cshtml +++ b/Views/Chiamate/Index.cshtml @@ -18,32 +18,38 @@ @using (Html.BeginForm("Index","Chiamate")) { -