diff --git a/LawFirm/AbstractLawFirmDatabaseImplement/Implements/OrderStorage.cs b/LawFirm/AbstractLawFirmDatabaseImplement/Implements/OrderStorage.cs index 81abf9d..c225429 100644 --- a/LawFirm/AbstractLawFirmDatabaseImplement/Implements/OrderStorage.cs +++ b/LawFirm/AbstractLawFirmDatabaseImplement/Implements/OrderStorage.cs @@ -16,19 +16,6 @@ namespace AbstractLawFirmDatabaseImplement.Implements { public OrderViewModel? GetElement(OrderSearchModel model) { - /*if (!model.Id.HasValue) - { - return null; - } - using var context = new AbstractLawFirmDatabase(); - return context.Orders - .Include(x => x.Document) - .Include(x => x.Client) - .Include(x => x.Implementer) - .FirstOrDefault(x => - (model.Status == null || model.Status != null && model.Status.Contains(x.Status)) && - model.ImplementerId.HasValue && x.ImplementerId == model.ImplementerId || - model.Id.HasValue && x.Id == model.Id)?.GetViewModel;*/ if (!model.Id.HasValue && (!model.ImplementerId.HasValue || !model.Status.HasValue)) { return null; diff --git a/LawFirm/AbstractLawFirmListImplement/Implements/OrderStorage.cs b/LawFirm/AbstractLawFirmListImplement/Implements/OrderStorage.cs index 4c3cc9d..a5297fb 100644 --- a/LawFirm/AbstractLawFirmListImplement/Implements/OrderStorage.cs +++ b/LawFirm/AbstractLawFirmListImplement/Implements/OrderStorage.cs @@ -75,26 +75,6 @@ namespace AbstractLawFirmListImplement.Implements } public OrderViewModel? GetElement(OrderSearchModel model) { - /*if (!model.Id.HasValue) - { - return null; - } - foreach (var order in _source.Orders) - { - if (model.Id.HasValue && order.Id == model.Id) - { - return order.GetViewModel; - } - else if (model.ImplementerId.HasValue && model.Status != null && order.ImplementerId == model.ImplementerId && model.Status.Contains(order.Status)) - { - return GetViewModel(order); - } - else if (model.ImplementerId.HasValue && model.ImplementerId == order.ImplementerId) - { - return GetViewModel(order); - } - } - return null;*/ if (!model.Id.HasValue) { return null;