Borschevskaya A.A. Lab Work 6 Hard #14

Closed
pgirl1 wants to merge 16 commits from lab6_hard into lab5_hard
Showing only changes of commit ad57580040 - Show all commits

View File

@ -78,6 +78,11 @@ namespace FurnitureAssemblyBusinessLogic
if (modelNew == 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;
}
model.Status = modelNew.Status;
model.ImplementerId = modelNew.ImplementerId;
if (!ChangeStatus(model, OrderStatus.Готов))
@ -97,12 +102,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;
}
model.Status = modelNew.Status;
model.ImplementerId = modelNew.ImplementerId;