// // GET: /VideoCategory/ /// <summary> /// /// </summary> /// <param name="id"></param> /// <param name="type">0���·��� 1�����</param> /// <returns></returns> public ActionResult Index(int? id,int? categoryID,int? pageNo,EnumOrder? type,bool? isGroup) { if (pageNo != null || type != null) ViewData["IsAnchor"] = "True"; type = type ?? EnumOrder.���ʱ��; pageNo=pageNo??0; int totalCount = 0; categoryID = categoryID ?? id.Value; VideoCategory[] categories = bizVideoCategory.List(); SearchVideoCondition searchObj = new SearchVideoCondition() { CategoryID=categoryID.Value, OrderType=(int)type, IsGroup=isGroup }; ViewListVideo[] videos = bizVideo.List(pageNo.Value, pageSize, out totalCount, searchObj, (int)EnumPublishState.����); ViewData["RecommendVideoes"] = bizVideoList.List( EnumVideoListType.�Ƽ���Ƶ,categoryID.Value,6); //ViewData["RefPictureGroup"] = new ReferencePictureControl() { ReferencePictures = bizPictureGroup.ListReferenceGroupsByTags(categories.FirstOrDefault(x => x.CategoryID == categoryID.Value).Tag.Split(new char[]{' '}), 10, true), MoreLink="/picture" }; ViewData["RefPictureGroup"] = bizPictureGroup.ListReferenceGroupsByTags(categories.FirstOrDefault(x => x.CategoryID == categoryID.Value).Tag.Split(new char[] { ' ' }), 10, true); ViewData["RefNews"] = bizNews.ListReferenceNewsByTags(categories.FirstOrDefault(x => x.CategoryID == categoryID.Value).Tag, 20, true); ViewData["PaginateHelper"] = PaginateHelper.ConstructPaginate(totalCount, pageNo ?? 0, pageSize, "/VideoCategory/Index/", searchObj); ViewData["Categories"] = categories; ViewData["Click"] = type == EnumOrder.������� ? "id='current'" : ""; ViewData["Time"] = type == EnumOrder.���ʱ�� ? "id='current'" : ""; ViewData["CategoryID"] = categoryID; ViewData["Type"] = (int)type; ViewData["Videos"] = videos; ViewData["isGroup"] = isGroup; ViewData["VideoRotatorControl"] = new VideoRotatorControl() { Videos = bizVideoList.List( EnumVideoListType.���ཹ����Ƶ,categoryID.Value, 5) }; ViewData["HeadControl"] = new HeadControl() { SystemCategory = EnumSystemCategory.��Ƶ, SystemCategoryID = categoryID.Value }; return View(); } #endregion Methods }
public ActionResult Index(int? pageNo,SearchVideoCondition searchObj) { int totalCount=0; searchObj.IsGroup = false; VideoCategory category = bizVideoCategory.Get(searchObj.CategoryID.Value); ViewListVideo[] list = bizVideo.List(pageNo ?? 0, PAGE_SIZE, out totalCount, searchObj, searchObj.IsPublished); ViewData["PaginateHelper"] = PaginateHelper.ConstructPaginate(totalCount, pageNo ?? 0, PAGE_SIZE, "/AdminVideo/Index/", searchObj); ViewData["CategoryID"] = searchObj.CategoryID; ViewData["CategoryName"] = category.Name; ViewData["Videos"] = list; return View(list); }