コード例 #1
0
        //_____________________________________________

        public void SetStatus(Status status)
        {
            try
            {
                this.Status = (Status)SecureValidationsAluno.ValidationStatus(Convert.ToInt16(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));
            }
        }
コード例 #2
0
        //_____________________________________________

        public void SetEndereco(Endereco endereco)
        {
            try
            {
                this.Endereco = (Endereco)SecureValidationsAluno.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));
            }
        }
コード例 #3
0
        //_____________________________________________

        public void SetTipoUsuario(TipoUsuario TipoUsuario)
        {
            try
            {
                this.TipoUsuario = (TipoUsuario)SecureValidationsAluno.ValidationsTipoUsuario(Convert.ToInt16(TipoUsuario));
            }
            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));
            }
        }
コード例 #4
0
        //_________________________________________

        private void SetCodigoUsuario(string CodigoUsuario)
        {
            this.CodigoAluno = SecureValidationsAluno.ValidationsCodigoUsuario(CodigoUsuario);
        }
コード例 #5
0
 private void SetIdAluno(string IdAluno)
 {
     this.IdAluno = SecureValidationsAluno.ValidationsIdAluno(IdAluno);
 }
コード例 #6
0
        //_____________________________________________

        public void SetNome(string Nome)
        {
            this.Nome = SecureValidationsAluno.ValidationsNome(Nome);
        }
コード例 #7
0
        //_____________________________________________

        public void SetNovoCodigoUsuario(string CodigoUsuario)
        {
            this.CodigoUsuario = SecureValidationsAluno.ValidationsNovoCodigoUsuario(CodigoUsuario);
        }
コード例 #8
0
        //_____________________________________________

        public void SetTelefone(Telefone telefone)
        {
            this.Telefone = (Telefone)SecureValidationsAluno.ValidationsTelefone(telefone.DDD, telefone.Numero);
        }
コード例 #9
0
        //_____________________________________________

        public void SetEmail(string Email)
        {
            this.Email = SecureValidationsAluno.ValidationsEmail(Email);
        }
コード例 #10
0
        //_____________________________________________

        public void SetSobrenome(string Sobrenome)
        {
            this.Sobrenome = SecureValidationsAluno.ValidationSobrenome(Sobrenome);
        }