diff --git a/HardwareShop/HardwareShopBusinessLogic/BusinessLogics/Worker/PurchaseLogic.cs b/HardwareShop/HardwareShopBusinessLogic/BusinessLogics/Worker/PurchaseLogic.cs index 155d813..59fb61b 100644 --- a/HardwareShop/HardwareShopBusinessLogic/BusinessLogics/Worker/PurchaseLogic.cs +++ b/HardwareShop/HardwareShopBusinessLogic/BusinessLogics/Worker/PurchaseLogic.cs @@ -30,6 +30,19 @@ namespace HardwareShopContracts.BusinessLogicsContracts return list; } + public List? ReadOrderList(PurchaseSearchModel model) + { + _logger.LogInformation("ReadOrderList. Id:{Id}", model.Id); + var list = _purchaseStorage.GetReportFilteredList(model); + if (list == null) + { + _logger.LogWarning("ReadOrderList return null list"); + return null; + } + _logger.LogInformation("ReadOrderList. Count:{Count}", list.Count); + return list; + } + public PurchaseViewModel? ReadElement(PurchaseSearchModel model) { if (model == null) diff --git a/HardwareShop/HardwareShopContracts/BusinessLogicsContracts/IPurchaseLogic.cs b/HardwareShop/HardwareShopContracts/BusinessLogicsContracts/IPurchaseLogic.cs index f83b7ac..7b62b8e 100644 --- a/HardwareShop/HardwareShopContracts/BusinessLogicsContracts/IPurchaseLogic.cs +++ b/HardwareShop/HardwareShopContracts/BusinessLogicsContracts/IPurchaseLogic.cs @@ -7,6 +7,7 @@ namespace HardwareShopContracts.BusinessLogicsContracts public interface IPurchaseLogic { List? ReadList(PurchaseSearchModel? model); + List? ReadOrderList(PurchaseSearchModel model); PurchaseViewModel? ReadElement(PurchaseSearchModel model); bool Create(PurchaseBindingModel model); bool Update(PurchaseBindingModel model); diff --git a/HardwareShop/HardwareShopContracts/StoragesContracts/IPurchaseStorage.cs b/HardwareShop/HardwareShopContracts/StoragesContracts/IPurchaseStorage.cs index 7a60b86..b140577 100644 --- a/HardwareShop/HardwareShopContracts/StoragesContracts/IPurchaseStorage.cs +++ b/HardwareShop/HardwareShopContracts/StoragesContracts/IPurchaseStorage.cs @@ -8,6 +8,7 @@ namespace HardwareShopContracts.StoragesContracts { List GetFullList(); List GetFilteredList(PurchaseSearchModel model); + List GetReportFilteredList(PurchaseSearchModel model); PurchaseViewModel? GetElement(PurchaseSearchModel model); PurchaseViewModel? Insert(PurchaseBindingModel model); PurchaseViewModel? Update(PurchaseBindingModel model);