private void BindRepeaters() { var usersInGroup = Utils.User.GetUserIdsInGroup(_groupID); Cn.Open(); //bind allowed users if (usersInGroup.Any()) { rptAllowed.DataSource = Cn.ExecuteOrm <UserInfo>(@"SELECT ForumUsers.UserID, ForumUsers.UserName FROM ForumUsers WHERE UserID IN (" + usersInGroup.Select(x => x.ToString()).Aggregate((x, y) => x + "," + y) + ") ORDER BY UserName"); } else { rptAllowed.DataSource = null; } rptAllowed.DataBind(); //bind denied users rptDenied.DataSource = Cn.ExecuteOrm <UserInfo>(@"SELECT ForumUsers.UserID, ForumUsers.UserName FROM ForumUsers WHERE Disabled=0 " + (usersInGroup.Any() ? "AND UserID NOT IN (" + usersInGroup.Select(x => x.ToString()).Aggregate((x, y) => x + "," + y) + ")" : "") + " ORDER BY UserName"); rptDenied.DataBind(); Cn.Close(); lblNoUsersInGroup.Visible = (rptAllowed.Items.Count == 0); }