PIbd-22. Fedorenko G.Y. Lab Work 1 HARD #2

Closed
fedorenko wants to merge 3 commits from LabWork01Hard into LabWork01
Showing only changes of commit 987f1174b2 - Show all commits

View File

@ -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;
} */
}
}