Borschevskaya A.A. Lab work 4 #6
@ -27,7 +27,7 @@ namespace FurnitureAssemFileImplement.Implements
|
||||
|
||||
public List<OrderViewModel> GetFilteredList(OrderSearchModel model)
|
||||
{
|
||||
if (!model.Id.HasValue)
|
||||
if (!model.Id.HasValue && !model.DateFrom.HasValue && !model.DateTo.HasValue)
|
||||
{
|
||||
return new();
|
||||
}
|
||||
|
@ -29,7 +29,7 @@ namespace FurnitureAssemblyDatabaseImplement.Implements
|
||||
|
||||
public List<OrderViewModel> GetFilteredList(OrderSearchModel model)
|
||||
{
|
||||
if (!model.Id.HasValue)
|
||||
if (!model.Id.HasValue && !model.DateFrom.HasValue && !model.DateTo.HasValue)
|
||||
{
|
||||
return new();
|
||||
}
|
||||
|
@ -55,7 +55,7 @@ namespace FurnitureAssemblyListImplement.Implements
|
||||
|
||||
foreach (var order in _source.Orders)
|
||||
{
|
||||
if (order.Id.Equals(model.Id))
|
||||
if (order.Id.Equals(model.Id) || model.DateFrom <= order.DateCreate && order.DateCreate <= model.DateTo)
|
||||
{
|
||||
result.Add(GetOrderViewModel(order));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user