public override void Alterar() { try { base.Alterar(); if (gv_Clifor.GetSelectedRows().Count() == 0) { throw Excessoes.AlterandoSemRegistro(); } using (var forma = new FClifor_Cadastro { Operacao = Operacao.Alterar, clifor = gv_Clifor.GetSelectedRow <E_CLIFOR>() }) { if (forma.ShowDialog() == DialogResult.OK) { clifor = forma.clifor; Buscar(); } } } catch (Exception excessao) { Mensagens.Alerta(excessao.Tratar()); } }
public override void Adicionar() { try { base.Adicionar(); using (var forma = new FClifor_Cadastro { Operacao = Operacao.Cadastrar }) { if (forma.ShowDialog() == DialogResult.OK) { clifor = forma.clifor; Buscar(); } } } catch (Exception excessao) { Mensagens.Alerta(excessao.Tratar()); } }