Added new alarm filter

This commit is contained in:
Lucio Maranta
2018-10-29 17:00:35 +01:00
parent 110ab7be65
commit e47d48aea9
8 changed files with 29 additions and 25 deletions
@@ -45,13 +45,13 @@ namespace Step.Database.Controllers
return paginated;
}
public List<DTOAlarmHistoricModel> GetPaginatedWithFilter(int page, int pageSize, DateTime startDate, DateTime endDate, List<int> userIds)
public List<DTOAlarmHistoricModel> GetPaginatedWithFilter(string message, ALARM_TYPE type, int page, int pageSize, DateTime startDate, DateTime endDate, List<int> userIds)
{
var occurrences = dbCtx
.AlarmOccurrences
.OrderBy(x => x.AlarmOccurrenceId)
.Where(x =>
x.TimeStamp >= startDate && x.TimeStamp <= endDate
x.TimeStamp >= startDate && x.TimeStamp <= endDate
// && userIds.Any(y => x.Users.Select(z => z.UserId).Any(z => z == y))
)
.Skip(page * pageSize)