コード例 #1
0
        public ActionResult RemovePost(int postOwnerId, int postId, int groupId)
        {
            if (Session["UserName"] == null)
            {
                return(RedirectToAction("Error"));
            }

            int userConnectedId = Int32.Parse(Session["UserId"].ToString());

            if (postOwnerId == userConnectedId)
            {
                KoombuBll kBll = new KoombuBll();
                kBll.RemovePost(postId);
            }
            if (groupId != 0)
            {
                return(RedirectToAction("GroupWall", "Group", new { groupId = groupId }));
            }
            return(RedirectToAction("Home", "Home"));
        }