I am converting a module using the old HR module, to just using the Extranet. Previously i used this function to read all the users in a group:
private List
{
List
string sql = "select * from [HRAccessUser] ";
sql += "left join [AccessUser] on HRAccessUser.HRAccessUserID = AccessUser.AccessUserID ";
sql += "where AccessUserActive = " + Database.SqlBool(true) + " ";
sql += "order by AccessUser.AccessUserSort ";
using (IDataReader dr = Database.getDataReader(sql, "Access.mdb"))
{
while (dr.Read())
{
if (dr["AccessUserGroups"].ToString().Contains("@" + groupid + "@"))
{
users.Add(int.Parse(dr["AccessUserID"].ToString()));
}
}
}
return users;
}
This won't work anymore, since the "AccessUserSort" is replaced by xml in the "AccessUserSortXML" field. So how do i read a collection of users sorted correctly in the new version?