lab5 alpha3

This commit is contained in:
DeerElk 2024-05-05 05:50:26 +04:00
parent 35ac0ae1ea
commit c9705c72f1
2 changed files with 28 additions and 34 deletions

View File

@ -23,11 +23,8 @@ namespace ConfectioneryFileImplement.Implements
return source.Orders
.Where(x => (
(!model.Id.HasValue || x.Id == model.Id) &&
(!model.DateFrom.HasValue || x.DateCreate >=
model.DateFrom) && (!model.DateTo.HasValue ||
x.DateCreate <= model.DateTo) &&
(!model.ClientId.HasValue ||
x.ClientId == model.ClientId)
(!model.DateFrom.HasValue || x.DateCreate >= model.DateFrom) &&
(!model.DateTo.HasValue || x.DateCreate <= model.DateTo)
)
)
.Select(x => AccessPastryStorage(x.GetViewModel))

View File

@ -27,11 +27,8 @@ namespace ConfectioneryListImplement.Implements
foreach (var order in _source.Orders)
{
if ((!model.Id.HasValue || order.Id == model.Id) &&
(!model.DateFrom.HasValue || order.DateCreate >=
model.DateFrom) && (!model.DateTo.HasValue ||
order.DateCreate <= model.DateTo) &&
(!model.ClientId.HasValue ||
order.ClientId == model.ClientId))
(!model.DateFrom.HasValue || order.DateCreate >= model.DateFrom) &&
(!model.DateTo.HasValue || order.DateCreate <= model.DateTo))
{
result.Add(AccessPastryStorage(order.GetViewModel));
}