LC2 починил баговины

This commit is contained in:
Timourka 2024-02-26 01:32:41 +04:00
parent 054c0232bf
commit 7841ed642e
2 changed files with 3 additions and 1 deletions

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