From 1ea0a6647909dc813e913f50720127ae605c2d75 Mon Sep 17 00:00:00 2001 From: michele Date: Wed, 3 Jan 2024 09:12:51 +0100 Subject: [PATCH] michele: rapportini controller --- Controllers/RapportiniController.cs | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/Controllers/RapportiniController.cs b/Controllers/RapportiniController.cs index 5c7e3a8..bd17fba 100644 --- a/Controllers/RapportiniController.cs +++ b/Controllers/RapportiniController.cs @@ -201,7 +201,6 @@ namespace VirtualTask.Controllers SessionHelper helper = new SessionHelper(this); token = helper.GetStringValue("tok"); apiUrl = helper.GetStringValue("apiUrl"); - //urlBase = apiUrl + "impiantiListMngr"; urlBase = apiUrl + "rapportiniList"; urlBase = urlBase + "?token=" + token; Uri baseAddress = new Uri(urlBase); @@ -221,10 +220,12 @@ namespace VirtualTask.Controllers listItemFirt.Value = string.Empty; listItemFirt.Text = " - Impianto"; selectItems.Add(listItemFirt); - var app = string.Empty; + + var appoggio = string.Empty; + foreach (var role in modelList) { - if (!app.Equals(role.codice_impianto)) + if (!appoggio.Equals(role.codice_impianto)) { SelectListItem listItem = new SelectListItem(); string s = role.codice_impianto; @@ -232,10 +233,11 @@ namespace VirtualTask.Controllers listItem.Text = s; selectItems.Add(listItem); } - - app = role.codice_impianto; + + appoggio = role.codice_impianto; } } + return selectItems; }