Beispiel #1
0
        public ActionResult AjaxGetCommentsCount(string type, int pid)
        {
            int CommentType = 0;

            switch (type)
            {
            case "Video":
                CommentType = (int)YSWL.MALL.Model.SNS.EnumHelper.CommentType.Normal;
                break;

            case "Product":
                CommentType = (int)YSWL.MALL.Model.SNS.EnumHelper.CommentType.Product;
                break;

            case "Photo":
                CommentType = (int)YSWL.MALL.Model.SNS.EnumHelper.CommentType.Photo;
                break;

            case "Blog":
                CommentType = (int)YSWL.MALL.Model.SNS.EnumHelper.CommentType.Blog;
                break;

            default:
                CommentType = (int)YSWL.MALL.Model.SNS.EnumHelper.CommentType.Normal;
                break;
            }

            int count = ComBll.GetCommentCount(CommentType, pid);

            return(Content(count.ToString()));
        }