Фикс фильтрации диагнозов по датам
This commit is contained in:
parent
ac12c85d7d
commit
7d5c2e2cf5
@ -50,11 +50,18 @@ namespace PolyclinicDatabaseImplement.Implements
|
||||
}
|
||||
if (model.To != null)
|
||||
{
|
||||
elements = elements
|
||||
.Where(x => x.DateStartDiagnose <= model.To.Value)
|
||||
elements = elements.Where(x => x.DateStartDiagnose <= model.To.Value).ToList();
|
||||
|
||||
var elemWithDateStop = elements
|
||||
.Where(x => x.DateStopDiagnose != null)
|
||||
.Where(x => x.DateStopDiagnose <= model.To.Value)
|
||||
.ToList();
|
||||
|
||||
var elemWithoutDateStop = elements.Where(x => x.DateStopDiagnose == null).ToList();
|
||||
|
||||
elemWithDateStop.AddRange(elemWithoutDateStop);
|
||||
|
||||
elements = elemWithDateStop;
|
||||
}
|
||||
return elements;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user