Exemplo n.º 1
0
        /// <summary>
        /// 实现原贴的点赞
        /// 成功返回1
        /// 失败返回0
        /// </summary>
        /// <returns></returns>
        public ActionResult AjaxPostSupportCountAdd1()
        {
            string   postIdStr = Request["postId"].ToString();
            int      postId    = Convert.ToInt32(postIdStr);
            Post_bll post_bll  = new Post_bll();

            if (post_bll.UpdateSupportCountAdd1(postId) < 1)
            {
                return(Content("0"));
            }
            return(Content("1"));
        }
Exemplo n.º 2
0
        /// <summary>
        /// 实现原贴的点赞
        /// 成功返回1
        /// 失败返回0
        /// 返回2,提示登录
        /// </summary>
        /// <returns></returns>
        public ActionResult AjaxPostSupportCountAdd1()
        {
            //if (Session["userName"] == null)
            //    return Content("2");

            string   postIdStr = Request["postId"].ToString();
            int      postId    = Convert.ToInt32(postIdStr);
            Post_bll post_bll  = new Post_bll();

            if (post_bll.UpdateSupportCountAdd1(postId) < 1)
            {
                return(Content("0"));
            }
            return(Content("1"));
        }