логгер видит реальное количество заказов
This commit is contained in:
parent
9ba9cf92d1
commit
b38577fc3a
@ -64,8 +64,13 @@ namespace PlumbingRepairDatabaseImplement.Implements
|
|||||||
.Select(x => x.GetViewModel)
|
.Select(x => x.GetViewModel)
|
||||||
.ToList();
|
.ToList();
|
||||||
}
|
}
|
||||||
|
return context.Orders
|
||||||
return new();
|
.Include(x => x.Work)
|
||||||
|
.Include(x => x.Client)
|
||||||
|
.Include(x => x.Implementer)
|
||||||
|
.Where(x => model.Status == x.Status)
|
||||||
|
.Select(x => x.GetViewModel)
|
||||||
|
.ToList();
|
||||||
}
|
}
|
||||||
|
|
||||||
public OrderViewModel? GetElement(OrderSearchModel model)
|
public OrderViewModel? GetElement(OrderSearchModel model)
|
||||||
@ -81,9 +86,10 @@ namespace PlumbingRepairDatabaseImplement.Implements
|
|||||||
.Include(x => x.Work)
|
.Include(x => x.Work)
|
||||||
.Include(x => x.Client)
|
.Include(x => x.Client)
|
||||||
.Include(x => x.Implementer)
|
.Include(x => x.Implementer)
|
||||||
.FirstOrDefault(x => (!model.ImplementerId.HasValue || x.ImplementerId == model.ImplementerId) &&
|
.FirstOrDefault(x => (model.Status == null || model.Status != null && model.Status == x.Status) &&
|
||||||
(!model.Status.HasValue || x.Status == model.Status) &&
|
model.ImplementerId.HasValue && x.ImplementerId == model.ImplementerId ||
|
||||||
(!model.Id.HasValue || x.Id == model.Id))?.GetViewModel;
|
model.Id.HasValue && x.Id == model.Id)
|
||||||
|
?.GetViewModel;
|
||||||
}
|
}
|
||||||
|
|
||||||
public OrderViewModel? Insert(OrderBindingModel model)
|
public OrderViewModel? Insert(OrderBindingModel model)
|
||||||
|
Loading…
Reference in New Issue
Block a user