Display Alarm of each battery
This commit is contained in:
parent
9aad4851b2
commit
ecfac5ea94
|
@ -428,18 +428,25 @@ internal static class Program
|
||||||
|
|
||||||
if (record.Battery != null)
|
if (record.Battery != null)
|
||||||
{
|
{
|
||||||
foreach (var alarm in record.Battery.Alarms)
|
var i = 0;
|
||||||
|
|
||||||
|
foreach (var battery in record.Battery.Devices)
|
||||||
|
{
|
||||||
|
i++;
|
||||||
|
foreach (var alarm in battery.Alarms)
|
||||||
{
|
{
|
||||||
alarmList.Add(new AlarmOrWarning
|
alarmList.Add(new AlarmOrWarning
|
||||||
{
|
{
|
||||||
Date = DateTime.Now.ToString("yyyy-MM-dd"),
|
Date = DateTime.Now.ToString("yyyy-MM-dd"),
|
||||||
Time = DateTime.Now.ToString("HH:mm:ss"),
|
Time = DateTime.Now.ToString("HH:mm:ss"),
|
||||||
CreatedBy = "Battery",
|
CreatedBy = "Battery" + i,
|
||||||
Description = alarm
|
Description = alarm
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
foreach (var warning in record.AcDc.Warnings)
|
foreach (var warning in record.AcDc.Warnings)
|
||||||
{
|
{
|
||||||
warningList.Add(new AlarmOrWarning
|
warningList.Add(new AlarmOrWarning
|
||||||
|
|
Loading…
Reference in New Issue