public void Info(int id) { M.Article article = M.Article.GetById(DataSource, id); M.ArticleCategory cate = M.ArticleCategory.GetById(DataSource, article.CategoryId); this["Article"] = article; this["Category"] = cate; Render("article.html"); }
public void Parents(int id) { if (CheckAjax()) { if (CheckRight()) { List <int> list = new List <int>(); M.ArticleCategory ac = M.ArticleCategory.GetById(DataSource, id); list.Add(ac.Id); while (ac.ParentId != 0) { ac = M.ArticleCategory.GetById(DataSource, ac.ParentId); list.Insert(0, ac.Id); } SetResult(list.ToArray()); } } }