private void btnCadastrar_Click(object sender, EventArgs e) { FrmCadastroRevisao r = new FrmCadastroRevisao(); r.ShowDialog(); atualizaGrid(); }
private void btnEditar_Click(object sender, EventArgs e) { if (grid.CurrentRow.Cells[0].Value != null) { FrmCadastroRevisao frm = new FrmCadastroRevisao(); frm.editar(int.Parse(grid.CurrentRow.Cells[0].Value.ToString())); frm.ShowDialog(); } else { MessageBox.Show("Selecione um registro!"); } }