чистка

This commit is contained in:
Галина Федоренко 2024-03-02 15:56:29 +04:00
parent f7e4f386ba
commit 987f1174b2

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