public DataTable ExibirDados1()
        {
            try
            {
                DataTable DataT = new DataTable();
                dal = new PesquisarDiretor1();

                DataT = dal.ExibirDados1();

                return(DataT);
            }
            catch (Exception erro)
            {
                throw erro;
            }
        }
Esempio n. 2
0
        private void BtnPesquisar_Click(object sender, EventArgs e)
        {
            PesquisarDiretor1 gen = new PesquisarDiretor1();

            try
            {
                exibirDiretor.DataSource = gen.ExibirDados1();
            }
            catch (Exception erro)
            {
                MessageBox.Show("Erro ao exibir dados" + erro);
            }

            idDiretor.Enabled      = true;
            idFilmeDiretor.Enabled = true;
            nomeDiretor.Enabled    = true;
            cargoDiretor.Enabled   = true;
        }