Ejemplo n.º 1
0
        public ActionResult ChannelList(string alias)
        {
            //根据别名获得技术分类详细信息
            var techModel = TechService.GetTechInfoByAlias(alias);

            if (techModel.Id == 0 || techModel.IsDeleted)
            {
                return(Content("Argument error."));
            }
            //获得栏目ID
            int catId   = CECRequest.GetQueryInt("catid", 0);
            var catInfo = ColumnService.GetById(catId);

            int pageIndex = CECRequest.GetQueryInt("page", 1);

            var articleList = ArticleService.List(new Models.ArticleSearchSetting()
            {
                PageIndex = pageIndex,
                ColumnIds = new int[] { catId },
                TechIds   = new int[] { techModel.Id },
                IsDeleted = false
            });

            ViewBag.TechInfo    = techModel;
            ViewBag.ColumnInfo  = catInfo;
            ViewBag.ArticleList = articleList;
            return(View());
        }
Ejemplo n.º 2
0
        public ActionResult ChannelIndex(string alias)
        {
            //根据别名获得技术分类详细信息
            var techModel = TechService.GetTechInfoByAlias(alias);

            if (techModel.Id == 0 || techModel.IsDeleted)
            {
                return(Content("Argument error."));
            }
            ViewBag.TechInfo = techModel;
            return(View());
        }