Фикс фильтрации процедур по датам
This commit is contained in:
parent
e0ff2d9057
commit
4377f8e5ae
@ -41,11 +41,18 @@ namespace PolyclinicDatabaseImplement.Implements
|
||||
}
|
||||
if (model.To != null)
|
||||
{
|
||||
elements = elements
|
||||
.Where(x => x.DateStartProcedure <= model.To.Value)
|
||||
elements = elements.Where(x => x.DateStartProcedure <= model.To.Value).ToList();
|
||||
|
||||
var elemWithDateStop = elements
|
||||
.Where(x => x.DateStopProcedure != null)
|
||||
.Where(x => x.DateStopProcedure <= model.To.Value)
|
||||
.ToList();
|
||||
|
||||
var elemWithoutDateStop = elements.Where(x => x.DateStopProcedure == null).ToList();
|
||||
|
||||
elemWithDateStop.AddRange(elemWithoutDateStop);
|
||||
|
||||
elements = elemWithDateStop;
|
||||
}
|
||||
return elements;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user