public ActionResult PostDetails(string html) { int _categoryId = 0; ListAccess la = new ListAccess(); ArticleModel model = new ArticleModel(); model.ArticleContent.LoadArticle(html); model.Comments = la.ArticleComments(model.ArticleContent.ArticleId); if (model.ArticleContent.CategoryId > 0) { _categoryId = model.ArticleContent.CategoryId; } else if (model.ArticleContent.SecondLevCategoryId > 0) {_categoryId = model.ArticleContent.SecondLevCategoryId; } else { _categoryId = model.ArticleContent.ThirdLevCategoryId; } PageModel.ArticleContent.Title = model.ArticleContent.Title; PageModel.ArticleContent.Description = model.ArticleContent.Description; PageModel.ArticleContent.Author = model.ArticleContent.Author; PageModel.ArticleContent.Keywords = model.ArticleContent.Keywords; model.MostViewed = la.MostViewed(_categoryId, 20); model.RelatedTreeView = DIYFEHelper.GenerateTreeViewSecondLev(_categoryId, linkPrefix); return View(model); }
public ActionResult ProjectDetails(string html) { int articleId = 2; ListAccess la = new ListAccess(); ArticleModel model = new ArticleModel(); model.ArticleContent.LoadArticle(html); model.Comments = la.ArticleComments(articleId); PageModel.ArticleContent.Title = model.ArticleContent.Title; PageModel.ArticleContent.Description = model.ArticleContent.Description; PageModel.ArticleContent.Author = model.ArticleContent.Author; PageModel.ArticleContent.Keywords = model.ArticleContent.Keywords; return View(model); }