public void btnEdit_Click(object sender, EventArgs e) { try { if (dgvLibrary.Rows.Count > 0) { if (dgvLibrary.CurrentRow.Cells[0].Value != null) { //pan.BackColor = Color.AliceBlue; // SetAgent L_SetAgent = new SetAgent((long)dgvAgent.CurrentRow.Cells[dgvtxaskey.Index].Value); SetLibrary mSetLibrary = new SetLibrary(dgvLibrary.CurrentRow.Cells[0].Value.ToString()); mSetLibrary.ShowDialog(); if (mSetLibrary.DialogResult == DialogResult.Cancel) { loadGrid(); } //pan.BackColor = System.Drawing.SystemColors.Control; // this.textBox1.BackColor = System.Drawing.SystemColors.Control; } } } catch (Exception ex) { MessageBox.Show(ex.ToString()); //GeneralUtility.ShowErrorMsg(ex); } }
public void btnNew_Click(object sender, EventArgs e) { try { mSetLibrary = new SetLibrary(); mSetLibrary.ShowDialog(); if (mSetLibrary.DialogResult == DialogResult.Cancel) { loadGrid(); } ContentMenuUtil contentMenu = new ContentMenuUtil(new LstMenu()); contentMenu.createContentMenu(ref pan, "go"); } catch (Exception ex) { MessageBox.Show(ex.ToString()); } }