From 023e91feb2d12833c4f466e07f267e7582e5c8e7 Mon Sep 17 00:00:00 2001 From: michele Date: Wed, 10 Jul 2024 15:14:00 +0200 Subject: [PATCH] Michele: destinazioni controller - modifica data parametro api --- Controllers/DestinazioniController.cs | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/Controllers/DestinazioniController.cs b/Controllers/DestinazioniController.cs index b028a86..527969f 100644 --- a/Controllers/DestinazioniController.cs +++ b/Controllers/DestinazioniController.cs @@ -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;