Пример #1
0
 // GET: Friend
 public ActionResult FriendList()
 {
     if (Authenticate.IsAuthenticated())
     {
         return(View(RelationshipManager.LoadFriends((User)Session["user"])));
     }
     else
     {
         return(RedirectToAction("Login", "User", new { returnurl = HttpContext.Request.Url }));
     }
 }
Пример #2
0
        public ActionResult Create()
        {
            if (Authenticate.IsAuthenticated())
            {
                Bracket bracket = new Bracket();
                User    user    = (User)Session["user"];

                user.Friends = RelationshipManager.LoadFriends(user);

                BracketFriends bracketFriends = new BracketFriends(user.Friends, bracket);

                return(View(bracketFriends));
            }
            else
            {
                return(RedirectToAction("Login", "User", new { returnurl = HttpContext.Request.Url }));
            }
        }