какая то суета
This commit is contained in:
parent
6a1e7adc40
commit
c54abfcd3d
@ -24,10 +24,17 @@ namespace AircraftPlantFileImplement.Implements
|
||||
}
|
||||
public List<OrderViewModel> GetFilteredList(OrderSearchModel model)
|
||||
{
|
||||
if (!model.Id.HasValue)
|
||||
if (!model.Id.HasValue || !model.DateFrom.HasValue || !model.DateTo.HasValue)
|
||||
{
|
||||
return new();
|
||||
}
|
||||
if (model.DateFrom.HasValue)
|
||||
{
|
||||
return _source.Orders
|
||||
.Where(x => x.DateCreate >= model.DateFrom && x.DateCreate <= model.DateTo)
|
||||
.Select(x => GetViewModel(x))
|
||||
.ToList();
|
||||
}
|
||||
return _source.Orders.Where(x => x.Id.Equals(model.Id)).Select(x => GetViewModel(x)).ToList();
|
||||
}
|
||||
public OrderViewModel? GetElement(OrderSearchModel model)
|
||||
|
Loading…
Reference in New Issue
Block a user