Exemplo n.º 1
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();
 }
 //
 // 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();
 }
Exemplo n.º 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();
        }