コード例 #1
0
        public ActionResult AjaxGetComment(FormCollection Fm)
        {
            YSWL.MALL.BLL.SNS.Comments ComBll = new YSWL.MALL.BLL.SNS.Comments();
            int PostId = Common.Globals.SafeInt(Fm["PostId"], 0);

            if (PostId > 0)
            {
                PostsModel = PostsBll.GetModel(PostId);
                List <YSWL.MALL.Model.SNS.Comments> list = ComBll.GetCommentByPost(PostsModel, YSWL.Components.MvcApplication.GetCurrentRoutePath(YSWL.Web.AreaRoute.MSNS));
                if (list.Count > 0)
                {
                    return(Content(jss.Serialize(list)));
                }
            }
            return(Content("No"));
        }
コード例 #2
0
        public ActionResult AjaxGetCommentByPostId(FormCollection Fm)
        {
            YSWL.MALL.BLL.SNS.Comments ComBll = new YSWL.MALL.BLL.SNS.Comments();
            int PostId = Common.Globals.SafeInt(Fm["PostId"], 0);

            if (PostId > 0)
            {
                PostsModel = PostsBll.GetModel(PostId);
                List <YSWL.MALL.Model.SNS.Comments> list = ComBll.GetCommentByPost(PostsModel, YSWL.Components.MvcApplication.GetCurrentRoutePath(YSWL.Web.AreaRoute.MSNS));
                if (list.Count > 0)
                {
                    ViewBag.PostId = PostId;
                    return(View(CurrentThemeViewPath + "/UserProfile/postCommentList.cshtml", list));
                }
            }
            return(Content("No"));
        }