public ActionResult Edit(AdminModel model) { var user = AdminModelMapper.Map(model); AdminHandler.Update(user); return(RedirectToAction("Index")); }
public ViewResult Edit() { var user = (AdminUser)Session[Constants.AdminUserKeyName]; var profile = AdminHandler.GetUser(user.UserId); var profileModel = AdminModelMapper.Map(profile); return(View(profileModel)); }
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)); }