예제 #1
0
        public List <Role> GetUserRoles(int UserId)
        {
            UserRoleDAO userRoleDAO = new UserRoleDAO();
            RoleDAO     roleDao     = new RoleDAO();
            List <Role> roles       = new List <Role>();

            foreach (UserRole ur in userRoleDAO.GetAllFiltered("UserId", UserId.ToString()))
            {
                roles.Add(roleDao.GetByID(ur.RoleID));
            }

            return(roles);
        }