Какие то изменения
This commit is contained in:
parent
dcba13f0ed
commit
19415b5c7b
@ -181,9 +181,7 @@ namespace SecuritySystemBusinessLogic.BusinessLogics
|
||||
public bool CheckSecuresCount(ISecureModel model, int count)
|
||||
{
|
||||
int securesInShops = _shopStorage.GetFullList()
|
||||
.Select(
|
||||
x => x.ShopSecures.Select(y => y.Value.Item1.Id == model.Id ? y.Value.Item2 : 0).Sum()
|
||||
).Sum();
|
||||
.Select(x => x.ShopSecures.Select(y => y.Value.Item1.Id == model.Id ? y.Value.Item2 : 0).Sum()).Sum();
|
||||
return securesInShops >= count;
|
||||
}
|
||||
public bool CheckSupplySecures(ShopSearchModel shopSearchModel, int count)
|
||||
@ -191,9 +189,6 @@ namespace SecuritySystemBusinessLogic.BusinessLogics
|
||||
if (shopSearchModel == null)
|
||||
throw new ArgumentNullException(nameof(shopSearchModel));
|
||||
|
||||
if (secure == null)
|
||||
throw new ArgumentNullException(nameof(secure));
|
||||
|
||||
var shop = _shopStorage.GetElement(shopSearchModel);
|
||||
|
||||
if (shop == null)
|
||||
|
Loading…
Reference in New Issue
Block a user