Merge branch 'Worker_Raspaev' into Storekeeper

This commit is contained in:
dasha 2023-04-08 16:57:38 +04:00
commit 34849c0377
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

@ -8,6 +8,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);