PIbd-21. Rodionov I.A. Lab work 05. Hard #13
@ -158,7 +158,7 @@ namespace IceCreamShopBusinessLogic.BusinessLogics
|
||||
|
||||
var shopList = _shopStorage.GetFullList();
|
||||
int shopsCapacity = shopList.Sum(x => x.IceCreamsMaximum);
|
||||
int currentIceCreams = shopList.Select(x => x.ShopIceCreams.Select(y => y.Value.Item2).Sum()).Sum();
|
||||
int currentIceCreams = shopList.Select(x => x.ShopIceCreams.Sum(y => y.Value.Item2)).Sum();
|
||||
int freePlaces = shopsCapacity - currentIceCreams;
|
||||
|
||||
if (freePlaces < count)
|
||||
|
@ -113,7 +113,7 @@ namespace IceCreamShopFileImplement.Implements
|
||||
}
|
||||
shop.Update(new ShopBindingModel
|
||||
{
|
||||
Id = model.Id,
|
||||
Id = shop.Id,
|
||||
ShopName = shop.ShopName,
|
||||
Address = shop.Address,
|
||||
DateOpening = shop.DateOpening,
|
||||
|
Loading…
Reference in New Issue
Block a user