public static string GetPersonGroupsForQuery(string module) { var user = SecurityFacade.CurrentUser(); string[] personGroups; if ("xitc".EqualsIc(module)) { personGroups = user.PersonGroups.Where(x => HlagLocationUtil.IsSuperGroup(x.PersonGroup)) .Select(f => f.PersonGroup.Name) .ToArray(); } else { personGroups = user.PersonGroups.Where(x => !HlagLocationUtil.IsSuperGroup(x.PersonGroup)) .Select(f => f.PersonGroup.Name) .ToArray(); } var strPersonGroups = String.Join("','", personGroups); strPersonGroups = "'" + strPersonGroups + "'"; return(strPersonGroups); }
private static PersonGroup GeneratePersonGroup(AttributeHolder personGroup) { var description = (string)personGroup.GetAttribute("description"); var pg = new PersonGroup { Name = (string)personGroup.GetAttribute(PersonGroupColumn), Description = description, Rowstamp = (long)personGroup.GetAttribute("rowstamp") }; pg.SuperGroup = HlagLocationUtil.IsSuperGroup(pg); return(pg); }