OrderStorage GetFilteredList fix

This commit is contained in:
ShabOl 2024-04-11 00:03:43 +04:00
parent c10255f4cb
commit 3e61ea61df
2 changed files with 3 additions and 3 deletions

View File

@ -22,7 +22,7 @@ namespace AutoWorkshopFileImplement.Implements
public List<OrderViewModel> 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

View File

@ -31,8 +31,8 @@ namespace AutoWorkshopListImplement.Implements
public List<OrderViewModel> GetFilteredList(OrderSearchModel Model)
{
var Result = new List<OrderViewModel>();
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)