Borschevskaya A.A. Lab work 4 #6

Closed
pgirl1 wants to merge 17 commits from lab4_base into lab3_base
3 changed files with 3 additions and 3 deletions
Showing only changes of commit 206b8fbcbe - Show all commits

View File

@ -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();
}

View File

@ -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();
}

View File

@ -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));
}