michele: rapportini controller

This commit is contained in:
michele 2024-01-03 09:12:51 +01:00
parent 9b81c1ee40
commit 1ea0a66479

View File

@ -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;
}