private void toolStripButtonEdit_Click(object sender, EventArgs e) { if (enforceLawGridViewChemicalsHighlyToxic.SelectedRows.Count == 0) return; if (enforceLawGridViewChemicalsHighlyToxic.SelectedRows[0].Tag == null) return; UseWaitCursor = true; Application.DoEvents(); try { ChemicalsHighlyToxic chemicalsHighlyToxic = enforceLawGridViewChemicalsHighlyToxic.SelectedRows[0].Tag as ChemicalsHighlyToxic; frmChemicalsHighlyToxic frm = new frmChemicalsHighlyToxic(chemicalsHighlyToxic); frm.OpenWindow(this); } catch (Exception ex) { CommonInvoke.ErrorMessageBox(ex); } UseWaitCursor = false; }
private void toolStripButtonAdd_Click(object sender, EventArgs e) { UseWaitCursor = true; Application.DoEvents(); try { frmChemicalsHighlyToxic frm = new frmChemicalsHighlyToxic(); frm.OpenWindow(this); } catch (Exception ex) { CommonInvoke.ErrorMessageBox(ex); } UseWaitCursor = false; }