From 75894fa3c7bfc177aea5c4afbfce318f8464ddd6 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Fri, 7 Oct 2022 18:32:56 +0200 Subject: [PATCH] update ordinamento fluxlog --- MP.SPEC/Data/MpDataService.cs | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/MP.SPEC/Data/MpDataService.cs b/MP.SPEC/Data/MpDataService.cs index 6415690f..4626e1ad 100644 --- a/MP.SPEC/Data/MpDataService.cs +++ b/MP.SPEC/Data/MpDataService.cs @@ -276,10 +276,19 @@ namespace MP.SPEC.Data public List convertToFluxLog(string Valore) { - //string valStriped = Valore.Substring(7, Valore.Length - 8); - //var result = JsonConvert.DeserializeObject>(valStriped); - var result = JsonConvert.DeserializeObject(Valore); - return result.ODL; + List answ = new List(); + DossierFluxLogDTO? result = JsonConvert.DeserializeObject(Valore); + if (result != null) + { + if (result.ODL != null) + { + answ = result + .ODL + .OrderBy(x => x.CodFlux) + .ToList(); + } + } + return answ; } public void Dispose()