Exemple #1
0
        public override void Execute()
        {
            Employee emp = database.GetUnionMember(memberId);

            if (emp != null)
            {
                UnionAffiliation unionAffiliation = emp.Affiliation as UnionAffiliation;
                if (unionAffiliation != null)
                {
                    ServiceCharge sc = new ServiceCharge(amount, date);
                    unionAffiliation.AddServiceCharge(sc);
                }
                else
                {
                    throw new ApplicationException("not join Union Affiliaction.");
                }
            }
            else
            {
                throw new ApplicationException("no such employee");
            }
        }
Exemple #2
0
 public void AddServiceCharge(ServiceCharge sc)
 {
     charges[sc.Date] = sc;
 }