Ejemplo n.º 1
0
        public void Delete(CostBindingModel model)
        {
            var element = _costStorage.GetElement(new CostBindingModel
            {
                Id = model.Id
            });

            if (element == null)
            {
                throw new Exception("Затраты не найдены");
            }
            _costStorage.Delete(model);
        }
Ejemplo n.º 2
0
        public void Delete(CostBindingModel model)
        {
            var cost = costStorage.GetElement(
                new CostBindingModel
            {
                Id = model.Id
            });

            if (cost == null)
            {
                throw new Exception("Статья расходов не найдена");
            }

            costStorage.Delete(model);
        }