public string m_mthGetExtendDeptID(string p_strShortNo) { long lngRes = 0; if (m_blnIsSpesifyDept) { string strExtendID = string.Empty; lngRes = new clsDepartmentManager().m_lngGetExtendDeptID(m_strDeptID, out strExtendID); if (strExtendID == null) { strExtendID = ""; } return("" + p_strShortNo + ".dept_stayed = '" + strExtendID.Trim() + "'"); } else { string strSql = ""; string[] strExtendIDArr = null; com.digitalwave.DepartmentManagerService.clsDepartmentManagerService objService = (com.digitalwave.DepartmentManagerService.clsDepartmentManagerService)com.digitalwave.iCare.common.clsObjectGenerator.objCreatorObjectByType(typeof(com.digitalwave.DepartmentManagerService.clsDepartmentManagerService)); lngRes = objService.m_lngGetExtendDeptIDArr(clsEMRLogin.LoginInfo.m_strEmpID, out strExtendIDArr); if (lngRes > 0 && strExtendIDArr != null && strExtendIDArr.Length > 0) { if (strExtendIDArr.Length > 1) { strSql += " ("; } strSql += p_strShortNo + ".dept_stayed = '" + strExtendIDArr[0] + "' "; for (int i = 1; i < strExtendIDArr.Length; i++) { strSql += " or " + p_strShortNo + ".dept_stayed = '" + strExtendIDArr[i] + "' "; if (i == strExtendIDArr.Length - 1) { strSql += ")"; } } return(strSql + " "); } else { return(" " + p_strShortNo + ".dept_stayed = '' "); } } }
public string m_mthGetAllManageDept(string p_strShortNo) { string strSql = ""; clsDept_Desc[] objDeptArr = null; long lngRes = new clsDepartmentManager().m_lngGetDeptArr_EmployeeCanManage(null, clsEMRLogin.LoginInfo.m_strEmpNo, out objDeptArr); if (lngRes > 0 && objDeptArr != null && objDeptArr.Length > 0) { strSql = " " + p_strShortNo + ".SHORTNO_CHR = '" + objDeptArr[0].m_strShortNO.Trim() + "' "; for (int i = 1; i < objDeptArr.Length; i++) { strSql += " or " + p_strShortNo + ".SHORTNO_CHR = '" + objDeptArr[i].m_strShortNO.Trim() + "' "; } return(strSql + " "); } else { return(" " + p_strShortNo + ".SHORTNO_CHR = '' "); } }
private void m_mthGetAllDept() { clsDeptAndAreaInfo[] objDeptAndAreaInfoArr = null; clsDepartmentManager objManagerDomain = new clsDepartmentManager(); long lngRes = objManagerDomain.m_lngGetAllDeptAndAreaInfoArr(out objDeptAndAreaInfoArr); if (lngRes <= 0) { clsPublicFunction.ShowInformationMessageBox("数据库连接失败!"); return; } else if (objDeptAndAreaInfoArr == null) { return; } for (int i = 0; i < objDeptAndAreaInfoArr.Length; i++) { TreeNode objNode = new TreeNode(objDeptAndAreaInfoArr[i].m_objDept.m_StrDeptName); frmRowlInfo.clsNodeInfo objInfo = new iCare.frmRowlInfo.clsNodeInfo(); objInfo.m_intCategory = 1; objInfo.m_strID = objDeptAndAreaInfoArr[i].m_objDept.m_StrDeptID; objInfo.m_strName = objDeptAndAreaInfoArr[i].m_objDept.m_StrDeptName; objInfo.m_objDeptDesc = new iCareData.clsDept_Desc(); objInfo.m_objDeptDesc.m_dtmCreateDate = objDeptAndAreaInfoArr[i].m_objDept.m_DtmDeptCreateDate; objInfo.m_objDeptDesc.m_dtmModifyDate = objDeptAndAreaInfoArr[i].m_objDept.m_DtmDeptInfoModifyDate; objInfo.m_objDeptDesc.m_dtmModifyDate = objDeptAndAreaInfoArr[i].m_objDept.m_DtmDeptRelationModifyDate; objInfo.m_objDeptDesc.m_strCategory = objDeptAndAreaInfoArr[i].m_objDept.m_EnmDeptCategory.ToString(); objInfo.m_objDeptDesc.m_strDeActivedOperatorID = ""; objInfo.m_objDeptDesc.m_strDeptID = objDeptAndAreaInfoArr[i].m_objDept.m_StrDeptID; objInfo.m_objDeptDesc.m_strDeptName = objDeptAndAreaInfoArr[i].m_objDept.m_StrDeptName; objInfo.m_objDeptDesc.m_strInPatientOrOutPatient = objDeptAndAreaInfoArr[i].m_objDept.m_EnmDeptType.ToString(); objInfo.m_objDeptDesc.m_strPYCode = objDeptAndAreaInfoArr[i].m_objDept.m_StrDeptPYCode; objInfo.m_objDeptDesc.m_strShortNO = objDeptAndAreaInfoArr[i].m_objDept.m_StrDeptShortNO; m_cboDept.AddItem(objInfo); } }
/// <summary> /// 获取员工所属科室 /// </summary> /// <param name="p_strEmployeeID"></param> /// <returns></returns> public clsDepartment[] m_objGetEmpDept(string p_strEmployeeID) { if (p_strEmployeeID == null || p_strEmployeeID == string.Empty) { return(null); } clsDept_Desc[] objDeptDescArr; long lngres = new clsDepartmentManager().m_lngGetDeptArr_EmployeeCanManage(clsLoginContext.s_ObjLoginContext.m_ObjPrincial, p_strEmployeeID, out objDeptDescArr); if (lngres <= 0 || objDeptDescArr == null) { return(null); } clsDepartment[] objDeptArr = new clsDepartment[objDeptDescArr.Length]; for (int i = 0; i < objDeptDescArr.Length; i++) { objDeptArr[i] = new clsDepartment(objDeptDescArr[i].m_strDeptID, objDeptDescArr[i].m_strDeptName); } if (objDeptArr.Length > 0) { return(objDeptArr); } return(null); }
private void m_cboArea_SelectedIndexChanged(object sender, System.EventArgs e) { #region old clsDepartmentManager m_objDepartmentManager = new clsDepartmentManager(); #endregion this.Cursor = Cursors.WaitCursor; if (m_cboArea.SelectedItem == null) { return; } clsEmrPatient_VO[] objPatientArr = null; if (m_rdbInPatient.Checked) { m_objChoosePatientDomain.m_lngGetAllPatientInArea(((clsEmrDept_VO)(m_cboArea.SelectedItem)).m_strDEPTID_CHR, out objPatientArr); } else if (m_rdbOutPatient.Checked) { m_objChoosePatientDomain.m_lngGetAllPatientInArea(((clsEmrDept_VO)(m_cboArea.SelectedItem)).m_strDEPTID_CHR, m_dtpOutPatientStart.Value, m_dtpOutPatientEnd.Value, out objPatientArr); } if (objPatientArr != null) { listView1.Items.Clear(); ListViewItem lv; for (int i = 0; i < objPatientArr.Length; i++) { if (objPatientArr[i] == null) { continue; } lv = new ListViewItem(objPatientArr[i].m_strHISInPatientID); lv.SubItems.Add(objPatientArr[i].m_strLASTNAME_VCHR); if (objPatientArr[i].m_strSEX_CHR != null) { lv.SubItems.Add(objPatientArr[i].m_strSEX_CHR.Trim()); } else { lv.SubItems.Add(""); } lv.SubItems.Add(objPatientArr[i].m_strAGELONG_CHR); lv.Tag = objPatientArr[i]; listView1.Items.Add(lv); } } else { listView1.Items.Clear(); } #region 更新当前病区 if (m_cboArea.GetItemsCount() > 0) { objpCurrentArea = (clsEmrDept_VO)m_cboArea.SelectedItem; } #endregion this.Cursor = Cursors.Default; }