Exemple #1
0
        public static string[] GetRoles(string userName)
        {
            DataTable table = BaseCollection.ExecuteSql(InfiChess.Role, "SELECT Role.RoleID FROM UserRole INNER JOIN Role ON UserRole.RoleID = Role.RoleID INNER JOIN[User] ON UserRole.UserID = [User].UserID WHERE (LOWER([User].UserName) = LOWER(@p1))", userName);

            return((string[])UData.ToArray(table, "RoleID"));
        }
Exemple #2
0
 public static string[] GetRoles(int userID)
 {
     return((string[])UData.ToArray(GetRolesTable(userID), "RoleID"));
 }
Exemple #3
0
 public static IPrincipal GetPrincipal(string userName, DataTable roles)
 {
     return(GetPrincipal(userName, (string[])UData.ToArray(roles, "RoleID")));
 }