Ejemplo n.º 1
0
        public ActionResult EditUniversityAdmin(string userId)
        {
            UserViewModel model = _adminBusinessLogic.GetUserViewModelById(userId, UserRoles.UniversityAdmin);

            if (model != null)
            {
                var universities = _commonBusinessLogic.GetUniversitiesList();
                universities.Insert(0, new University()
                {
                    Name = "Select university", Id = 0
                });
                model.Universities = new SelectList(universities.Select(x => new SelectListItem()
                {
                    Text = x.Name, Value = x.Id.ToString(), Selected = model.UniversityId == x.Id
                }), "Value", "Text");
            }

            return(View(model));
        }
Ejemplo n.º 2
0
        public ActionResult PersonalInfo()
        {
            UserViewModel model = _adminBusinessLogic.GetUserViewModelById(User.Identity.GetUserId(), UserRoles.Student);

            return(View(model));
        }