예제 #1
0
        public static List <int> GetDepartmentIdList(int siteId)
        {
            var departmentIdList   = new List <int>();
            var departmentInfoList = DepartmentManagerCache.GetDepartmentInfoListByCache(siteId);

            foreach (var departmentInfo in departmentInfoList)
            {
                departmentIdList.Add(departmentInfo.Id);
            }

            return(departmentIdList);
        }
예제 #2
0
        public static List <int> GetDepartmentIdList(int siteId, string userName)
        {
            var departmentIdList   = new List <int>();
            var departmentInfoList = DepartmentManagerCache.GetDepartmentInfoListByCache(siteId);

            foreach (var departmentInfo in departmentInfoList)
            {
                if (StringUtils.In(departmentInfo.UserNames, userName))
                {
                    departmentIdList.Add(departmentInfo.Id);
                }
            }

            return(departmentIdList);
        }
예제 #3
0
        public static DepartmentInfo GetDepartmentInfo(int siteId, int departmentId)
        {
            var entries = DepartmentManagerCache.GetDepartmentInfoListByCache(siteId);

            return(entries.FirstOrDefault(x => x != null && x.Id == departmentId));
        }
예제 #4
0
 public static List <DepartmentInfo> GetDepartmentInfoList(int siteId)
 {
     return(DepartmentManagerCache.GetDepartmentInfoListByCache(siteId));
 }