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