diff --git a/AutoWorkshopFileImplement/Implements/OrderStorage.cs b/AutoWorkshopFileImplement/Implements/OrderStorage.cs index 4bab7ce..ec98ded 100644 --- a/AutoWorkshopFileImplement/Implements/OrderStorage.cs +++ b/AutoWorkshopFileImplement/Implements/OrderStorage.cs @@ -22,7 +22,7 @@ namespace AutoWorkshopFileImplement.Implements public List GetFilteredList(OrderSearchModel Model) { - if (!Model.Id.HasValue || !Model.DateFrom.HasValue || !Model.DateTo.HasValue) + if (!Model.Id.HasValue && (!Model.DateFrom.HasValue || !Model.DateTo.HasValue)) return new(); return _source.Orders diff --git a/AutoWorkshopImplement/Implements/OrderStorage.cs b/AutoWorkshopImplement/Implements/OrderStorage.cs index 768ef3c..264e029 100644 --- a/AutoWorkshopImplement/Implements/OrderStorage.cs +++ b/AutoWorkshopImplement/Implements/OrderStorage.cs @@ -31,8 +31,8 @@ namespace AutoWorkshopListImplement.Implements public List GetFilteredList(OrderSearchModel Model) { var Result = new List(); - - if (!Model.Id.HasValue || !Model.DateFrom.HasValue || !Model.DateFrom.HasValue) + + if (!Model.Id.HasValue && (!Model.DateFrom.HasValue || !Model.DateTo.HasValue)) return Result; foreach (var Order in _source.Orders)