start
This commit is contained in:
parent
9c1e439686
commit
c8284d0a19
@ -123,11 +123,20 @@ namespace JewelryStoreBusinessLogic.BusinessLogics
|
||||
});
|
||||
if (Jewel == null)
|
||||
{
|
||||
throw new ArgumentException($"Поставка: Товар с id:{model.JewelId} не найденн");
|
||||
throw new ArgumentException($"Поставка: Товар с id:{model.JewelId} не найден");
|
||||
}
|
||||
shop.Jewels.Add(model.JewelId, (Jewel, model.Count));
|
||||
}
|
||||
return true;
|
||||
_shopStorage.Update(new StoreBindingModel()
|
||||
{
|
||||
Id = shop.Id,
|
||||
StoreName = shop.StoreName,
|
||||
StoreAdress = shop.StoreAdress,
|
||||
OpeningDate = shop.OpeningDate,
|
||||
Jewels = shop.Jewels,
|
||||
JewelMaxCount = shop.JewelMaxCount,
|
||||
});
|
||||
return true;
|
||||
}
|
||||
|
||||
private void CheckModel(StoreBindingModel model, bool withParams = true)
|
||||
|
Loading…
Reference in New Issue
Block a user