public void EditEmployee(Employee employee, bool validateUsername, bool validatePassword)
        {
            IValidator validator = EmployeeValidator.CreateValidator(employee, validateUsername, validatePassword);

            validator.Validate();
            repository.EditEmployee(employee);
        }
        public void NewEmployee(Employee employee)
        {
            IValidator validator = EmployeeValidator.CreateValidator(employee, false, true);

            employee.Credentials.EncriptedPassword = employee.Credentials.EncryptPassword();
            validator.Validate();
            employee.Credentials.EncriptedPassword = employee.Credentials.EncryptPassword();
            repository.NewEmployee(employee);
        }