Exemplo n.º 1
0
        public ActionResult Index_V1()
        {
            //读取焦点图
            ViewBag.FocusImages = ArticleService.ListWithoutPage(5, new int[] { 41 });

            //技术头条
            ViewBag.TechHeadLines = ArticleService.ListWithoutPage(3, new int[] { 37 /*技术前沿*/ });

            //产业趋势
            ViewBag.ChanYeQuShi = ArticleService.ListWithoutPage(4, new int[] { 5 /*产业趋势*/ });
            //企业新闻
            ViewBag.EnterpriseNews = ArticleService.ListWithoutPage(4, new int[] { 13 /*企业新闻*/ });
            //新品发布
            ViewBag.NewProducts = ArticleService.ListWithoutPage(4, new int[] { 14 /*新品发布*/ });
            //应用案例
            ViewBag.Case = ArticleService.ListWithoutPage(3, new int[] { 39 /*应用案例*/ });

            //白皮书
            ViewBag.WhitePagers = ArticleService.ListWithoutPage(2, new int[] { 20 } /*白皮书*/);

            //视频
            ViewBag.Videos = VideoService.ListWithoutPage(3);

            //Webcast
            ViewBag.WebcastRss = WebcastRssService.ListWithoutPage(3);

            //产品库
            ViewBag.Products = CompanyProductService.ListWithoutPage(3, 0);

            return(View());
        }
Exemplo n.º 2
0
        public ActionResult NewIndex()
        {
            ViewBag.NewsCenter = ArticleService.ListWithoutPageByCondition(GetArticleSQLForNewIndex(7, new int[] { 5, 14, 15 }));

            //读取焦点图
            ViewBag.FocusImages = ArticleService.ListWithoutPage(5, new int[] { 41 });

            //独家
            ViewBag.DuJia = ArticleService.ListWithoutPageByCondition(GetArticleSQLAndTopOneWithImageForNewIndex(8, 15));
            //产业趋势
            ViewBag.ChanYeQuShi = ArticleService.ListWithoutPageByCondition(GetArticleSQLAndTopOneWithImageForNewIndex(8, 5));

            //企业新闻
            ViewBag.QiYeXinWen = ArticleService.ListWithoutPageByCondition(GetArticleSQLAndTopOneWithImageForNewIndex(8, 13));
            //新品速递
            ViewBag.XinPinSuDi = ArticleService.ListWithoutPageByCondition(GetArticleSQLAndTopOneWithImageForNewIndex(8, 14));

            ViewBag.DuiHua = ArticleService.ListWithoutPageByCondition("SELECT TOP(2)* FROM Articles WITH(NOLOCK) WHERE IsDeleted = 0 AND CategoryId  =76 AND ImageUrl <> '' ORDER BY PublishDateTime DESC ");

            //应用案例
            ViewBag.Case = ArticleService.ListWithoutPageByCondition("SELECT TOP(4)* FROM Articles WITH(NOLOCK) WHERE IsDeleted = 0 AND CategoryId  = 39 AND ImageUrl <> '' ORDER BY PublishDateTime DESC ");

            //技术前沿
            ViewBag.JiShuQianYan = ArticleService.ListWithoutPageByCondition(GetArticleSQLAndTopOneWithImageForNewIndex(9, 37));

            //技术之源
            ViewBag.JiShuZhiYuna = ArticleService.ListWithoutPageByCondition(GetArticleSQLAndTopOneWithImageForNewIndex(9, 38));
            //视频
            ViewBag.Videos = VideoService.ListWithoutPage(3);

            //Webcast
            ViewBag.WebcastRss = WebcastRssService.ListWithoutPage(3);

            ViewBag.Products = CompanyProductService.ListWithoutPage(12, 0);

            ViewBag.Companys = MemberService.CompanyList(new MemberSearchSetting()
            {
                MemberType    = MemberType.Enterprise,
                PageIndex     = 1,
                CompanyStatus = CompanyStatus.Pass,
                PageSize      = 12
            });

            return(View("NewIndex"));
        }