laba2Complicated #11
@ -92,7 +92,7 @@ namespace AutomobilePlantBusinessLogic.BusinessLogics
|
||||
foreach (var c in shopElement.ShopCars)
|
||||
countCars += c.Value.Item2;
|
||||
|
||||
if (countCars > shopElement.MaxCountCars - countCars)
|
||||
if (count > shopElement.MaxCountCars - countCars)
|
||||
{
|
||||
_logger.LogWarning("Required shop will be overflowed");
|
||||
return false;
|
||||
@ -115,6 +115,7 @@ namespace AutomobilePlantBusinessLogic.BusinessLogics
|
||||
Id = shopElement.Id,
|
||||
Name = shopElement.Name,
|
||||
Address = shopElement.Address,
|
||||
MaxCountCars = shopElement.MaxCountCars,
|
||||
OpeningDate = shopElement.OpeningDate,
|
||||
ShopCars = shopElement.ShopCars
|
||||
});
|
||||
|
@ -120,6 +120,7 @@ namespace AutomobilePlantFileImplement.Implements
|
||||
Id = shop.Id,
|
||||
Name = shop.Name,
|
||||
Address = shop.Address,
|
||||
MaxCountCars = shop.MaxCountCars,
|
||||
OpeningDate = shop.OpeningDate,
|
||||
ShopCars = cars
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user