/// <summary> /// 新增 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btnAdd_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { SetAlarmNotificationPersonnel setAlasrmNotificationPersonnel = new SetAlarmNotificationPersonnel(); setAlasrmNotificationPersonnel.ShowDialog(); btnQuery_ItemClick(sender, e); }
/// <summary> /// 修改 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btnEdit_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { try { int[] Handle = gridView.GetSelectedRows(); if (Handle == null || Handle.Length == 0) { XtraMessageBox.Show("请选择需要修改的报警配置", "消息"); return; } int rowHandle = gridView.FocusedRowHandle; string daID = gridView.GetRowCellValue(rowHandle, "AnalysisModelId").ToString(); //是ookUpEdit.Properties.ValueMember的值 SetAlarmNotificationPersonnel setAlasrmNotificationPersonnel = new SetAlarmNotificationPersonnel(daID); setAlasrmNotificationPersonnel.ShowDialog(); btnQuery_ItemClick(sender, e); } catch (Exception ex) { LogHelper.Error(ex.Message); XtraMessageBox.Show(ex.Message, "消息"); } }