private void ShowDialogForm(Tesseramento label) { FormTesseramento frm = new FormTesseramento(label); frm.ShowDialog(); frm.Dispose(); }
private void cboNew_Click(object sender, EventArgs e) { try { FormTesseramento frm = new FormTesseramento(); if (frm.ShowDialog() == DialogResult.OK) { if (frm.Current != null) { IBindingList g = gridView1.DataSource as IBindingList; g.Add(frm.Current); } } frm.Dispose(); } catch (AccessDeniedException) { XtraMessageBox.Show("Impossibile accedere alla funzionalità richiesta. Accesso negato", "Errore", MessageBoxButtons.OK, MessageBoxIcon.Error); } catch (Exception ex) { ErrorHandler.Show(ex); } }