public override void btAlterar_Click(object sender, EventArgs e) { base.btAlterar_Click(sender, e); Enabled(false); if (Grid.CurrentRow != null) { var obj = (Database_Class.Classes.Processo)Grid.CurrentRow.DataBoundItem; var frm = new FormCadastroProcesso(obj); frm.ShowDialog(); frm.Dispose(); AtualizarGrid(); } Enabled(true); }
public override void btInserir_Click(object sender, EventArgs e) { base.btInserir_Click(sender, e); Enabled(false); var frm = new FormCadastroProcesso(null); frm.ShowDialog(); if (frm.gravou) { bindingSource.Add(frm.processo); } frm.Dispose(); AtualizarGrid(); Enabled(true); }