Ejemplo n.º 1
0
        public ActionResult Edit(AdminModel model)
        {
            var user = AdminModelMapper.Map(model);

            AdminHandler.Update(user);
            return(RedirectToAction("Index"));
        }
Ejemplo n.º 2
0
        public ViewResult Edit()
        {
            var user         = (AdminUser)Session[Constants.AdminUserKeyName];
            var profile      = AdminHandler.GetUser(user.UserId);
            var profileModel = AdminModelMapper.Map(profile);

            return(View(profileModel));
        }
Ejemplo n.º 3
0
        public ActionResult ViewProfile()
        {
            var user = (AdminUser)Session[Constants.AdminUserKeyName];

            if (user == null)
            {
                return(RedirectToAction("Login", "Admin", new { area = "Admin" }));
            }
            var admin     = AdminHandler.GetUser(user.UserId);
            var userModel = AdminModelMapper.Map(admin);

            return(View("ViewProfile", userModel));
        }