Merge branch 'lab4_hard' into lab5_hard

This commit is contained in:
prodigygirl 2023-04-19 18:23:49 +04:00
commit 8428da853c

View File

@ -77,6 +77,11 @@ namespace FurnitureAssemblyBusinessLogic
if (model == null) {
return false;
}
if (!_shopLogic.AddFurnituresAtShops(new FurnitureBindingModel() { Id = model.FurnitureId }, model.Count))
{
_logger.LogWarning("There are not empty places at shops. Replenishment is impossible");
return false;
}
if (!ChangeStatus(model, OrderStatus.Готов))
{
_logger.LogWarning("Order's status is wrong");
@ -93,13 +98,7 @@ namespace FurnitureAssemblyBusinessLogic
{
return false;
}
if (!_shopLogic.AddFurnituresAtShops(new FurnitureBindingModel() { Id = model.FurnitureId}, model.Count))
{
_logger.LogWarning("There are not empty places at shops. Replenishment is impossible");
return false;
}
if (!ChangeStatus(model, OrderStatus.Выдан))
{
_logger.LogWarning("Order's status is wrong");