Code: Select all
dr["Action"] = events[i].Action.ID == Common.Server.IdConstants.DeviceActionTurnOnId ? "On" : "Off";
Code: Select all
dr["Action"] = events[i].Action.ID == Common.Server.IdConstants.DeviceActionTurnOnId ? "On" : "Off";
Code: Select all
if (events[i].Action.ID == Common.Server.IdConstants.DeviceStateOffId)
{
dr["Action"] = "OFF";
}
else if (events[i].Action.ID == Common.Server.IdConstants.DeviceStateOnId)
{
if (!events[i].DimLevel.HasValue || events[i].DimLevel.Value == 100)
{
dr["Action"] = "ON";
}
else
{
dr["Action"] = events[i].DimLevel.Value.ToString() +"%";
}
}
else
dr["Action"] = "ON";
Users browsing this forum: No registered users and 8 guests