Aggiornamento gestione moduli x avere categorie + sub
This commit is contained in:
@@ -654,7 +654,10 @@ namespace Thermo.Active.Config
|
||||
Priority = Convert.ToInt16(x.Element("priority").Value),
|
||||
// attributi presi da default se NON presenti...
|
||||
ScaleFactor = x.Element("scaleFactor") != null ? Convert.ToInt16(x.Element("scaleFactor").Value) : 1000,
|
||||
NumDec = x.Element("numDec") != null ? Convert.ToInt16(x.Element("numDec").Value) : 1
|
||||
NumDec = x.Element("numDec") != null ? Convert.ToInt16(x.Element("numDec").Value) : 1,
|
||||
Category = x.Element("category") != null ? x.Element("category").Value : "",
|
||||
SubCategory_1 = x.Element("subCategory_1") != null ? x.Element("subCategory_1").Value : "",
|
||||
SubCategory_2 = x.Element("subCategory_2") != null ? x.Element("subCategory_2").Value : ""
|
||||
})
|
||||
.ToList();
|
||||
}
|
||||
|
||||
@@ -14,5 +14,8 @@ namespace Thermo.Active.Model.ConfigModels
|
||||
public int Priority { get; set; }
|
||||
public int ScaleFactor { get; set; } = 1000;
|
||||
public int NumDec { get; set; } = 1;
|
||||
public string Category { get; set; }
|
||||
public string SubCategory_1 { get; set; }
|
||||
public string SubCategory_2 { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,6 +24,9 @@ namespace Thermo.Active.Model.DTOModels.ThModules
|
||||
public bool Running { get; set; } = false;
|
||||
public bool HasError { get; set; } = false;
|
||||
public bool Terminated { get; set; } = false;
|
||||
public string Category { get; set; } = "";
|
||||
public string SubCategory_1 { get; set; } = "";
|
||||
public string SubCategory_2 { get; set; } = "";
|
||||
|
||||
|
||||
public override bool Equals(object obj)
|
||||
@@ -67,6 +70,12 @@ namespace Thermo.Active.Model.DTOModels.ThModules
|
||||
return false;
|
||||
if (Terminated != item.Terminated)
|
||||
return false;
|
||||
if (Category != item.Category)
|
||||
return false;
|
||||
if (SubCategory_1 != item.SubCategory_1)
|
||||
return false;
|
||||
if (SubCategory_2 != item.SubCategory_2)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -2489,7 +2489,10 @@ namespace Thermo.Active.NC
|
||||
Visible = currModule.Visible,
|
||||
Running = currModule.Running,
|
||||
HasError = currModule.HasError,
|
||||
Terminated = currModule.Terminated
|
||||
Terminated = currModule.Terminated,
|
||||
Category = item.Category,
|
||||
SubCategory_1 = item.SubCategory_1,
|
||||
SubCategory_2 = item.SubCategory_2
|
||||
};
|
||||
currModules.Add(item.Id, currVal);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user