Exemplo n.º 1
0
        /// <summary>
        /// 双击列表事件
        /// edit by Yanqiao.Cai 2012-11-05
        /// add try ... catch
        /// edit by xlb 2013-03-08
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        void gridViewList_DoubleClick(object sender, EventArgs e)
        {
            try
            {
                //edit by Yanqiao.Cai 2012-11-05 双击标题事件(直接返回)
                GridHitInfo hitInfo = gridViewList.CalcHitInfo(gridControlList.PointToClient(Cursor.Position));
                if (hitInfo.RowHandle < 0)
                {
                    return;
                }

                if (gridViewList.FocusedRowHandle >= 0)
                {
                    DataRow dr = gridViewList.GetDataRow(gridViewList.FocusedRowHandle);
                    if (dr != null)
                    {
                        string noOfFirstPage  = dr["NoOfInpat"].ToString();
                        string consultTypeID  = dr["ConsultTypeID"].ToString();
                        string consultApplySn = dr["ConsultApplySn"].ToString();

                        //if (consultTypeID == Convert.ToString((int)ConsultType.One))
                        //{
                        //    FormRecordForOne formRecordForOne = new FormRecordForOne(noOfFirstPage, m_App, consultApplySn);
                        //    formRecordForOne.StartPosition = FormStartPosition.CenterParent;
                        //    formRecordForOne.ShowDialog();
                        //}
                        //else
                        //{
                        //FormRecordForMultiply formRecrodForMultiply = new FormRecordForMultiply(noOfFirstPage, m_App, consultApplySn);
                        //formRecrodForMultiply.StartPosition = FormStartPosition.CenterParent;
                        //if (dr["APPLYUSER"].ToString() != m_App.User.Id)
                        //    formRecrodForMultiply.ReadOnlyControl();
                        //formRecrodForMultiply.ShowDialog();
                        //}
                        ProcessClickConsultatonListLogic processConsult = new ProcessClickConsultatonListLogic(m_App, noOfFirstPage);
                        processConsult.ProcessLogic(m_App.User.Id, consultApplySn);
                        Search();
                    }
                }
            }
            catch (Exception ex)
            {
                MyMessageBox.Show(1, ex);
            }
        }
 /// <summary>
 /// 打开会诊信息界面方法
 /// </summary>
 /// <param name="rowHandle"></param>
 private void OpenConsultationInfo(int rowHandle)
 {
     try
     {
         if (rowHandle >= 0)
         {
             DataRow dr = gridViewConsultation.GetDataRow(rowHandle);
             if (dr == null)
             {
                 return;
             }
             string noOfFirstPage  = dr["NoOfInpat"].ToString();
             string consultTypeID  = dr["ConsultTypeID"].ToString();
             string consultApplySn = dr["ConsultApplySn"].ToString();
             ProcessClickConsultatonListLogic processConsult = new ProcessClickConsultatonListLogic(m_App, noOfFirstPage);
             processConsult.ProcessLogic(m_App.User.Id, consultApplySn);
             BindConsultion();//刷新会诊列表中的数据
         }
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }