示例#1
0
        /// <summary>
        /// 初始化,载入下拉菜单等
        /// </summary>
        public void Load()
        {
            List <SelectListItem> list = new List <SelectListItem>();

            list.Add(new SelectListItem()
            {
                Text = "郑州八中校本部", Value = "0"
            });

            //分校区 列表添加
            list.Add(new SelectListItem()
            {
                Text = "郑州市经纬中学", Value = "-1"
            });
            list.Add(new SelectListItem()
            {
                Text = "高新区实验学校", Value = "-2"
            });

            foreach (ArticleClassInfo info in ArticleClass.AdminGetArticleClassTreeList())
            {
                list.Add(new SelectListItem()
                {
                    Text = info.ClassName, Value = info.ArticleClassID.ToString()
                });
            }

            ViewData["articleClassList"] = list;
        }
        /// <summary>
        /// 初始化,载入下拉菜单等
        /// </summary>
        public void Load()
        {
            List <SelectListItem> list = new List <SelectListItem>();

            list.Add(new SelectListItem()
            {
                Text = "顶级分类", Value = "0"
            });
            foreach (ArticleClassInfo info in ArticleClass.AdminGetArticleClassTreeList())
            {
                list.Add(new SelectListItem()
                {
                    Text = info.ClassName, Value = info.ArticleClassID.ToString()
                });
            }

            ViewData["productClassList"] = list;


            List <SelectListItem> list1 = new List <SelectListItem>();

            list1.Add(new SelectListItem()
            {
                Text = "玻璃CD ", Value = "玻璃CD"
            });
            list1.Add(new SelectListItem()
            {
                Text = "CD", Value = "CD"
            });
            list1.Add(new SelectListItem()
            {
                Text = "DVD", Value = "DVD"
            });
            list1.Add(new SelectListItem()
            {
                Text = "黑胶", Value = "黑胶"
            });
            list1.Add(new SelectListItem()
            {
                Text = "发烧碟", Value = "发烧碟"
            });


            ViewData["typelist"] = list1;



            string allowImgType = string.Empty;

            string[] imgTypeList = StringHelper.SplitString(BSConfig.SiteConfig.UploadImgType, ",");
            foreach (string imgType in imgTypeList)
            {
                allowImgType += string.Format("*{0};", imgType.ToLower());
            }

            string[] sizeList = StringHelper.SplitString(WorkContext.SiteConfig.ArticleImgThumbSize);

            ViewData["size"]         = sizeList[sizeList.Length / 2];
            ViewData["allowImgType"] = allowImgType;
            ViewData["maxImgSize"]   = BSConfig.SiteConfig.UploadImgSize;
            ViewData["referer"]      = SiteUtils.GetAdminRefererCookie();
        }