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")); }
public static string[] GetRoles(int userID) { return((string[])UData.ToArray(GetRolesTable(userID), "RoleID")); }
public static IPrincipal GetPrincipal(string userName, DataTable roles) { return(GetPrincipal(userName, (string[])UData.ToArray(roles, "RoleID"))); }