public void btnNew_Click(object sender, EventArgs e) { try { mSetPublisher = new SetPublisher(); mSetPublisher.ShowDialog(); if (mSetPublisher.DialogResult == DialogResult.Cancel) { loadGrid(); } ContentMenuUtil contentMenu = new ContentMenuUtil(new LstMenu()); contentMenu.createContentMenu(ref pan, "go"); } catch (Exception ex) { MessageBox.Show(ex.ToString()); } }
public void btnEdit_Click(object sender, EventArgs e) { try { if (dgvPublisher.Rows.Count > 0) { if (dgvPublisher.CurrentRow.Cells[0].Value != null) { SetPublisher mSetPublisher = new SetPublisher((long)dgvPublisher.CurrentRow.Cells[0].Value); mSetPublisher.ShowDialog(); if (mSetPublisher.DialogResult == DialogResult.Cancel) { loadGrid(); } } } } catch (Exception ex) { MessageBox.Show(ex.ToString()); } }