コード例 #1
0
        public List <PaymentEventDto> GetPaymentEventsForCustomer(int customerID)
        {
            var payments = _paymentEventRepository.GetPaymentEventsForCustomer(customerID);

            if (payments == null)
            {
                return(null);
            }
            return(payments.Select(x => _dtoCreator.Create(x)).ToList());
        }
コード例 #2
0
        public OperationDto GetOperationById(int operationId)
        {
            Operation operation = _repository.Get <Operation>(operationId);

            if (operation != null)
            {
                return(_operationCreator.Create(operation));
            }
            return(null);
        }
コード例 #3
0
        public AdvisorDto GetAdvisorById(int id)
        {
            Advisor advisor = _repository.Get <Advisor>(id);

            if (advisor != null)
            {
                return(_advisorDtoCreator.Create(advisor));
            }
            return(null);
        }
コード例 #4
0
        public IList <TagDepensesDto> GetTagDepensesForProfile(int profileId)
        {
            CustomerProfile profile = _repository.Load <CustomerProfile>(profileId);

            if (profile.TagsRepartition != null)
            {
                return(profile.TagsRepartition.Select(x => _dtoCreator.Create(x)).ToList());
            }
            return(null);
        }
コード例 #5
0
        public CustomerDto GetCustomerById(int id)
        {
            var customer = _repository.Get <Customer>(id);

            if (customer == null)
            {
                return(null);
            }
            return(_customerDtoCreator.Create(customer));
        }
コード例 #6
0
        public List <Dto.BusinessPartnerDto> GetBusinessPartnerForCustomer(int customerID)
        {
            var customer = _repository.Load <Customer>(customerID);

            if (customer != null && customer.Partners != null)
            {
                return(customer.Partners.Select(x => _dtoCreator.Create(x)).ToList());
            }
            return(null);
        }
コード例 #7
0
        public IList <AccountDto> GetCustomerAccounts(int customer)
        {
            var accounts = _accountRepository.GetAccountsByCustomer(customer);

            if (accounts != null)
            {
                return(accounts.Select(x => _accountDtoCreator.Create(x)).ToList());
            }
            return(null);
        }
コード例 #8
0
        public IList <CustomerProfileDto> GetAllCustomerProfiles()
        {
            var profiles = _repository.GetAll <CustomerProfile>();

            if (profiles != null)
            {
                return(profiles.Select(x => _dtoCreator.Create(x)).ToList());
            }
            return(null);
        }
コード例 #9
0
ファイル: TagServices.cs プロジェクト: firebitsbr/CloudyBank
        public IList <TagDto> GetTagsForCustomer(int customerID)
        {
            var tags = _tagRepository.GetTagsForCustomer(customerID);

            if (tags != null)
            {
                return(tags.Select(x => _tagDtoCreator.Create(x)).ToList());
            }
            return(null);
        }
コード例 #10
0
ファイル: UserServices.cs プロジェクト: firebitsbr/CloudyBank
        public UserIdentityDto AuthenticateUser(string identity, string password)
        {
            Customer customer = _customerRepository.GetCustomerByIdentity(identity);

            if (customer != null)
            {
                String passwordHash = _hashProvider.Hash(password + customer.PasswordSalt);
                if (customer.Password == passwordHash)
                {
                    return(_userIdentityDtoCreator.Create(customer));
                }
            }
            return(null);
        }