Putilin P. A. Lab work 2 Hard #11

Closed
Pavel wants to merge 15 commits from Lab2Hard into Lab1Hard
3 changed files with 3 additions and 1 deletions
Showing only changes of commit 5a7dbc9d73 - Show all commits

View File

@ -155,6 +155,7 @@ namespace PrecastConcretePlantBusinessLogic
Id = element.Id,
Address = element.Address,
Name = element.Name,
MaxCountReinforceds = element.MaxCountReinforceds,
DateOpening = element.DateOpening,
Reinforceds = element.Reinforceds
});

View File

@ -81,6 +81,7 @@ namespace PrecastConcretePlantFileImplement
Name = model.Name;
Address = model.Address;
DateOpening = model.DateOpening;
MaxCountReinforceds = model.MaxCountReinforceds;
CountReinforceds = model.Reinforceds.ToDictionary(x => x.Key, x => x.Value.Item2);
_cachedReinforceds = null;
}

View File

@ -83,7 +83,7 @@ namespace PrecastConcretePlantFileImplement
{
var resultCount = _source.Shops
.Select(shop => shop.Reinforceds
.FirstOrDefault(x => x.Key == reinforced.Id).Value.Item2)
.FirstOrDefault(x => x.Key == reinforced.Id).Value.Item2)
.Sum();
if (resultCount < needCount)
{