From 405accd0cd60036c69465a4b7e7ea8dd09c42a16 Mon Sep 17 00:00:00 2001 From: "zaccaria.majid" Date: Fri, 7 Apr 2023 17:30:32 +0200 Subject: [PATCH] inizio fix gestione liste --- .../Components/Hardware/HardwareList.razor.cs | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/WebDoorCreator.UI/Components/Hardware/HardwareList.razor.cs b/WebDoorCreator.UI/Components/Hardware/HardwareList.razor.cs index 9155284..73e73a2 100644 --- a/WebDoorCreator.UI/Components/Hardware/HardwareList.razor.cs +++ b/WebDoorCreator.UI/Components/Hardware/HardwareList.razor.cs @@ -86,11 +86,10 @@ namespace WebDoorCreator.UI.Components.Hardware if (HwToShow != null) { var listRecordGP = await WDService.ListValuesGetAll(HwToShow.TableName, "Graphic Parameters1"); - Dictionary>> defaultDict = new Dictionary>>(); - Dictionary> actDict = new Dictionary>(); + Dictionary> defaultDict = new Dictionary>(); + Dictionary actDict = new Dictionary(); List listDefVal = new List(); - Dictionary> defaultParamsList = new Dictionary>(); - Dictionary actParamsList = new Dictionary(); + List defaultParamsList = new List(); if (listRecordGP != null) { foreach (var item in listRecordGP) @@ -98,18 +97,18 @@ namespace WebDoorCreator.UI.Components.Hardware if (item.isSerializable && item.DefaultVal.Contains(",")) { listDefVal = item.DefaultVal.Trim().Split(",").ToList(); - actParamsList.Add(item.Label, item.DefaultVal.Trim().Split(",")[0]); + actDict.Add(item.Label, item.DefaultVal.Trim().Split(",")[0]); } else { listDefVal = new List() { item.DefaultVal.Trim() }; - actParamsList.Add(item.Label, item.DefaultVal.Trim()); + actDict.Add(item.Label, item.DefaultVal.Trim()); } - defaultParamsList.Add(item.Label, listDefVal); + //defaultParamsList.Add(listDefVal); } - defaultDict.Add(HwToShow.TableName, defaultParamsList); - actDict.Add(HwToShow.TableName, actParamsList); + defaultDict.Add(HwToShow.Value, listDefVal); + //actDict.Add(HwToShow.TableName, actParamsList); var jsonDef = JsonConvert.SerializeObject(defaultDict); var jsonAct = JsonConvert.SerializeObject(actDict);