Exemple #1
0
        //_____________________________________________

        public void SetStatus(Status status)
        {
            try
            {
                this.Status = (Status)SecureValidationsProfessor.ValidationsStatus(Convert.ToInt32(status));
            }
            catch (FormatException ex)
            {
                throw new FormatException(nameof(ex.Message));
            }
            catch (InvalidCastException ex)
            {
                throw new InvalidCastException(nameof(ex.Message));
            }
            catch (OverflowException ex)
            {
                throw new OverflowException(nameof(ex.Message));
            }
            catch (Exception ex)
            {
                throw new Exception(nameof(ex.Message));
            }
        }
Exemple #2
0
        //_____________________________________________

        public void SetEndereco(Endereco endereco)
        {
            try
            {
                this.Endereco = (Endereco)SecureValidationsProfessor.ValidationsEndereco(Convert.ToInt16(endereco.Logradouro), endereco.Numero, endereco.Complemento, endereco.CEP, Convert.ToInt16(endereco.Zona));
            }
            catch (FormatException ex)
            {
                throw new FormatException(nameof(ex.Message));
            }
            catch (InvalidCastException ex)
            {
                throw new InvalidCastException(nameof(ex.Message));
            }
            catch (OverflowException ex)
            {
                throw new OverflowException(nameof(ex.Message));
            }
            catch (Exception ex)
            {
                throw new Exception(nameof(ex.Message));
            }
        }
Exemple #3
0
        //_____________________________________________

        public void SetNome(string Nome)
        {
            this.Nome = SecureValidationsProfessor.ValidationsNome(Nome);
        }
Exemple #4
0
        //_____________________________________________

        public void SetNovoCodigoUsuario(string CodigoUsuario)
        {
            this.CodigoUsuario = SecureValidationsProfessor.ValidationsNovoCodigoUsuario(CodigoUsuario);
        }
Exemple #5
0
        //_____________________________________________

        private void SetCodigoUsuario(string CodigoUsuario)
        {
            this.CodigoUsuario = SecureValidationsProfessor.ValidationsCodigoUsuario(CodigoUsuario);
        }
Exemple #6
0
 private void SetIdProfessor(string IdProfessor)
 {
     this.IdProfessor = SecureValidationsProfessor.ValidationsIdProfessor(IdProfessor);
 }
Exemple #7
0
        //_____________________________________________

        public void SetTelefone(Telefone telefone)
        {
            this.Telefone = (Telefone)SecureValidationsProfessor.ValidationsTelefone(telefone.DDD, telefone.Numero);
        }
Exemple #8
0
        //_____________________________________________

        public void SetTipoUsuario(TipoUsuario TipoUsuario)
        {
            this.TipoUsuario = (TipoUsuario)SecureValidationsProfessor.ValidationsTipoUsuario(Convert.ToInt32(TipoUsuario));
        }
Exemple #9
0
        //_____________________________________________

        public void SetEmail(string Email)
        {
            this.Email = SecureValidationsProfessor.ValidationsEmail(Email);
        }
Exemple #10
0
        //_____________________________________________

        public void SetSobrenome(string Sobrenome)
        {
            this.Sobrenome = SecureValidationsProfessor.ValidationsSobrenome(Sobrenome);
        }