protected override void RecordMembership(Employee e)
 {
     Affilation affilation = e.Affilation;
     if (affilation is UnionAffilation)
     {
         UnionAffilation unionAffilation = affilation as UnionAffilation;
         int memberId = unionAffilation.MemberId;
         PayrollDatabase.DeleteUnionMember(memberId);
     }
 }
Пример #2
0
 public static void AddUnionMember(int id, Employee e)
 {
     UnionMembers[id] = e;
 }
Пример #3
0
 public static void AddEmployee(int id, Employee employee)
 {
     employees[id] = employee;
 }
Пример #4
0
 public void TestEmployee()
 {
     int empId = 0;
     Employee e = new Employee(empId, "Bob", "Home");
     Assert.AreEqual("Bob", e.Name);
     Assert.AreEqual("Home", e.Address);
     Assert.AreEqual(empId, e.EmpId);
 }
Пример #5
0
 protected override void Change(Employee e)
 {
     e.Method = Method;
 }
 protected abstract void Change(Employee e);
Пример #7
0
 protected override void RecordMembership(Employee e)
 {
     PayrollDatabase.AddUnionMember(memberId, e);
 }
 protected abstract void RecordMembership(Employee e);
 protected override void Change(Employee e)
 {
     RecordMembership(e);
     Affilation affilation = Affilation;
     e.Affilation = affilation;
 }
Пример #10
0
 protected override void Change(Employee e)
 {
     e.Name = newName;
 }