Exemple #1
0
        public void Alterar(ModeloFuncionario obj)
        {
            if (obj.FunMatricula.Trim().Length == 0)
            {
                throw new Exception("A Matricula é obrigatória.");
            }

            if (obj.FunNome.Trim().Length == 0)
            {
                throw new Exception("O nome do funcionário é obrigatório.");
            }

            if (obj.FunSalarioBase <= 0)
            {
                throw new Exception("O Salário Base é obrigatório");
            }

            if (obj.FunFuncaoExercida.Trim().Length == 0)
            {
                throw new Exception("A função é obrigatória.");
            }

            DAOFuncionario DALobj = new DAOFuncionario(conexao);

            DALobj.Alterar(obj);
        }