BackReport
This commit is contained in:
parent
3cbab2be56
commit
e19fa68a6b
@ -35,7 +35,9 @@ namespace DatabaseImplement.Implements
|
||||
return new();
|
||||
}
|
||||
using var context = new FactoryGoWorkDatabase();
|
||||
if (model.DateFrom.HasValue)
|
||||
if (model.DetailId.HasValue)
|
||||
return context.Workshops.Where(x => x.ProductionId.HasValue).Include(x => x.Production).Where(x => x.Production.Details.FirstOrDefault(y => y.DetailId == model.DetailId) != null).Where(x => x.UserId == model.UserId).Select(x => x.GetViewModel).ToList();
|
||||
else if (model.DateFrom.HasValue)
|
||||
return context.Workshops.Where(x => x.UserId == model.Id).Where(x => x.DateCreate < model.DateTo && x.DateCreate > model.DateFrom).Select(x => x.GetViewModel).ToList();
|
||||
else
|
||||
return context.Workshops.Where(x => x.UserId == model.Id).Select(x => x.GetViewModel).ToList();
|
||||
|
Loading…
Reference in New Issue
Block a user