Display Alarm of each battery

This commit is contained in:
atef 2023-12-06 14:54:38 +01:00
parent 9aad4851b2
commit ecfac5ea94
1 changed files with 14 additions and 7 deletions

View File

@ -428,16 +428,23 @@ internal static class Program
if (record.Battery != null)
{
foreach (var alarm in record.Battery.Alarms)
var i = 0;
foreach (var battery in record.Battery.Devices)
{
alarmList.Add(new AlarmOrWarning
i++;
foreach (var alarm in battery.Alarms)
{
Date = DateTime.Now.ToString("yyyy-MM-dd"),
Time = DateTime.Now.ToString("HH:mm:ss"),
CreatedBy = "Battery",
Description = alarm
});
alarmList.Add(new AlarmOrWarning
{
Date = DateTime.Now.ToString("yyyy-MM-dd"),
Time = DateTime.Now.ToString("HH:mm:ss"),
CreatedBy = "Battery" + i,
Description = alarm
});
}
}
}
foreach (var warning in record.AcDc.Warnings)