fix logic purchase

This commit is contained in:
Николай 2023-04-08 16:57:03 +04:00
parent 923d110e40
commit 417a8c9dcf
3 changed files with 15 additions and 0 deletions

View File

@ -30,6 +30,19 @@ namespace HardwareShopContracts.BusinessLogicsContracts
return list;
}
public List<PurchaseViewModel>? 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)

View File

@ -7,6 +7,7 @@ namespace HardwareShopContracts.BusinessLogicsContracts
public interface IPurchaseLogic
{
List<PurchaseViewModel>? ReadList(PurchaseSearchModel? model);
List<PurchaseViewModel>? ReadOrderList(PurchaseSearchModel model);
PurchaseViewModel? ReadElement(PurchaseSearchModel model);
bool Create(PurchaseBindingModel model);
bool Update(PurchaseBindingModel model);

View File

@ -9,6 +9,7 @@ namespace HardwareShopContracts.StoragesContracts
{
List<PurchaseViewModel> GetFullList();
List<PurchaseViewModel> GetFilteredList(PurchaseSearchModel model);
List<PurchaseViewModel> GetReportFilteredList(PurchaseSearchModel model);
PurchaseViewModel? GetElement(PurchaseSearchModel model);
PurchaseViewModel? Insert(PurchaseBindingModel model);
PurchaseViewModel? Update(PurchaseBindingModel model);