laba2Complicated #11

Merged
TImourka merged 13 commits from laba2Complicated into laba3Complicated 2024-03-10 15:55:42 +04:00
2 changed files with 3 additions and 1 deletions
Showing only changes of commit 7841ed642e - Show all commits

View File

@ -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
});

View File

@ -120,6 +120,7 @@ namespace AutomobilePlantFileImplement.Implements
Id = shop.Id,
Name = shop.Name,
Address = shop.Address,
MaxCountCars = shop.MaxCountCars,
OpeningDate = shop.OpeningDate,
ShopCars = cars
});