public long m_lngGetDeptList(System.Security.Principal.IPrincipal p_objPrincipal, string strDepID, out clsDepartmentVO[] objDep) { objDep = new clsDepartmentVO[0]; long lngRes = 0; //权限类 clsPrivilegeHandleService objPrivilege = new clsPrivilegeHandleService(); //检查是否有使用些函数的权限 lngRes = objPrivilege.m_lngCheckCallPrivilege(p_objPrincipal, "com.digitalwave.iCare.middletier.HIS.clsGetBase", "m_lngGetOPDoctorListByDate"); if (lngRes < 0) //没有使用的权限 { return(-1); } string strSQL = "select deptid_chr, modify_dat, deptname_vchr, category_int, inpatientoroutpatient_int, operatorid_chr, address_vchr, pycode_chr, attributeid, parentid, createdate_dat, status_int, deactivate_dat, wbcode_chr, code_vchr, extendid_vchr, shortno_chr, stdbed_count_int, putmed_int, usercode_vchr, expertdeptflag_int from t_bse_deptdesc"; if (strDepID != null) { strSQL = strSQL + " And deptid_chr='" + strDepID + "'"; } try { DataTable dtbResult = new DataTable(); com.digitalwave.iCare.middletier.HRPService.clsHRPTableService objHRPSvc = new clsHRPTableService(); lngRes = objHRPSvc.lngGetDataTableWithoutParameters(strSQL, ref dtbResult); objHRPSvc.Dispose(); if (lngRes > 0 && dtbResult.Rows.Count > 0) { objDep = new clsDepartmentVO[dtbResult.Rows.Count]; for (int i1 = 0; i1 < objDep.Length; i1++) { objDep[i1] = new clsDepartmentVO(); objDep[i1].strDeptID = dtbResult.Rows[i1]["DEPTID_CHR"].ToString().Trim(); objDep[i1].strDeptName = dtbResult.Rows[i1]["DEPTNAME_VCHR"].ToString().Trim(); objDep[i1].strCreateDate = dtbResult.Rows[i1]["CREATEDATE_DAT"].ToString().Trim(); if (dtbResult.Rows[i1]["STATUS_INT"].ToString().Trim() != "") { objDep[i1].intStatus = int.Parse(dtbResult.Rows[i1]["STATUS_INT"].ToString().Trim()); } } } } catch (Exception objEx) { string strTmp = objEx.Message; com.digitalwave.Utility.clsLogText objLogger = new clsLogText(); bool blnRes = objLogger.LogError(objEx); } return(lngRes); }
/// <summary> /// 根据父科室ID取回子科室信息 /// </summary> public long m_lngGetChildDepList(string strDepID, out clsDepartmentVO[] p_objResultArr) { p_objResultArr = new clsDepartmentVO[0]; long lngRes = 0; // System.Security.Principal.IPrincipal p_objPrincipal = null; com.digitalwave.iCare.middletier.HIS.clsGetBase objSvc = (com.digitalwave.iCare.middletier.HIS.clsGetBase)com.digitalwave.iCare.common.clsObjectGenerator.objCreatorObjectByType(typeof(com.digitalwave.iCare.middletier.HIS.clsGetBase)); lngRes = objSvc.lng_getChildrenDep(objPrincipal, strDepID, out p_objResultArr); objSvc.Dispose(); objSvc = null; return(lngRes); }
public long lng_getChildrenDep(System.Security.Principal.IPrincipal p_objPrincipal, string strDepID, out clsDepartmentVO[] objDep) { objDep = new clsDepartmentVO[0]; long lngRes = 0; //权限类 clsPrivilegeHandleService objPrivilege = new clsPrivilegeHandleService(); //检查是否有使用些函数的权限 lngRes = objPrivilege.m_lngCheckCallPrivilege(p_objPrincipal, "com.digitalwave.iCare.middletier.HIS.clsGetBase", "lng_getChildrenDep"); if (lngRes < 0) //没有使用的权限 { return(-1); } string strSQL = "Select b.deptid_chr,a.Deptname_VCHR,b.levels_int from T_BSE_DEPTDESC a,T_BSE_DEPTANDDEPT b " + " Where b.parentdeptid_chr='" + strDepID + "' and b.deptid_chr=a.deptid_chr(+) "; try { DataTable dtbResult = new DataTable(); com.digitalwave.iCare.middletier.HRPService.clsHRPTableService objHRPSvc = new clsHRPTableService(); lngRes = objHRPSvc.lngGetDataTableWithoutParameters(strSQL, ref dtbResult); objHRPSvc.Dispose(); if (lngRes > 0 && dtbResult.Rows.Count > 0) { objDep = new clsDepartmentVO[dtbResult.Rows.Count]; for (int i1 = 0; i1 < objDep.Length; i1++) { objDep[i1] = new clsDepartmentVO(); objDep[i1].strDeptID = dtbResult.Rows[i1]["deptid_chr"].ToString().Trim(); objDep[i1].strDeptName = dtbResult.Rows[i1]["Deptname_VCHR"].ToString().Trim(); } } } catch (Exception objEx) { string strTmp = objEx.Message; com.digitalwave.Utility.clsLogText objLogger = new clsLogText(); bool blnRes = objLogger.LogError(objEx); } return(lngRes); }
/// <summary> /// 查找科室,返回科室名 /// </summary> public string m_lngGetDepName(string strDepID) { long lngRes = 0; clsDepartmentVO[] p_objResultArr = new clsDepartmentVO[0]; // System.Security.Principal.IPrincipal p_objPrincipal = null; com.digitalwave.iCare.middletier.HIS.clsGetBase objSvc = (com.digitalwave.iCare.middletier.HIS.clsGetBase)com.digitalwave.iCare.common.clsObjectGenerator.objCreatorObjectByType(typeof(com.digitalwave.iCare.middletier.HIS.clsGetBase)); lngRes = objSvc.m_lngGetDeptList(objPrincipal, strDepID, out p_objResultArr); objSvc.Dispose(); objSvc = null; if (lngRes > 0) { if (p_objResultArr.Length > 0) { return(p_objResultArr[0].strDeptName); } } return(""); }
/// <summary> /// 获取员工所属科室 /// </summary> /// <param name="strEmpID"></param> /// <param name="p_objDeptArr"></param> /// <returns></returns> public long m_lngGetDepartmentByUserID(string strEmpID, out com.digitalwave.iCare.ValueObject.clsDepartmentVO[] p_objDeptArr) { p_objDeptArr = null; DataTable dtResult = null; com.digitalwave.DepartmentManagerService.clsDepartmentManagerService objServ = (com.digitalwave.DepartmentManagerService.clsDepartmentManagerService)com.digitalwave.iCare.common.clsObjectGenerator.objCreatorObjectByType(typeof(com.digitalwave.DepartmentManagerService.clsDepartmentManagerService)); long lngRes = objServ.m_lngGetDepartmentByUserID(null, strEmpID, out dtResult); //objServ.Dispose(); if (lngRes > 0 && dtResult.Rows.Count > 0) { p_objDeptArr = new com.digitalwave.iCare.ValueObject.clsDepartmentVO[dtResult.Rows.Count]; for (int i = 0; i < dtResult.Rows.Count; i++) { p_objDeptArr[i] = new clsDepartmentVO(); p_objDeptArr[i].strDeptID = dtResult.Rows[i]["deptid_chr"].ToString().Trim(); p_objDeptArr[i].strDeptName = dtResult.Rows[i]["deptname_vchr"].ToString().Trim(); try { p_objDeptArr[i].intCategory = int.Parse(dtResult.Rows[i]["category_int"].ToString()); } catch { p_objDeptArr[i].intCategory = 0; } try { p_objDeptArr[i].intInPatientOrOutPatient = int.Parse(dtResult.Rows[i]["inpatientoroutpatient_int"].ToString()); } catch { p_objDeptArr[i].intInPatientOrOutPatient = 0; } p_objDeptArr[i].strATTRIBUTEID = dtResult.Rows[i]["attributeid"].ToString().Trim(); p_objDeptArr[i].strPARENTID = dtResult.Rows[i]["parentid"].ToString().Trim(); p_objDeptArr[i].strShortNo = dtResult.Rows[i]["shortno_chr"].ToString().Trim(); } } return(lngRes); }