Exemplo n.º 1
0
 //
 // GET: /Home/
 public ActionResult Index()
 {
     // var articleList = ArticleService.GetArticleList(new Article { CategoryId = 2, Conditaion = "category_id=[CategoryId];" });
     var newsList = GetList(5, 1, 9);
     var productList = GetList(4, 1, 4);
     //var about = ArticleService.GetArticle(new Article() { CategoryId = 11, Conditaion = "category_id=[CategoryId]" });
     var about = ArticleService.Get(new Criteria("CategoryId", 11));
     var msg = ArticleService.Get(new Criteria("CategoryId", 11));
     ViewBag.Msg = msg != null ? msg.Title : "";
     var model = new CmsIndex {Article = about, NewsList = newsList, ProductList = productList};
     return View(model);
 }
Exemplo n.º 2
0
        //
        // GET: /Home/

        public ActionResult Index()
        {
            // var articleList = ArticleService.GetArticleList(new Article { CategoryId = 2, Conditaion = "category_id=[CategoryId];" });
            var newsList    = GetList(5, 1, 9);
            var productList = GetList(4, 1, 4);
            //var about = ArticleService.GetArticle(new Article() { CategoryId = 11, Conditaion = "category_id=[CategoryId]" });
            var about = ArticleService.Get(new Criteria("CategoryId", 11));
            var msg   = ArticleService.Get(new Criteria("CategoryId", 11));

            ViewBag.Msg = msg != null ? msg.Title : "";
            var model = new CmsIndex {
                Article = about, NewsList = newsList, ProductList = productList
            };

            return(View(model));
        }