public CustomerBalanceDTO BuildCustomerBalanceDTO(Int32 customerId)
        {
            var customer = CustomerRepository.GetCustomer(customerId);
            var customerLedger = CustomerLedgerRepository.GetLedgerByCustomerId(customerId);
            var currentBalance = CustomerLedgerService.GetCurrentBalance(customerLedger);
            var dto = new CustomerBalanceDTO()
            {
                Customer = customer,
                CurrentBalance = currentBalance
            };

            return dto;
        }
        public PagedResults<CustomerBalanceDTO> CustomerGridSearchResults(String firstName, String lastName, Pagination pagination)
        {
            var results = new List<CustomerBalanceDTO>();
            var customers = CustomerRepository.GetCustomers(firstName, lastName);
            var customerIds = customers.Select(c => c.Id).ToList();
            var customerLedgers = CustomerLedgerRepository.GetLedgerByCustomerIds(customerIds);

            foreach (var customer in customers)
            {
                var customerLedger = customerLedgers.Where(cl => cl.CustomerId == customer.Id).ToList();
                var currentBalance = CustomerLedgerService.GetCurrentBalance(customerLedger);
                var dto = new CustomerBalanceDTO()
                {
                    Customer = customer,
                    CurrentBalance = currentBalance
                };
                results.Add(dto);
            }

            return pagination.ApplyPaging(results);
        }