PIbd-21. Rodionov I.A. Lab work 05. Hard #13

Closed
ILRodionov wants to merge 19 commits from lab5_hard into lab5_base
2 changed files with 2 additions and 2 deletions
Showing only changes of commit 69123995cd - Show all commits

View File

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

View File

@ -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,