Exemplo n.º 1
0
 private void InitCreateUpdate(List<string> selectSourceFrom,List<string> selectStars,List<string> selectDirector)
 {
     var stars = bizStar.List<string>(x => x.StarName, false);
     var sourceFromList=bizSourceFrom.List(EnumSystemCategory.视频);
     var extendAttributes=sourceFromList.Select(x=>x.Url).ToList();
     SelectControl sourcefroms = new SelectControl() { ButtonValue = "请选择来源", ControlType = HtmlControlType.radio, Text = "Name", Value = "SourceFromID", SelectedValues = selectSourceFrom, EnumerableData = sourceFromList, ExtendAttributes=extendAttributes, Title = "请选择来源", CallbackScriptFunction = "setSourceFrom", PageControlID = 1 };
     ViewData["SourceFrom"] = sourcefroms;
     SelectControl characters = new SelectControl() { ButtonValue = "请选择主演", ControlType = HtmlControlType.checkbox, Text = "StarName", Value = "StarID", SelectedValues= selectStars, EnumerableData = stars, Title = "请选择主演", CallbackScriptFunction = "setStar", PageControlID = 2 };
     ViewData["Star"] = characters;
     SelectControl directors = new SelectControl() { ButtonValue = "请选择导演", ControlType = HtmlControlType.radio, Text = "StarName", Value = "StarID", SelectedValues=selectDirector, EnumerableData = stars, Title = "请选择导演", CallbackScriptFunction = "setDirector", PageControlID = 3 };
     ViewData["Director"] = directors;
 }
        //
        // GET: /AdminMusicCategory/
        public ActionResult Index(int id, int? pageNo, SearchMusicCondition smc)
        {
            int totalSize;
            if (smc.IsGroup)
            {
                ViewData["List"] = BizMusicGroup.List(id, pageNo ?? 0, PAGE_SIZE, out totalSize, smc);
            }
            else
            {
                ViewData["List"] = BizMusic.ListMusicByCategoryID(id, pageNo ?? 0, PAGE_SIZE, out totalSize, smc);

            }
            var category = BizMusicCategory.Get(id); ;
            ViewData["Category"] = category;
            ViewData["PaginateHelper"] = PaginateHelper.ConstructPaginate(totalSize, pageNo ?? 0, PAGE_SIZE, "/AdminStar/Index/" + id + "/?", smc);
            ViewData["IsGroup"] = smc.IsGroup;

            ViewData["SourceFromList"] = GetSourceFromList();
            var stars = BizStar.List<string>(x => x.StarName, false);
            SelectControl characters = new SelectControl()
            {
                ButtonValue = "��ѡ����ֻ��ֶ�",
                ControlType = HtmlControlType.checkbox,
                Text = "StarName",
                Value = "StarID",
                EnumerableData = stars,
                Title = "��ѡ����ֻ��ֶ�",
                CallbackScriptFunction = "setStar",
                PageControlID = 1
            };
            ViewData["Star"] = characters;

            return View();
        }