コード例 #1
0
ファイル: frmPatientLabel.cs プロジェクト: ewin66/HIS
        private void m_cboDept_SelectedIndexChanged(object sender, System.EventArgs e)
        {
            try
            {
                //初始化清空
                this.Cursor = Cursors.Default;
                m_cboArea.ClearItem();
                //获取病区

                clsHospitalManagerDomain objDomain      = new clsHospitalManagerDomain();
                clsEmrDept_VO[]          objAreaInfoArr = null;
                long lngRes = objDomain.m_lngGetAreaInfo(((clsDepartment)(m_cboDept.SelectedItem)).m_strDeptNewID, out objAreaInfoArr);

                //long lngRes=objDomain.m_lngGetAreaInfo(((clsEmrDept_VO)(m_cboDept.SelectedItem)).m_strDEPTID_CHR, out objAreaInfoArr);
                if (lngRes <= 0)
                {
                    if (lngRes == (long)iCareData.enmOperationResult.Not_permission)
                    {
                        clsPublicFunction.ShowInformationMessageBox("权限不足!");
                    }
                    else
                    {
                        clsPublicFunction.ShowInformationMessageBox("数据库连接失败!");
                    }
                    return;
                }
                if (objAreaInfoArr != null)
                {
                    m_cboArea.ClearItem();
                    for (int i = 0; i < objAreaInfoArr.Length; i++)
                    {
                        //转换为旧的
                        clsInPatientArea objAreaTemp = new clsInPatientArea(objAreaInfoArr[i].m_strSHORTNO_CHR, objAreaInfoArr[i].m_strDEPTNAME_VCHR, objAreaInfoArr[i].m_strDEPTID_CHR);
                        //转换使用,新表的shortno=旧表的ID,所以新加一个字段保存新表ID
                        objAreaTemp.m_strAreaNewID = objAreaInfoArr[i].m_strDEPTID_CHR;
                        m_cboArea.AddItem(objAreaTemp);
                        //m_cboArea.AddItem(objAreaInfoArr[i]);
                    }
                    m_cboArea.SelectedIndex = 0;
                }
            }
            catch (Exception exp)
            {
                string strErrMessage = exp.Message + "\n at Module:[" + exp.TargetSite.ReflectedType.Name + "]\n  Method:[" + exp.TargetSite.Name + "]";
                com.digitalwave.Utility.clsLogText objLogger = new com.digitalwave.Utility.clsLogText();
                objLogger.Log2File(MDIParent.s_strErrorFilePath, "Exception: \r\n" + strErrMessage);
            }
            #region
//			this.Cursor=Cursors.WaitCursor;
//			this.m_cboArea.ClearItem();
//			clsInPatientArea[] objAreaArr;
//			m_objDepartmentManager.m_lngGetAllAreaInDept(((clsDepartment)(this.m_cboDept.SelectedItem)).m_StrDeptID,out objAreaArr);
//			if(objAreaArr !=null)
//			{
//				this.m_cboArea.AddRangeItems(objAreaArr);
//				this.m_cboArea.SelectedIndex = 0;
//			}
//			this.Cursor=Cursors.Default;
            #endregion
        }
コード例 #2
0
        protected override void m_mthSetPatientBaseInfo(clsPatient p_objSelectedPatient)
        {
            if (p_objSelectedPatient.m_ObjPeopleInfo == null)
            {
                m_mthShowNoPatient();
                return;
            }
            //这个开关的作用是以防对m_cboArea赋值后触发其SelectedIndexChanged事件
            m_blnCanTextChanged = false;

            if (p_objSelectedPatient.m_ObjInBedInfo.m_ObjLastSessionInfo != null)
            {
                //				m_cboDept.ClearItem();
                //				m_cboArea.ClearItem();
                //				m_cboDept.AddItem(p_objSelectedPatient.m_ObjInBedInfo.m_ObjLastDeptInfo.m_ObjDept);
                //				m_cboDept.SelectedIndex=0;
                //				clsInPatientArea objInPatientArea =new clsInPatientArea(p_objSelectedPatient.m_ObjInBedInfo.m_ObjLastAreaInfo.m_ObjArea.m_StrAreaID,p_objSelectedPatient.m_ObjInBedInfo.m_ObjLastAreaInfo.m_ObjArea.m_StrAreaName);
                //				m_cboArea.AddItem(objInPatientArea);
                //				m_cboArea.SelectedIndex=0;
                //				m_txtBedNO.Text = p_objSelectedPatient.m_ObjInBedInfo.m_ObjLastBedInfo.m_ObjBed.m_StrBedName;
                //使用新表 modified by tfzhang at 2005年10月17日 16:02:29
                //清空
                m_cboDept.ClearItem();

                //获取科室
                string str1 = p_objSelectedPatient.m_strDeptNewID;
                string str2;
                clsHospitalManagerDomain objDomain = new clsHospitalManagerDomain();
                clsEmrDept_VO            objDeptNew;
                objDomain.m_lngGetSpecialDeptInfo(str1, out objDeptNew);
                str1 = objDeptNew.m_strSHORTNO_CHR.Trim();
                str2 = objDeptNew.m_strDEPTNAME_VCHR.Trim();
                string        str11       = objDeptNew.m_strDEPTID_CHR.Trim();
                clsDepartment objDeptTemp = new clsDepartment(str1, str2);
                //转换使用,新表的shortno=旧表的ID,所以新加一个字段保存新表ID
                objDeptTemp.m_strDeptNewID = str11;
                m_cboDept.AddItem(objDeptTemp);
                m_cboDept.SelectedIndex = 0;

                //获取病区
                m_cboArea.ClearItem();
                string str3 = p_objSelectedPatient.m_strAreaNewID;
                if (str3.Trim().Length != 0)//病区不为空
                {
                    string        str4;
                    clsEmrDept_VO objAreNew;
                    objDomain.m_lngGetSpecialAreaInfo(str3, out objAreNew);
                    str3 = objAreNew.m_strSHORTNO_CHR;
                    str4 = objAreNew.m_strDEPTNAME_VCHR;
                    clsInPatientArea objInPatientArea = new clsInPatientArea(str3, str4, str3);
                    //转换使用,新表的shortno=旧表的ID,所以新加一个字段保存新表ID
                    objInPatientArea.m_strAreaNewID = objAreNew.m_strDEPTID_CHR;
                    m_cboArea.AddItem(objInPatientArea);
                    m_cboArea.SelectedIndex = 0;
                }

                m_txtBedNO.Text = p_objSelectedPatient.m_strBedCode;
            }
            else
            {
                m_txtBedNO.Text = "";
            }

            m_objCurrentPatient = p_objSelectedPatient;

            txtInPatientID.Text   = m_objCurrentPatient.m_StrHISInPatientID;
            m_txtPatientName.Text = m_objCurrentPatient.m_ObjPeopleInfo.m_StrFirstName;
            lblSex.Text           = m_objCurrentPatient.m_ObjPeopleInfo.m_StrSex;
            lblAge.Text           = m_objCurrentPatient.m_ObjPeopleInfo.m_StrAge;
            m_blnCanTextChanged   = true;
        }