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")) { -
-
- - Tecnico: +
+
+ Tecnico: @Html.DropDownList("tecnico", ViewBag.Tecnici, null, new { @class = "agy-form-field require" }) - - Impianto: +
+
+ Impianto: @Html.DropDownList("impianto", ViewBag.Impianti, null, new { @class = "agy-form-field require" }) - - Data da: - @Html.TextBox("dataIni", null, new { type = "date", @class = "agy-form-field require" }) - - Data a: - @Html.TextBox("dataFin", null, new { type = "date", @class = "agy-form-field require" }) - - Stato chiamata: - @Html.DropDownList("stato", ViewBag.StatiChiamata, null, new { @class = "agy-form-field require" }) - - Indirizzo: -
- @Html.TextBox("indirizzo", null, new { placeholder = "Cerca per indirizzo", @class = "agy-form-field require" }) -
- -
+
+ Indirizzo: +
+ @Html.TextBox("indirizzo", null, new { placeholder = "Cerca per indirizzo impianto", @class = "agy-form-field require" }) +
+
+
+ Data da: + @Html.TextBox("dataIni", null, new { type = "date", @class = "agy-form-field require" }) +
+
+ Data a: + @Html.TextBox("dataFin", null, new { type = "date", @class = "agy-form-field require" }) +
+
+ Stato chiamata: + @Html.DropDownList("stato", ViewBag.StatiChiamata, null, new { @class = "agy-form-field require" }) +
+ +
+
+