public IList <Role> GetRolesNotInUser(string userCode) { IList <Role> allRoles = roleDao.GetAllRole(); IList <Role> userRoles = GetRolesByUserCode(userCode); List <Role> otherRoles = new List <Role>(); if (allRoles != null && allRoles.Count > 0) { foreach (Role r in allRoles) { if (!userRoles.Contains(r)) { otherRoles.Add(r); } } } return(otherRoles); }
public virtual IList <Role> GetAllRole() { return(entityDao.GetAllRole()); }