НУЖНО БОЛЬШЕ ЛИНК ЗАПРОСОВ
This commit is contained in:
parent
dc0f2d7346
commit
749d98cd26
@ -67,15 +67,11 @@ namespace IceCreamShopBusinessLogic.BusinessLogic
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
int freeSpace = 0;
|
int sumCapacity = 0;
|
||||||
foreach (var shop in _shopStorage.GetFullList())
|
int sumCount = 0;
|
||||||
{
|
sumCapacity = _shopStorage.GetFullList().Select(x => x.MaxCapacity).Sum();
|
||||||
freeSpace += shop.MaxCapacity;
|
sumCount = _shopStorage.GetFullList().Select(x => x.ShopIceCreams.Select(y => y.Value.Item2).Sum()).Sum();
|
||||||
foreach (var doc in shop.ShopIceCreams)
|
int freeSpace = sumCapacity - sumCount;
|
||||||
{
|
|
||||||
freeSpace -= doc.Value.Item2;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (freeSpace - count < 0)
|
if (freeSpace - count < 0)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user