protected override void PageLoad() { base.PageLoad(); id = RequestHelper.GetQueryString <int>("id"); if (id < 1) { id = ArticleClass.About; } int count = 0; article = ArticleBLL.SearchArticleList(1, 1, new ArticleSearchInfo { ClassID = "|" + id + "|" }, ref count).FirstOrDefault() ?? new ArticleInfo(); articleClassList = ArticleClassBLL.ReadArticleClassChildList(ArticleClass.About); if (id == ArticleClass.About) { id = int.Parse(article.ClassID.Split(new char[] { '|' }, StringSplitOptions.RemoveEmptyEntries).Last()); } Title = article.Title; Keywords = string.IsNullOrEmpty(article.Keywords) ? article.Title : article.Keywords; Description = string.IsNullOrEmpty(article.Summary) ? StringHelper.Substring(StringHelper.KillHTML(article.Content), 200) : article.Summary; }
protected override void PageLoad() { base.Title = "°ïÖúÖÐÐÄ"; base.PageLoad(); if (string.IsNullOrEmpty(searchKey)) { this.id = RequestHelper.GetQueryString <int>("ID"); if ((this.id == -2147483648) && (base.helpClassList.Count > 0)) { this.id = ArticleClassBLL.ReadArticleClassChildList(base.helpClassList[0].ID)[0].ID; } if (this.id > 0) { ArticleSearchInfo articleSearch = new ArticleSearchInfo(); articleSearch.ClassID = "|" + this.id.ToString() + "|"; this.articleList = ArticleBLL.SearchArticleList(articleSearch); } } else { ArticleSearchInfo articleSearch = new ArticleSearchInfo(); articleSearch.Condition = "([Keywords] like '%" + searchKey + "%' Or [Title] like '%" + searchKey + "%')"; this.articleList = ArticleBLL.SearchArticleList(articleSearch); } }
protected override void PageLoad() { base.PageLoad(); articleClassList = ArticleClassBLL.ReadArticleClassChildList(classID); if (string.IsNullOrEmpty(searchKey)) { this.id = RequestHelper.GetQueryString <int>("ID"); if (articleClassList.Count > 0) { if (this.id <= 0) { this.id = articleClassList[0].ID; title = base.Title = articleClassList[0].ClassName; } else { ArticleClassInfo article = articleClassList.Find(delegate(ArticleClassInfo articleClass) { return(articleClass.ID == this.id); }); if (article != null) { title = base.Title = article.ClassName; } } } } }
protected override void PageLoad() { this.helpClassList = ArticleClassBLL.ReadArticleClassChildList(4); this.productClassList = ProductClassBLL.ReadProductClassRootList(); //this.allProductClassList = ProductClassBLL.ReadProductClassNamedList(); this.topProductBrandList = ProductBrandBLL.ReadProductBrandIsTopCacheList(); this.productBrandList = ProductBrandBLL.ReadProductBrandCacheList(); this.hotKeyword = ShopConfig.ReadConfigInfo().HotKeyword; this.bottomList = ArticleBLL.ReadBottomList(); //this.tagsList = TagsBLL.ReadHotTagsList(); }
protected void BindClassBrandAttributeClassStandardType() { List <ProductBrandInfo> list = ProductBrandBLL.ReadProductBrandCacheList(); this.BrandID.DataSource = list; this.BrandID.DataTextField = "Name"; this.BrandID.DataValueField = "ID"; this.BrandID.DataBind(); this.BrandID.Items.Insert(0, new ListItem("选择品牌", "0")); this.RelationBrandID.DataSource = list; this.RelationBrandID.DataTextField = "Name"; this.RelationBrandID.DataValueField = "ID"; this.RelationBrandID.DataBind(); this.RelationBrandID.Items.Insert(0, new ListItem("所有品牌", string.Empty)); this.AccessoryBrandID.DataSource = list; this.AccessoryBrandID.DataTextField = "Name"; this.AccessoryBrandID.DataValueField = "ID"; this.AccessoryBrandID.DataBind(); this.AccessoryBrandID.Items.Insert(0, new ListItem("所有品牌", string.Empty)); List <ProductClassInfo> list2 = ProductClassBLL.ReadProductClassNamedList(); foreach (ProductClassInfo info in list2) { this.RelationClassID.Items.Add(new ListItem(info.ClassName, "|" + info.ID + "|")); } this.RelationClassID.Items.Insert(0, new ListItem("所有分类", string.Empty)); foreach (ProductClassInfo info in list2) { this.AccessoryClassID.Items.Add(new ListItem(info.ClassName, "|" + info.ID + "|")); } this.AccessoryClassID.Items.Insert(0, new ListItem("所有分类", string.Empty)); this.AttributeClassID.DataSource = AttributeClassBLL.ReadAttributeClassCacheList(); this.AttributeClassID.DataTextField = "Name"; this.AttributeClassID.DataValueField = "ID"; this.AttributeClassID.DataBind(); this.AttributeClassID.Items.Insert(0, new ListItem("请选择", "0")); foreach (ArticleClassInfo info2 in ArticleClassBLL.ReadArticleClassChildList(3)) { this.ArticleClassID.Items.Add(new ListItem(info2.ClassName, "|" + info2.ID + "|")); } this.ArticleClassID.Items.Insert(0, new ListItem(ArticleClassBLL.ReadArticleClassCache(3).ClassName, "|" + 3 + "|")); this.StandardType.DataSource = EnumHelper.ReadEnumList <ProductStandardType>(); this.StandardType.DataTextField = "ChineseName"; this.StandardType.DataValueField = "Value"; this.StandardType.DataBind(); }
protected void BindClassBrandAttributeClassStandardType() { //List<ProductBrandInfo> list = ProductBrandBLL.ReadProductBrandCacheList(); //this.RelationBrandID.DataSource = list; //this.RelationBrandID.DataTextField = "Name"; //this.RelationBrandID.DataValueField = "ID"; //this.RelationBrandID.DataBind(); //this.RelationBrandID.Items.Insert(0, new ListItem("所有品牌", string.Empty)); List <ProductClassInfo> list2 = ProductClassBLL.ReadProductClassNamedList(); foreach (ProductClassInfo info in list2) { this.RelationClassID.Items.Add(new ListItem(info.ClassName, "|" + info.ID + "|")); } this.RelationClassID.Items.Insert(0, new ListItem("所有分类", string.Empty)); CourseCateInfo CourseCateModel = new CourseCateInfo(); CourseCateModel.Condition = CompanyBLL.SystemCompanyId.ToString(); List <CourseCateInfo> courseCateList = CourseCateBLL.ReadCourseCateNamedList(CourseCateModel); foreach (CourseCateInfo info in courseCateList) { this.AccessoryClassID.Items.Add(new ListItem(info.CateName, info.CateId.ToString())); } this.AccessoryClassID.Items.Insert(0, new ListItem("所有分类", string.Empty)); this.AttributeClassID.DataSource = AttributeClassBLL.ReadAttributeClassCacheList(); this.AttributeClassID.DataTextField = "Name"; this.AttributeClassID.DataValueField = "ID"; this.AttributeClassID.DataBind(); this.AttributeClassID.Items.Insert(0, new ListItem("请选择", "0")); foreach (ArticleClassInfo info2 in ArticleClassBLL.ReadArticleClassChildList(3)) { this.ArticleClassID.Items.Add(new ListItem(info2.ClassName, "|" + info2.ID + "|")); } this.ArticleClassID.Items.Insert(0, new ListItem(ArticleClassBLL.ReadArticleClassCache(3).ClassName, "|" + 3 + "|")); this.StandardType.DataSource = EnumHelper.ReadEnumList <ProductStandardType>(); this.StandardType.DataTextField = "ChineseName"; this.StandardType.DataValueField = "Value"; this.StandardType.DataBind(); }
protected override void PageLoad() { base.PageLoad(); helpClassList = ArticleClassBLL.ReadArticleClassChildList(ArticleClass.Help); id = RequestHelper.GetQueryString <int>("id"); if (id == int.MinValue && helpClassList.Count > 0) { id = ArticleClassBLL.ReadArticleClassChildList(helpClassList[0].ID)[0].ID; } if (id > 0) { ArticleSearchInfo articleSearch = new ArticleSearchInfo(); articleSearch.ClassID = "|" + id.ToString() + "|"; articleList = ArticleBLL.SearchArticleList(articleSearch); } Title = "帮助中心"; }
protected void Page_Load(object sender, EventArgs e) { this.helpClassList = ArticleClassBLL.ReadArticleClassChildList(4); this.bottomList = ArticleBLL.ReadBottomList(); }