Example #1
0
        //
        // GET: /User/Create

        public ActionResult CreateUser()
        {
            var mentors = _mentorApplicationService.GetAllMentors();

            ViewData["Mentor"] = new SelectList(mentors, "Id", "MentorName");
            var roles = _roleProviderApplicationService.GetAllRoles();

            ViewData["Role"] = roles;
            return(View());
        }
Example #2
0
        public override string[] GetAllRoles()
        {
            IEnumerable <Role> allRoles = _roleProviderApplicationService.GetAllRoles();

            List <string> roleNames = new List <string>();

            foreach (Role role in allRoles)
            {
                roleNames.Add(role.RoleName);
            }
            return(roleNames.ToArray());
        }
Example #3
0
        //
        // GET: /Role/

        public ActionResult Index()
        {
            var roles = _roleProviderApplicationService.GetAllRoles();

            return(View(roles));
        }