Add localized maintenances description

This commit is contained in:
Lucio Maranta
2018-07-10 15:07:37 +02:00
parent b5bd21187b
commit bd7fbb1503
7 changed files with 44 additions and 18 deletions
+4 -2
View File
@@ -206,14 +206,16 @@ namespace Step.Config
new MaintenanceConfigModel()
{
Id = Convert.ToInt32(x.Element("id").Value),
LocalizedNames = x.Element("localizedNames").Elements().ToDictionary( // Read names list
LocalizedName = x.Element("localizedName").Elements().ToDictionary( // Read localized names
y => y.Attribute("langKey").Value, y => y.Value
),
Intervall = TimeSpan.FromMinutes(Convert.ToDouble(x.Element("interval").Value)),
Deadline = DateTime.Parse(x.Element("deadline").Value),
Type = x.Element("type").Value,
CouterId = Convert.ToInt32(x.Element("counterId").Value),
Description = x.Element("description").Value,
LocalizedDescription = x.Element("localizedDescription").Elements().ToDictionary( // Read localization of description
y => y.Attribute("langKey").Value, y => y.Value
),
UnitOfMeasure = x.Element("unitOfMeasure").Value
})
.ToList();