Exemplo n.º 1
0
        public override Debt Add(Debt entity)
        {
            var customer = _customerService.GetById(entity.CustomerId);

            if (customer == null)
            {
                return(null);
            }

            return(_debtRepository.Add(entity));
        }
Exemplo n.º 2
0
        public override Debt Add(Debt item)
        {
            if (item == null)
            {
                throw new ArgumentNullException("item");
            }
            if (item.Goal == null)
            {
                throw new ArgumentNullException("item", "Property item.Goal can't be Null.");
            }
            //if (item.Goal.OperationDetails == null) throw new ArgumentNullException("item", "Property item.Goal.Operation.OperationDetails can't be Null.");

            item.Code = base.CreateCode(item.Goal);
            _debtRepository.Add(item);

            //if (item.Goal.Notifications != null && item.Goal.Notifications.Any())
            //    _notificationService.Add(item.Goal);

            return(item);
        }
Exemplo n.º 3
0
 public long Add(Debt debt)
 {
     return(_debtRepository.Add(debt));
 }