Example #1
0
        public override Debt Add(Debt entity)
        {
            var customer = _customerService.GetById(entity.CustomerId);

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

            return(_debtRepository.Add(entity));
        }
Example #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);
        }
Example #3
0
 public long Add(Debt debt)
 {
     return(_debtRepository.Add(debt));
 }