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) foreach (var c in shopElement.ShopCars)
countCars += c.Value.Item2; countCars += c.Value.Item2;
if (countCars > shopElement.MaxCountCars - countCars) if (count > shopElement.MaxCountCars - countCars)
{ {
_logger.LogWarning("Required shop will be overflowed"); _logger.LogWarning("Required shop will be overflowed");
return false; return false;
@ -115,6 +115,7 @@ namespace AutomobilePlantBusinessLogic.BusinessLogics
Id = shopElement.Id, Id = shopElement.Id,
Name = shopElement.Name, Name = shopElement.Name,
Address = shopElement.Address, Address = shopElement.Address,
MaxCountCars = shopElement.MaxCountCars,
OpeningDate = shopElement.OpeningDate, OpeningDate = shopElement.OpeningDate,
ShopCars = shopElement.ShopCars ShopCars = shopElement.ShopCars
}); });

View File

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