Example #1
0
        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;
        }
Example #2
0
        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;
        }