Merge branch 'lab3_hard' into lab4_hard

This commit is contained in:
prodigygirl 2023-04-19 18:23:37 +04:00
commit ebdac676b0

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");