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