Пример #1
0
        private void toolStripButtonEdit_Click(object sender, EventArgs e)
        {
            if (enforceLawGridViewCompanyDangerChemicals.SelectedRows.Count == 0)
                return;

            if (enforceLawGridViewCompanyDangerChemicals.SelectedRows[0].Tag == null)
                return;

            UseWaitCursor = true;
            Application.DoEvents();

            try
            {
                CompanyDangerChemicals CompanyDangerChemicals = enforceLawGridViewCompanyDangerChemicals.SelectedRows[0].Tag as CompanyDangerChemicals;
                CompanyDangerChemicals.Company = (Company)InvokeUtil.SystemService.EntityInit(new Company { CompanyID = CompanyDangerChemicals.CompanyID });
                frmCompanyDangerChemical frm = new frmCompanyDangerChemical(CompanyDangerChemicals);
                frm.OpenWindow(this);
            }
            catch (Exception ex)
            {
                CommonInvoke.ErrorMessageBox(ex);
            }

            UseWaitCursor = false;
        }
Пример #2
0
        private void toolStripButtonAdd_Click(object sender, EventArgs e)
        {
            UseWaitCursor = true;
            Application.DoEvents();

            try
            {
                frmCompanyDangerChemical frm = new frmCompanyDangerChemical();
                frm.OpenWindow(this);
            }
            catch (Exception ex)
            {
                CommonInvoke.ErrorMessageBox(ex);
            }

            UseWaitCursor = false;
        }