Example #1
0
        public void ApplyVacation(VacationRequest request)
        {
            int numberOfDays = request.GetNumberOfDays();

            if (numberOfDays > 15)
            {
                Console.WriteLine("invoke HR");
                return;
            }

            if (numberOfDays < Supervisor.GetMaxVacationDaysCanAprove())
            {
                Supervisor.ApproveVacation(request);
            }
            else
            {
                Supervisor.ApplyVacation(request);
            }
        }
Example #2
0
 protected bool ApproveVacation(VacationRequest request)
 {
     Console.WriteLine("Approved by" + this + " id:" + request.RequestNumber);
     return(true);
 }