Пример #1
0
        public static EmployeeIEnumerableCollection GetEmployees()
        {
            EmployeeIEnumerableCollection employees = new EmployeeIEnumerableCollection();
            Company    company         = new Company("Company1");
            Department storeDepartment = new Department(company, "Store Department");
            Department salesDepartment = new Department(company, "Sales Department");

            EmployeeIEnumerable emp = new EmployeeIEnumerable(storeDepartment, "Nicholas", "*****@*****.**");

            emp.Phones.Add(new Phone("(206) 555-9857"));
            emp.Phones.Add(new Phone("(206) 555-6546"));
            emp.Phones.Add(new Phone("(206) 555-7651"));
            employees.Add(emp);

            emp = new EmployeeIEnumerable(storeDepartment, "Margaret", "*****@*****.**");
            emp.Phones.Add(new Phone("(206) 555-4546"));
            emp.Phones.Add(new Phone("(206) 555-0110"));
            employees.Add(emp);

            emp = new EmployeeIEnumerable(storeDepartment, "Janet", "*****@*****.**");
            emp.Phones.Add(new Phone("(206) 555-5462"));
            emp.Phones.Add(new Phone("(206) 555-8400"));
            emp.Phones.Add(new Phone("(206) 555-9842"));
            employees.Add(emp);

            emp = new EmployeeIEnumerable(salesDepartment, "Laura", "*****@*****.**");
            emp.Phones.Add(new Phone("(206) 555-0022"));
            employees.Add(emp);

            emp = new EmployeeIEnumerable(salesDepartment, "Mark", "*****@*****.**");
            emp.Phones.Add(new Phone("(206) 555-9980"));
            emp.Phones.Add(new Phone("(206) 555-5567"));
            employees.Add(emp);

            emp = new EmployeeIEnumerable(salesDepartment, "Michael", "*****@*****.**");
            emp.Phones.Add(new Phone("(206) 555-5642"));
            employees.Add(emp);

            emp = new EmployeeIEnumerable(salesDepartment, "Thomas", "*****@*****.**");
            emp.Phones.Add(new Phone("(206) 555-8949"));
            employees.Add(emp);

            return(employees);
        }
Пример #2
0
 public void Insert(int index, EmployeeIEnumerable employee)
 {
     List.Insert(index, employee);
 }
Пример #3
0
 public int IndexOf(EmployeeIEnumerable employee)
 {
     return(List.IndexOf(employee));
 }
Пример #4
0
 public bool Contains(EmployeeIEnumerable employee)
 {
     return(List.Contains(employee));
 }
Пример #5
0
 public void Add(EmployeeIEnumerable employee)
 {
     List.Add(employee);
 }
Пример #6
0
 public void Remove(EmployeeIEnumerable employee)
 {
     List.Remove(employee);
 }