Michele: destinazioni controller - modifica data parametro api

This commit is contained in:
michele 2024-07-10 15:14:00 +02:00
parent 375836028f
commit 023e91feb2

View File

@ -30,28 +30,27 @@ namespace SoftwayWeb.Controllers
helper = new SessionHelper(this);
token = helper.GetStringValue("tok");
//StringBuilder aut = new StringBuilder();
string autista = string.Empty;
string dataGi = string.Empty;
string mezzo = string.Empty;
if (!string.IsNullOrEmpty(codAutista))
{
helper.SetStringValue("codAutista", codAutista);
helper.SetStringValue("codAutista", codAutista.TrimEnd());
}
else
{
string aut = helper.GetStringValue("codAutista");
codAutista = aut;
codAutista = aut.TrimEnd();
}
if (!string.IsNullOrEmpty(codMezzo))
{
helper.SetStringValue("codMezzo", codMezzo.ToString());
helper.SetStringValue("codMezzo", codMezzo.TrimEnd());
}
else
{
string mez = helper.GetStringValue("codMezzo");
string mez = helper.GetStringValue("codMezzo").TrimEnd();
codMezzo = mez;
}
@ -66,7 +65,7 @@ namespace SoftwayWeb.Controllers
}
urlBase = apiUrl + "Giri/listaDestinazioniByAutistaDataMezzo";
urlBase = urlBase + "?autista=" + codAutista.TrimEnd() + "&dataGiro=" + dataGi + "&mezzo=" + codMezzo;
urlBase = urlBase + "?autista=" + codAutista + "&dataGiro=" + dataGi + "&mezzo=" + codMezzo;
Uri baseAddress = new Uri(urlBase);
client = new HttpClient();
client.BaseAddress = baseAddress;