private void btnNovo_Click(object sender, EventArgs e) { this.comando = "inserir"; frmExamesTiposManter frmExamesTipos = new frmExamesTiposManter(this.comando, 0); frmExamesTipos.ShowDialog(); AtualizarTabela(); }
private void btnEditar_Click(object sender, EventArgs e) { this.comando = "editar"; try { this.idExameTipo = Convert.ToInt32(dgvExamesTipos.CurrentRow.Cells[0].Value); frmExamesTiposManter frmExamesTiposManter = new frmExamesTiposManter(this.comando, idExameTipo); frmExamesTiposManter.Show(); AtualizarTabela(); } catch (Exception) { MessageBox.Show("Selecione um item da Tabela"); } }