void QJGridView_RowCellClick(object sender, DevExpress.XtraGrid.Views.Grid.RowCellClickEventArgs e) { if (frmLift.getInstance().Visible || frmAlarm.getInstance().Visible) { return; } int i = this.QJGridView.FocusedRowHandle; string str = (string)e.CellValue; if (string.IsNullOrEmpty(str)) { return; } if (str.Equals("查看")) { if (i >= 0) { object needAlert = QJGridView.GetRowCellValue(this.QJGridView.FocusedRowHandle, QJGridView.Columns["ID"]); string id = (string)needAlert; object secName = QJGridView.GetRowCellValue(this.QJGridView.FocusedRowHandle, QJGridView.Columns["SectionName"]); string sectionName = (string)secName; frmConfigDlg.InstanceObject().SetID(id).Fill(sectionName).Show(); } } else { if (i >= 0) { object needAlert = QJGridView.GetRowCellValue(this.QJGridView.FocusedRowHandle, QJGridView.Columns["ID"]); string id = (string)needAlert; foreach (ASectionObj obj in m_pSectionObjList) { if (obj.ID.Equals(id)) { if (obj.SectionAlarmLevel >= 1) { if (obj.ManualLiftComputer()) { m_pLiftControlDictionary[id].SetLogInfo(obj.LiftLevelInfo); m_pLiftControlDictionary[id].Shown = true; m_pLiftControlDictionary[id].Show(); frmLift.getInstance().WhoIsShow(); frmLift.getInstance().RefreshLocation(); frmLift.getInstance().Show(); } else { // MessageBox.Show(string.Format("当前降雨情况没有达到警戒解除标准,请稍候再试!"), "解除提示", MessageBoxButtons.OK, MessageBoxIcon.Hand); m_pErrorDlg = frmErrorMsg.getInstance(); m_pErrorDlg.SetErrorMessage("当前降雨情况没有达到警戒解除标准,请稍候再试!"); m_pErrorDlg.ShowDialog(); } } } } } } }
private void ErrorMessage(Exception ex, string Query, Hashtable param) { frmErrorMsg frm = new frmErrorMsg(); frm.Ex = ex; frm.Query = Query; frm.Param = param; frm.ShowDialog(); }