コード例 #1
0
        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));
        }
コード例 #2
0
        public ActionResult Login()
        {
            MembershipUser user = UserManagerSingleton.GetUser();

            if (user != null)
            {
                return(RedirectToAction("Index", "Home", user));
            }

            return(View());
        }
コード例 #3
0
        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));
        }