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);
        }
Exemple #2
0
 public virtual IList <Role> GetAllRole()
 {
     return(entityDao.GetAllRole());
 }