Exemplo n.º 1
0
        public ActionResult Edit(int id)
        {
            var article = jlService.GetArticle(id);

            ArticleModel model = new ArticleModel();

            model.AddTime     = article.AddTime;
            model.Content     = article.Content;
            model.Brief       = article.Brief;
            model.Title       = article.Title;
            model.Picture     = article.Picture;
            model.IsPublished = article.Status == 0;

            return(View(model));
        }
Exemplo n.º 2
0
        // skincare/1
        public ActionResult Detail(int id)
        {
            var article = jlService.GetArticle(id);


            // 热门文章
            var hotest = jlService.GetHotestArticle(10);
            var latest = jlService.GetLatestArticle(10);

            ViewBag.Hotest = hotest;
            ViewBag.Latest = latest;

            return(View(article));
        }