все из-за табуляции сломалось(жесть)
This commit is contained in:
parent
b365a146d3
commit
f25de886e9
@ -29,12 +29,12 @@ namespace ComputersShopFileImplements.Implements
|
|||||||
return new();
|
return new();
|
||||||
}
|
}
|
||||||
return source.Orders
|
return source.Orders
|
||||||
.Where(x => x.Id == model.Id ||
|
.Where(x => x.Id == model.Id ||
|
||||||
model.DateFrom <= x.DateCreate && x.DateCreate <= model.DateTo ||
|
model.DateFrom <= x.DateCreate && x.DateCreate <= model.DateTo ||
|
||||||
x.ClientId == model.ClientId ||
|
x.ClientId == model.ClientId ||
|
||||||
model.Status.Equals(x.Status))
|
model.Status.Equals(x.Status))
|
||||||
.Select(x => GetViewModel(x))
|
.Select(x => GetViewModel(x))
|
||||||
.ToList();
|
.ToList();
|
||||||
}
|
}
|
||||||
public OrderViewModel? GetElement(OrderSearchModel model)
|
public OrderViewModel? GetElement(OrderSearchModel model)
|
||||||
{
|
{
|
||||||
|
@ -22,14 +22,14 @@ namespace ComputersShopDatabaseImplements.Implements
|
|||||||
}
|
}
|
||||||
using var context = new ComputersShopDatabase();
|
using var context = new ComputersShopDatabase();
|
||||||
return context.Orders
|
return context.Orders
|
||||||
.Include(x => x.Computer)
|
.Include(x => x.Computer)
|
||||||
.Include(x => x.Client)
|
.Include(x => x.Client)
|
||||||
.Include(x => x.Implementer)
|
.Include(x => x.Implementer)
|
||||||
.FirstOrDefault(x =>
|
.FirstOrDefault(x =>
|
||||||
(model.Status == null || model.Status != null && model.Status.Equals(x.Status)) &&
|
(model.Status == null || model.Status != null && model.Status.Equals(x.Status)) &&
|
||||||
(model.ImplementerId.HasValue && x.ImplementerId == model.ImplementerId) ||
|
(model.ImplementerId.HasValue && x.ImplementerId == model.ImplementerId) ||
|
||||||
(model.Id.HasValue && x.Id == model.Id))?
|
(model.Id.HasValue && x.Id == model.Id))?
|
||||||
.GetViewModel;
|
.GetViewModel;
|
||||||
}
|
}
|
||||||
public List<OrderViewModel> GetFiltredList(OrderSearchModel model)
|
public List<OrderViewModel> GetFiltredList(OrderSearchModel model)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user