protected override void RecordMembership(Employee e) { Affiliation affiliation = e.Affiliation; if (affiliation is UnionAffiliation) { UnionAffiliation unionAffiliation = affiliation as UnionAffiliation; int memberId = unionAffiliation.MemberId; PayrollDatabase.DeleteUnionMember(memberId); } }