/// <summary> /// 删除事件 --- 删除组合 /// <auth>Yanqiao.Cai</auth> /// <date>2012-12-28</date> /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btn_deleteGroup_Click(object sender, EventArgs e) { try { DataRow drow = gridView_groups.GetDataRow(gridView_groups.FocusedRowHandle); if (null == drow) { DrectSoft.Common.Ctrs.DLG.MyMessageBox.Show("请选择一条记录"); return; } //验证权限 string createUser = null == drow["CREATE_USER"] ? "" : drow["CREATE_USER"].ToString(); string errorStr = CheckDiseaseGroupRight(createUser); if (!string.IsNullOrEmpty(errorStr)) { DrectSoft.Common.Ctrs.DLG.MyMessageBox.Show(errorStr); return; } if (DrectSoft.Common.Ctrs.DLG.MyMessageBox.Show("您确定要删除病种组合 " + drow["NAME"].ToString() + " 吗?", "删除病种组合", DrectSoft.Common.Ctrs.DLG.MyMessageBoxButtons.OkCancel) == DialogResult.Cancel) { return; } int result = DS_SqlService.DeleteDiseaseGroup(int.Parse(drow["ID"].ToString())); if (result == 1) { DrectSoft.Common.Ctrs.DLG.MyMessageBox.Show("删除成功"); gridView_groups.DeleteRow(gridView_groups.FocusedRowHandle); } } catch (Exception ex) { DrectSoft.Common.Ctrs.DLG.MyMessageBox.Show(1, ex); } }