Ejemplo n.º 1
0
 public Vacation(DateTime _startDate, DateTime _endDate, ref HolidayManager _holidays)
 {
     startDate = (_startDate < _endDate) ? (_startDate) : (_endDate);
     endDate   = (_startDate < _endDate) ? (_endDate) : (_startDate);
     RecalcDuration();
     IsDateDefined  = true;
     holidayManager = _holidays;
 }
Ejemplo n.º 2
0
 public Employee(string _name, DateTime _hireDate, EmploymentType _type, bool _fired, DateTime _birth, string _mobile, ref HolidayManager _holidays)
 {
     name           = _name;
     hireDate       = _hireDate;
     accountType    = _type;
     fired          = _fired;
     birthDate      = _birth;
     mobilePhone    = _mobile;
     vacationList   = new List <Vacation>();
     holidayManager = _holidays;
     calculator     = new DaysCalculator(this);
 }
Ejemplo n.º 3
0
        public Vacation(Vacation copy)
        {
            if (copy.IsDateDefined)
            {
                startDate = copy.startDate;
                endDate   = copy.endDate;
            }
            duration       = copy.duration;
            IsDateDefined  = copy.IsDateDefined;
            holidayManager = copy.holidayManager;

            RecalcDuration();
        }
Ejemplo n.º 4
0
 public EmployeeManager(ref HolidayManager _holidayManager)
 {
     Employees      = new Dictionary <int, Employee>(40);
     holidayManager = _holidayManager;
 }
Ejemplo n.º 5
0
 public Vacation(int DurationInDays, ref HolidayManager _holidays)
 {
     duration       = new TimeSpan(DurationInDays, 0, 0, 0);
     IsDateDefined  = false;
     holidayManager = _holidays;
 }