示例#1
0
        public Customer GetByName(string p_name)
        {
            CustomerDataMapper dataMapper = new CustomerDataMapper(FILE_NAME);
            IEnumerable<Customer> customers = dataMapper.GetAllCustomers();
            foreach (Customer customer in customers)
            {
                if (customer.ContactName == p_name)
                {
                    return customer;
                }

            }

            return null;
        }
示例#2
0
        public IEnumerable<Customer> GetAllCustomers()
        {
            CustomerDataMapper dataMapper = new CustomerDataMapper(FILE_NAME);

            return dataMapper.GetAllCustomers();
        }
示例#3
0
 public CustomerDao()
 {
     m_dataMapper = new CustomerDataMapper(FILE_NAME);
     m_allCustomers = m_dataMapper.GetAllCustomers();
 }