Exemplo n.º 1
0
        public Employee(string employeeNo, Period period, string firstName, string lastName)
        {
            if (period == null)
            {
                throw new ArgumentNullException("period");
            }
            period.CheckCreatingEmployee();

            if (string.IsNullOrWhiteSpace(employeeNo))
            {
                throw new EmployeeArgumentException("Employee", "employeeNo");
            }
            id = new EmployeeId(employeeNo, period.Id);

            this.firstName = firstName;
            if (string.IsNullOrWhiteSpace(lastName))
            {
                throw new EmployeeArgumentException("Employee", "lastName");
            }
            this.lastName = lastName;

            employeePointState = EmployeePointState.UnCalculated;
        }