PIbd-21 Potapov N.S. LabWork06 #7

Closed
ns.potapov wants to merge 36 commits from LabWork06 into LabWork05
2 changed files with 18 additions and 0 deletions
Showing only changes of commit f6e470911d - Show all commits

View File

@ -123,5 +123,22 @@ namespace SecuritySystemBusinessLogic.BusinessLogics
}
_logger.LogInformation("Order. Sum:{Cost}. Id: {Id}", model.Sum, model.Id);
}
public OrderViewModel? ReadElement(OrderSearchModel? model)
{
if (model == null)
{
throw new ArgumentNullException(nameof(model));
}
_logger.LogInformation("ReadElement. Order Id:{Id}", model.Id);
var element = _orderStorage.GetElement(model);
if (element == null)
{
_logger.LogWarning("ReadElement element not found");
return null;
}
_logger.LogInformation("ReadElement find. Id:{Id}", element.Id);
return element;
}
}
}

View File

@ -7,6 +7,7 @@ namespace SecuritySystemContracts.BusinessLogicsContracts
public interface IOrderLogic
{
List<OrderViewModel>? ReadList(OrderSearchModel? model);
OrderViewModel? ReadElement(OrderSearchModel? model);
bool CreateOrder(OrderBindingModel model);
bool TakeOrderInWork(OrderBindingModel model);
bool FinishOrder(OrderBindingModel model);