diff --git a/CarpentryWorkshop/CarpentryWorkshopListImplement/Implements/ShopStorage.cs b/CarpentryWorkshop/CarpentryWorkshopListImplement/Implements/ShopStorage.cs index 5f6c4c4..fc8c47b 100644 --- a/CarpentryWorkshop/CarpentryWorkshopListImplement/Implements/ShopStorage.cs +++ b/CarpentryWorkshop/CarpentryWorkshopListImplement/Implements/ShopStorage.cs @@ -100,36 +100,5 @@ namespace CarpentryWorkshopListImplement.Implements } return null; } - - /* public bool SupplyWood(ShopSearchModel model, IWoodModel wood, int count) - { - if (model == null) - throw new ArgumentNullException(nameof(model)); - if (wood == null) - throw new ArgumentNullException(nameof(wood)); - if (count <= 0) - throw new ArgumentNullException("Количество должно быть положительным числом"); - - ShopViewModel curModel = GetElement(model); - if (curModel == null) - throw new ArgumentNullException(nameof(curModel)); - if (curModel.ShopWoods.TryGetValue(wood.Id, out var pair)) - { - curModel.ShopWoods[wood.Id] = (pair.Item1, pair.Item2 + count); - } - else - { - curModel.ShopWoods.Add(wood.Id, (wood, count)); - } - Update(new() - { - Id = curModel.Id, - ShopName = curModel.ShopName, - DateOpen = curModel.DateOpen, - Address = curModel.Address, - ShopWoods = curModel.ShopWoods, - }); - return true; - } */ } }