public static string buildSiteMap(string[] roleIDs) { string result = @"<div class='main'><nav id = 'cbp-hrmenu' class='cbp-hrmenu'><ul>"; AdmContextDT contextDT = new AdmContextDT(); AdmRolecontextDT roleContextDT = new AdmRolecontextDT(); string roleContextCond = " RoleID in (" + String.Join(",", roleIDs) + ")"; string[] contextIDs = DataTableHelper.ExtractToStringArray(roleContextDT.GetByCond(roleContextCond), "ContextID"); string contextCond = "ID in (" + String.Join(",", contextIDs) + ")"; DataTable dtContexts = contextDT.GetByCond(contextCond); string[] rootIDs = DataTableHelper.ExtractToStringArray(dtContexts, "RootMap"); result += buildRootNode(rootIDs, dtContexts); result += @"</ul> </nav></div>"; return(result); }