public ActionResult LoadComment(int pageId = 0, CommentStatus status = CommentStatus.Enable) { var pageCommentStore = CommentHelper.GetCommentStoreName(); var condition = CreateCondition(pageId, status); var listComment = CommentHelper.GetCommentByPageCondition(condition); return(PartialView("_ListComment", listComment)); }
public ActionResult Index() { var listPages = PageHelper.FilterPagesByExistedProperty(GetChildrenPageOfStartPage(), PageProperty.UserComment); var selectedPage = listPages.FirstOrDefault(); var pageCommentStore = CommentHelper.GetCommentStoreName(); var selectedPageId = selectedPage != null ? selectedPage.ContentLink.ID : 0; var condition = CreateCondition(selectedPageId, CommentStatus.Enable); var model = new PluginCommentViewModel { }; model.SelectedPagedId = selectedPageId; model.ListComment = CommentHelper.GetCommentByPageCondition(condition); model.ListPages = listPages; //add jquery-js lib RequireClientResources(); return(View(model)); }