inizio fix gestione liste
This commit is contained in:
@@ -86,11 +86,10 @@ namespace WebDoorCreator.UI.Components.Hardware
|
||||
if (HwToShow != null)
|
||||
{
|
||||
var listRecordGP = await WDService.ListValuesGetAll(HwToShow.TableName, "Graphic Parameters1");
|
||||
Dictionary<string, Dictionary<string, List<string>>> defaultDict = new Dictionary<string, Dictionary<string, List<string>>>();
|
||||
Dictionary<string, Dictionary<string, string>> actDict = new Dictionary<string, Dictionary<string, string>>();
|
||||
Dictionary<string, List<string>> defaultDict = new Dictionary<string, List<string>>();
|
||||
Dictionary<string, string> actDict = new Dictionary<string, string>();
|
||||
List<string> listDefVal = new List<string>();
|
||||
Dictionary<string, List<string>> defaultParamsList = new Dictionary<string, List<string>>();
|
||||
Dictionary<string, string> actParamsList = new Dictionary<string, string>();
|
||||
List<string> defaultParamsList = new List<string>();
|
||||
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<string>() { 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);
|
||||
|
||||
Reference in New Issue
Block a user