示例#1
0
        public RedirectToRouteResult MakeDicisionConfirmOrCancel(string button, string friend1, string user1ProfileId)
        {
            string getbutton = button;

            var user = _userManager.GetUserByProfileId(Convert.ToInt32(user1ProfileId));



            if (button == "1")
            {
                friendsManager.MakeFriend(user.Id, Convert.ToInt32(friend1));
                friendRequestManager.RemoveRequest(user.Id, Convert.ToInt32(friend1));
            }
            if (button == "0")
            {
                friendRequestManager.RemoveRequest(user.Id, Convert.ToInt32(friend1));
            }

            var profile = profileManager.GetProfileByUserId(Convert.ToInt32(friend1));

            return(RedirectToAction("Index", "Profile", new { id = profile.Id }));
        }