Ejemplo n.º 1
0
 /// <summary>
 /// 编辑事件 --- 编辑组合
 /// <auth>Yanqiao.Cai</auth>
 /// <date>2012-12-28</date>
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void btn_editGroup_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;
         }
         //弹出窗体
         DiseasesForm frm = new DiseasesForm(m_app, int.Parse(drow["ID"].ToString()));
         frm.StartPosition = FormStartPosition.CenterParent;
         //添加窗体关闭事件 add by cyq 2012-12-06
         frm.FormClosed += new FormClosedEventHandler(DiseasesForm_FormClosed);
         frm.ShowDialog();
         //移除窗体关闭事件 add by cyq 2012-12-06
         frm.FormClosed -= new FormClosedEventHandler(DiseasesForm_FormClosed);
     }
     catch (Exception ex)
     {
         DrectSoft.Common.Ctrs.DLG.MyMessageBox.Show(1, ex);
     }
 }
Ejemplo n.º 2
0
 /// <summary>
 /// 新增事件 --- 新增组合
 /// <auth>Yanqiao.Cai</auth>
 /// <date>2012-12-28</date>
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void btn_addGroup_Click(object sender, EventArgs e)
 {
     try
     {
         DiseasesForm frm = new DiseasesForm(m_app, -1);
         frm.StartPosition = FormStartPosition.CenterParent;
         //添加窗体关闭事件 add by cyq 2012-12-06
         frm.FormClosed += new FormClosedEventHandler(DiseasesForm_FormClosed);
         frm.ShowDialog();
         //移除窗体关闭事件 add by cyq 2012-12-06
         frm.FormClosed -= new FormClosedEventHandler(DiseasesForm_FormClosed);
     }
     catch (Exception ex)
     {
         DrectSoft.Common.Ctrs.DLG.MyMessageBox.Show(1, ex);
     }
 }