Beispiel #1
0
 public BankDetails GetById(Guid id)
 {
     if (!CurrentUser.HasRole(UserRole.Member))
     {
         throw new DomainValidationException(BankDetailsMessages.InsufficientSecurityClearance);
     }
     return(_bankDetailsRepository.GetById(id));
 }
Beispiel #2
0
        private BankDetails GetBankDetails(Guid bankDetailsId)
        {
            var bankDetails = _bankDetailsRepository.GetById(bankDetailsId);

            if (bankDetails == null)
            {
                throw new ArgumentException("A valid ID must be supplied for the bank details");
            }
            return(bankDetails);
        }
        private BankDetails GetDefaultBankDetails(Guid defaultBankDetailsId)
        {
            var bankDetails = _bankDetailsRepository.GetById(defaultBankDetailsId);

            if (bankDetails == null)
            {
                throw new ArgumentException(String.Format("There is no tax code with ID {0}", defaultBankDetailsId));
            }
            return(bankDetails);
        }