// ADICIONAR TAXA //------------------------------------------------------------------------------------------------------------ private void btnAdicionar_Click(object sender, EventArgs e) { frmCartaoTaxa frm = new frmCartaoTaxa(new objCartaoTaxa(null)); frm.MdiParent = Application.OpenForms.OfType<frmPrincipal>().FirstOrDefault(); DesativaMenuPrincipal(); Close(); frm.Show(); }
// EDITAR TAXA ESCOLHIDA //------------------------------------------------------------------------------------------------------------ private void btnEditar_Click(object sender, EventArgs e) { //--- check selected item if (dgvListagem.SelectedRows.Count == 0) { AbrirDialog("Favor selecionar um registro para Editar...", "Selecionar Registro", DialogType.OK, DialogIcon.Information); return; } //--- get Selected item objCartaoTaxa item = (objCartaoTaxa)dgvListagem.SelectedRows[0].DataBoundItem; //--- open edit form frmCartaoTaxa frm = new frmCartaoTaxa(item); frm.MdiParent = Application.OpenForms.OfType<frmPrincipal>().FirstOrDefault(); DesativaMenuPrincipal(); Close(); frm.Show(); }