Beispiel #1
0
        public ActionResult CancelFollow(bool flag, Int64 id, string userName)
        {
            Int64 my_id = UserHandler.GetUserIdByEmail(User.Identity.Name);

            FriendsHandler.CancelFollow(my_id, id);

            return(RedirectToAction("ListFriends", "Account"));
        }
Beispiel #2
0
        public ActionResult Follow(bool flag, Int64 id, string userName)
        {
            Int64 my_id = UserHandler.GetUserIdByEmail(User.Identity.Name);

            if (flag == true)    //是好友,取消关注
            {
                FriendsHandler.CancelFollow(my_id, id);
            }
            else                 //不是好友,加好友
            {
                FriendsHandler.Follow(my_id, id);
            }
            return(RedirectToAction("Search", "Home", new { userName = userName }));
        }