private void buttonEditar_Click(object sender, EventArgs e) { try { FormConexaoBD frm2 = new FormConexaoBD(GetDadosDoGrid()); frm2.ShowDialog(); CarregaDados(); } catch (Exception ex) { MessageBox.Show("Erro: " + ex.Message); } }
private void buttonIncluir_Click(object sender, EventArgs e) { try { ConexaoBD conexaoBD = new ConexaoBD(); conexaoBD.Id = 0; FormConexaoBD frm2 = new FormConexaoBD(conexaoBD); frm2.ShowDialog(); CarregaDados(); } catch (Exception ex) { MessageBox.Show("Erro: " + ex.Message); } }