コード例 #1
0
 public static IList<EmployeeLdap> GetByDepartmentOrlocation(ForumActiveDirectoryMapping departmentMapping)
 {
     var employees = GetAllUsers().ToList();
     employees = departmentMapping != null &&
                 (departmentMapping.ActiveDirectoryAttributeKey != null &&
                  departmentMapping.ActiveDirectoryAttributeKey.ToUpper().Equals("DEPARTMENT"))
         ? employees.Where(
             x =>
                 String.Equals(x.Department, departmentMapping.ActiveDirectoryAttributeValue,
                     StringComparison.InvariantCultureIgnoreCase)).Distinct().ToList()
         : employees.Where(
             x =>
                 departmentMapping != null &&
                 String.Equals(x.Location, departmentMapping.ActiveDirectoryAttributeValue,
                     StringComparison.InvariantCultureIgnoreCase)).Distinct().ToList();
     return employees;
 }
コード例 #2
0
 public IList<EmployeeLdap> GetByDepartmentOrlocation(ForumActiveDirectoryMapping departmentMapping)
 {
     return ContactsDao.GetByDepartmentOrlocation(departmentMapping);
 }