コード例 #1
0
 //
 // GET: /PictureTagSearch/
 public ActionResult Index(int? pageNo,string tagName)
 {
     pageNo=pageNo??0;
     int totalCount=0;
     Tag[] hotTag = bizTag.ListClickHotTag(28, Hotnet.Entity.Enum.EnumTagType.图片);
     IList<string> tagNameList=tagName.Split(new string[]{" "}, StringSplitOptions.RemoveEmptyEntries);
     SearchByTagConditon searchObj = new SearchByTagConditon() { TagName = tagName };
     ViewData["PictureGroups"] =  bizPictureGroup.ListReferenceGroupsByTags(pageSize, pageNo.Value, out totalCount, tagNameList);
     ViewData["PaginateHelper"] = PaginateHelper.ConstructPaginate(totalCount, pageNo ?? 0, PAGE_SIZE, "/PictureTagSearch/Index/", searchObj);
     ViewData["HotPictureTag"] = hotTag;
     ViewData["PictureTagControl"] = new TagControl() { Tags = hotTag.Skip(8).ToArray(), Url = "/PictureTagSearch/Index", IsOpenNewPage = false };
     ViewData["SearchTagName"] = tagName;
     ViewData["HeadControl"] = new HeadControl() { SystemCategory = EnumSystemCategory.图片 };
     return View();
 }
コード例 #2
0
 //
 // GET: /NewsTagSearch/
 public ActionResult Index(int? pageNo, string tagName)
 {
     ViewData["HeadControl"] = new HeadControl() { SystemCategory = EnumSystemCategory.新闻 };
     pageNo = pageNo ?? 0;
     int totalCount = 0;
     Tag[] hotTag = bizTag.ListClickHotTag(28, Hotnet.Entity.Enum.EnumTagType.新闻);
     News[] news = bizNews.ListNewsByTag(tagName.Split(new string[] { " " }, StringSplitOptions.RemoveEmptyEntries), 15, pageNo.Value, out totalCount);
     SearchByTagConditon searchObj = new SearchByTagConditon() { TagName = tagName };
     ViewData["News"] = news;
     ViewData["PaginateHelper"] = PaginateHelper.ConstructPaginate(totalCount, pageNo ?? 0, pageSize, "/NewsTagSearch/Index/", searchObj);
     ViewData["HotNewsTag"] = hotTag;
     ViewData["NewsTagControl"] = new TagControl() { Tags = hotTag.Skip(8).ToArray(), Url = "/NewsTagSearch/Index", IsOpenNewPage = false };
     ViewData["SearchTagName"] = tagName;
     return View();
 }
コード例 #3
0
        //
        // GET: /VideoTagSearch/
        public ActionResult Index(int? pageNo,string tagName)
        {
            pageNo=pageNo??0;
            int totalCount=0;

            SearchByTagConditon searchObj = new SearchByTagConditon() { TagName = tagName };
            Tag[] hotReferenceTag = bizTag.ListReferenceHotTag(28, Hotnet.Entity.Enum.EnumTagType.��Ƶ);
            Video[] videos = bizVideo.ListReferenceVideoByTags(pageNo.Value, PAGE_SIZE, out totalCount,searchObj );
            ViewData["PaginateHelper"] = PaginateHelper.ConstructPaginate(totalCount, pageNo ?? 0, PAGE_SIZE, "/VideoTagSearch/Index/", searchObj);
            ViewData["Videos"] = videos;
            ViewData["Categories"] = bizVideoCategory.List();
            ViewData["HotReferenceTag"] = hotReferenceTag;
            ViewData["VideoTag"] = new TagControl() { Tags = hotReferenceTag.Skip(8).ToArray(), Url = "/VideoTagSearch/Index", IsOpenNewPage=false };
            ViewData["SearchTagName"] = tagName;
            ViewData["HeadControl"] = new HeadControl() { SystemCategory = EnumSystemCategory.��Ƶ };
            return View();
        }
コード例 #4
0
ファイル: VideoController.cs プロジェクト: dalinhuang/hotnet
        public ActionResult Index()
        {
            SourceFrom[] videoSourceFroms = bizSourceFrom.ListVideoShowBignet();
            IEnumerable<IGrouping<int, ViewVideoList>> bignetVideos = bizVideo.ListTopXEveryNet(EnumVideoListType.����վ������Ƶ, 6);
            //Video[] myCommendVideos = bizVideo.ListMyCommendVideoes(6, EnumOrder.���ʱ��);
            ViewVideoList[] myCommendVideos = bizVideoList.List(EnumVideoListType.�Ƽ���Ƶ, 6);
            IEnumerable<IGrouping<int, Video>> videosByCategory = bizVideo.ListTopXVideoByCategory(6);
            //ViewData["HeadVideoes"] = new VideoHeadRotatorControl() { Videoes = bizVideo.ListHeadVideoes() };
            ViewData["HeadVideoes"] = new VideoHeadRotatorControl() { Videoes = bizVideoList.List(EnumVideoListType.��ҳ������Ƶ,5) };
            ViewData["LatestVideoes"] = bizVideo.ListLatestVideo();
            ViewData["HotVideoes"] = bizVideo.ListHotVideo();
            ViewData["SourceFrom"] = videoSourceFroms;
            ViewData["Categories"] = bizVideoCategory.List();
            ViewData["VideoBignet"] = bignetVideos;
            ViewData["MyCommendVideo"] = myCommendVideos;
            ViewData["VideoByCategory"] = videosByCategory;
            ViewData["VideoTag"] = new TagControl() { Tags = bizTag.ListClickHotTag(40, EnumTagType.��Ƶ), Url = "/VideoTagSearch/Index" };
            ViewData["HeadControl"] = new HeadControl() { SystemCategory = EnumSystemCategory.��Ƶ };
            return View();
        }

        #endregion Methods
    }
コード例 #5
0
 //
 // GET: /PictureHome/
 public ActionResult Index()
 {
     ViewData["HeadControl"] = new HeadControl() { SystemCategory = EnumSystemCategory.图片};
     //ViewData["BigEyes"] = BizBigEye.ListTop(EnumSystemCategory.图片, 4);
     ViewData["BigEyes"] = BizPictureList.List(EnumPictureListType.首页焦点图片, 4);
     ViewData["PictureCategories"] = BizPictureGroup.ListTopXPictureGroupByCategory(6);
     ViewData["HotPictureGroups"] = BizPictureGroup.ListHotGroups(13);
     ViewData["HotPictureTag"] = new TagControl(){ Tags= BizTag.ListClickHotTag(40, EnumTagType.图片), IsOpenNewPage=true, Url="/PictureTagSearch"};
     //列出一周的最新图片
     ViewData["PictureGroupNewest"]=BizPictureGroup.ListNewestPictureGroup(7,10);
     //ViewData["CommendPictureGroups"] = BizPictureGroup.ListRecommendPictureGroup(6);
     ViewData["CommendPictureGroups"] = BizPictureList.List( EnumPictureListType.推荐图片,6);
     return View();
 }