示例#1
0
        public static EmployeeITypedListCollection GetEmployees()
        {
            EmployeeITypedListCollection employees = new EmployeeITypedListCollection();
            Company    company         = new Company("Company1");
            Department storeDepartment = new Department(company, "Store Department");
            Department salesDepartment = new Department(company, "Sales Department");

            EmployeeITypedList emp = new EmployeeITypedList(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 EmployeeITypedList(storeDepartment, "Margaret", "*****@*****.**");
            emp.Phones.Add(new Phone("(206) 555-4546"));
            emp.Phones.Add(new Phone("(206) 555-0110"));
            employees.Add(emp);

            emp = new EmployeeITypedList(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 EmployeeITypedList(salesDepartment, "Laura", "*****@*****.**");
            emp.Phones.Add(new Phone("(206) 555-0022"));
            employees.Add(emp);

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

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

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

            return(employees);
        }
示例#2
0
 public void Add(EmployeeITypedList employee)
 {
     List.Add(employee);
 }
示例#3
0
 public void Remove(EmployeeITypedList employee)
 {
     List.Remove(employee);
 }
示例#4
0
 public void Insert(int index, EmployeeITypedList employee)
 {
     List.Insert(index, employee);
 }
示例#5
0
 public int IndexOf(EmployeeITypedList employee)
 {
     return(List.IndexOf(employee));
 }
示例#6
0
 public bool Contains(EmployeeITypedList employee)
 {
     return(List.Contains(employee));
 }