public ActionResult Favourite() { MembershipUser user = UserManagerSingleton.GetUser(); if (user != null) { ViewData["Images"] = DataFactory.GetInstance().GetFavourites((Pets)HttpContext.Profile.GetPropertyValue("Preferences")); } return(View("~/Views/Home/Index.cshtml", user)); }
public ActionResult Login() { MembershipUser user = UserManagerSingleton.GetUser(); if (user != null) { return(RedirectToAction("Index", "Home", user)); } return(View()); }
public ActionResult Index() { MembershipUser user = UserManagerSingleton.GetUser(); if (user != null && HttpContext.User.Identity.IsAuthenticated) { if (ViewData["Images"] == null) { ViewData["Images"] = DataFactory.GetInstance().GetAllByPreferences((Pets)HttpContext.Profile.GetPropertyValue("Preferences")); } } return(View(user)); }