protected void Page_Load(object sender, EventArgs e) { if (!this.Page.IsPostBack) { base.CheckAdminPower("StatisticsProduct", PowerCheckType.Single); foreach (ProductClassInfo info in ProductClassBLL.ReadProductClassNamedList()) { this.ClassID.Items.Add(new ListItem(info.ClassName, "|" + info.ID + "|")); } this.ClassID.Items.Insert(0, new ListItem("所有分类", string.Empty)); this.BrandID.DataSource = ProductBrandBLL.ReadProductBrandCacheList(); this.BrandID.DataTextField = "Name"; this.BrandID.DataValueField = "ID"; this.BrandID.DataBind(); this.BrandID.Items.Insert(0, new ListItem("所有品牌", string.Empty)); ProductSearchInfo productSearch = new ProductSearchInfo(); productSearch.IsSale = 1; productSearch.Name = RequestHelper.GetQueryString <string>("Name"); productSearch.ClassID = RequestHelper.GetQueryString <string>("ClassID"); productSearch.InBrandID = RequestHelper.GetQueryString <string>("BrandID"); string queryString = RequestHelper.GetQueryString <string>("ProductOrderType"); queryString = (queryString == string.Empty) ? "SellCount" : queryString; productSearch.ProductOrderType = queryString; this.ClassID.Text = RequestHelper.GetQueryString <string>("ClassID"); this.BrandID.Text = RequestHelper.GetQueryString <string>("BrandID"); this.Name.Text = RequestHelper.GetQueryString <string>("Name"); this.StartDate.Text = RequestHelper.GetQueryString <string>("StartDate"); this.EndDate.Text = RequestHelper.GetQueryString <string>("EndDate"); this.ProductOrderType.Text = queryString; DateTime startDate = RequestHelper.GetQueryString <DateTime>("StartDate"); DateTime endDate = ShopCommon.SearchEndDate(RequestHelper.GetQueryString <DateTime>("EndDate")); base.BindControl(ProductBLL.StatisticsProductSale(base.CurrentPage, base.PageSize, productSearch, ref this.Count, startDate, endDate), this.RecordList, this.MyPager); } }
protected void SubmitButton_Click(object sender, EventArgs e) { ProductClassInfo productClass = new ProductClassInfo(); productClass.ID = RequestHelper.GetQueryString <int>("ID"); productClass.FatherID = Convert.ToInt32(this.FatherID.Text); productClass.OrderID = Convert.ToInt32(this.OrderID.Text); productClass.ClassName = this.ClassName.Text; productClass.Keywords = this.Keywords.Text; productClass.Description = this.Description.Text; productClass.IsDownload = Convert.ToInt32(this.IsDownload.Text); string alertMessage = ShopLanguage.ReadLanguage("AddOK"); if (productClass.ID == -2147483648) { base.CheckAdminPower("AddProductClass", PowerCheckType.Single); int id = ProductClassBLL.AddProductClass(productClass); AdminLogBLL.AddAdminLog(ShopLanguage.ReadLanguage("AddRecord"), ShopLanguage.ReadLanguage("ProductClass"), id); } else { base.CheckAdminPower("UpdateProductClass", PowerCheckType.Single); ProductClassBLL.UpdateProductClass(productClass); AdminLogBLL.AddAdminLog(ShopLanguage.ReadLanguage("UpdateRecord"), ShopLanguage.ReadLanguage("ProductClass"), productClass.ID); alertMessage = ShopLanguage.ReadLanguage("UpdateOK"); } AdminBasePage.Alert(alertMessage, RequestHelper.RawUrl); }
protected void Page_Load(object sender, EventArgs e) { if (!this.Page.IsPostBack) { base.CheckAdminPower("ReadProduct", PowerCheckType.Single); foreach (ProductClassInfo info in ProductClassBLL.ReadProductClassNamedList()) { this.ClassID.Items.Add(new ListItem(info.ClassName, "|" + info.ID + "|")); } this.ClassID.Items.Insert(0, new ListItem("所有分类", string.Empty)); //this.BrandID.DataSource = ProductBrandBLL.ReadProductBrandCacheList(); //this.BrandID.DataTextField = "Name"; //this.BrandID.DataValueField = "ID"; //this.BrandID.DataBind(); //this.BrandID.Items.Insert(0, new ListItem("所有品牌", string.Empty)); //this.ClassID.Text = RequestHelper.GetQueryString<string>("ClassID"); //this.BrandID.Text = RequestHelper.GetQueryString<string>("BrandID"); //this.Key.Text = RequestHelper.GetQueryString<string>("Key"); //this.StartAddDate.Text = RequestHelper.GetQueryString<string>("StartAddDate"); //this.EndAddDate.Text = RequestHelper.GetQueryString<string>("EndAddDate"); ProductSearchInfo product = new ProductSearchInfo(); product.Key = RequestHelper.GetQueryString <string>("Key"); product.ClassID = RequestHelper.GetQueryString <string>("ClassID"); product.InBrandID = RequestHelper.GetQueryString <string>("BrandID"); product.IsSale = 0; product.StartAddDate = RequestHelper.GetQueryString <DateTime>("StartAddDate"); product.EndAddDate = ShopCommon.SearchEndDate(RequestHelper.GetQueryString <DateTime>("EndAddDate")); base.PageSize = 10; List <ProductInfo> dataSource = ProductBLL.SearchProductList(base.CurrentPage, base.PageSize, product, ref this.Count); base.BindControl(dataSource, this.RecordList, this.MyPager); } }
protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { CheckAdminPower("StatisticsProduct", PowerCheckType.Single); foreach (ProductClassInfo productClass in ProductClassBLL.ReadNamedList()) { ClassID.Items.Add(new ListItem(productClass.Name, "|" + productClass.Id + "|")); } ClassID.Items.Insert(0, new ListItem("所有分类", string.Empty)); BrandID.DataSource = ProductBrandBLL.ReadList(); BrandID.DataTextField = "Name"; BrandID.DataValueField = "Id"; BrandID.DataBind(); BrandID.Items.Insert(0, new ListItem("所有品牌", string.Empty)); ClassID.Text = RequestHelper.GetQueryString <string>("ClassID"); BrandID.Text = RequestHelper.GetQueryString <string>("BrandID"); Name.Text = RequestHelper.GetQueryString <string>("Name"); StorageAnalyse.Text = RequestHelper.GetQueryString <string>("StorageAnalyse"); ProductSearchInfo productSearch = new ProductSearchInfo(); productSearch.IsSale = (int)BoolType.True; productSearch.Name = RequestHelper.GetQueryString <string>("Name"); productSearch.ClassId = RequestHelper.GetQueryString <string>("ClassID"); productSearch.BrandId = RequestHelper.GetQueryString <int>("BrandID"); productSearch.StorageAnalyse = RequestHelper.GetQueryString <int>("StorageAnalyse"); List <ProductInfo> productList = ProductBLL.SearchList(CurrentPage, PageSize, productSearch, ref Count); BindControl(productList, RecordList, MyPager); } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { ProductClass.DataSource = ProductClassBLL.ReadRootList(); ProductClass.DataTextField = "Name"; ProductClass.DataValueField = "ID"; ProductClass.DataBind(); int id = RequestHelper.GetQueryString <int>("Id"); if (id > 0) { CheckAdminPower("ReadAdImage", PowerCheckType.Single); var adImage = AdImageBLL.Read(id); Title.Text = adImage.Title; SubTitle.Text = adImage.SubTitle; LinkUrl.Text = adImage.LinkUrl; ImageUrl.Text = adImage.ImageUrl; OrderId.Text = adImage.OrderId.ToString(); BgColor.Text = adImage.MobileLinkUrl; ProductClass.Text = adImage.ClassId.ToString(); _adType = adImage.AdType; } else { OrderId.Text = AdImageBLL.MaxOrderId(AdImageInfo.TABLENAME).ToString(); _adType = RequestHelper.GetQueryString <int>("fp_type"); } } }
/// <summary> /// 页面加载方法 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { CheckAdminPower("ReadProduct", PowerCheckType.Single); ClassID.DataSource = ProductClassBLL.ReadNamedList(); ClassID.DataTextField = "Name"; ClassID.DataValueField = "ID"; ClassID.DataBind(); ClassID.Items.Insert(0, new ListItem("所有分类", string.Empty)); BrandID.DataSource = ProductBrandBLL.ReadList(); BrandID.DataTextField = "Name"; BrandID.DataValueField = "ID"; BrandID.DataBind(); BrandID.Items.Insert(0, new ListItem("所有品牌", string.Empty)); ClassID.Text = RequestHelper.GetQueryString <string>("ClassID"); BrandID.Text = RequestHelper.GetQueryString <string>("BrandID"); Key.Text = RequestHelper.GetQueryString <string>("Key"); ProductSearchInfo productSearch = new ProductSearchInfo(); productSearch.IsSale = (int)BoolType.True; productSearch.IsDelete = 0;//未删除的 productSearch.StandardType = (int)ProductStandardType.No; productSearch.Key = RequestHelper.GetQueryString <string>("Key"); productSearch.ClassId = RequestHelper.GetQueryString <string>("ClassID"); productSearch.BrandId = RequestHelper.GetQueryString <int>("BrandID"); BindControl(ProductBLL.SearchList(CurrentPage, PageSize, productSearch, ref Count), RecordList, MyPager); } }
protected void Page_Load(object sender, EventArgs e) { if (!this.Page.IsPostBack) { base.CheckAdminPower("StatisticsSale", PowerCheckType.Single); foreach (ProductClassInfo info in ProductClassBLL.ReadProductClassNamedList()) { this.ClassID.Items.Add(new ListItem(info.ClassName, "|" + info.ID + "|")); } this.ClassID.Items.Insert(0, new ListItem("所有分类", string.Empty)); this.BrandID.DataSource = ProductBrandBLL.ReadProductBrandCacheList(); this.BrandID.DataTextField = "Name"; this.BrandID.DataValueField = "ID"; this.BrandID.DataBind(); this.BrandID.Items.Insert(0, new ListItem("所有品牌", string.Empty)); this.ClassID.Text = RequestHelper.GetQueryString <string>("ClassID"); this.BrandID.Text = RequestHelper.GetQueryString <string>("BrandID"); this.Name.Text = RequestHelper.GetQueryString <string>("Name"); ProductSearchInfo product = new ProductSearchInfo(); product.IsSale = 1; product.Name = RequestHelper.GetQueryString <string>("Name"); product.ClassID = RequestHelper.GetQueryString <string>("ClassID"); product.InBrandID = RequestHelper.GetQueryString <string>("BrandID"); this.productList = ProductBLL.SearchProductList(base.CurrentPage, base.PageSize, product, ref this.Count); this.dt = this.StatisticsSaleStop(this.productList); base.BindControl(this.MyPager); } }
private string ReadSystemClassID(string taobaoClassIDList) { string str = string.Empty; if (taobaoClassIDList != string.Empty) { foreach (string str2 in taobaoClassIDList.Split(new char[] { ',' })) { if (str2 != string.Empty) { ProductClassInfo info = ProductClassBLL.ReadProductClassCacheByTaobaoID(Convert.ToInt64(str2)); if (info.FatherID == 0) { str = str + "|" + info.ID.ToString() + "|"; } else { string str4 = str; str = str4 + "|" + info.FatherID.ToString() + "|" + info.ID.ToString() + "|"; } } } } return(str); }
protected void Page_Load(object sender, EventArgs e) { int classId = RequestHelper.GetQueryString <int>("classId"); int productId = RequestHelper.GetQueryString <int>("productId"); var cls = ProductClassBLL.Read(classId); attributeList = ProductTypeAttributeBLL.JoinAttribute(cls.ProductTypeId, productId); }
protected void Page_Load(object sender, EventArgs e) { if (!this.Page.IsPostBack) { base.CheckAdminPower("ProductBatchEdit", PowerCheckType.Single); foreach (ProductClassInfo info in ProductClassBLL.ReadProductClassNamedList()) { this.ClassID.Items.Add(new ListItem(info.ClassName, "|" + info.ID + "|")); } this.ClassID.Items.Insert(0, new ListItem("所有分类", string.Empty)); this.BrandID.DataSource = ProductBrandBLL.ReadProductBrandCacheList(); this.BrandID.DataTextField = "Name"; this.BrandID.DataValueField = "ID"; this.BrandID.DataBind(); this.BrandID.Items.Insert(0, new ListItem("所有品牌", string.Empty)); string queryString = RequestHelper.GetQueryString <string>("Action"); if (queryString != null) { if (!(queryString == "UnionEdit")) { if (queryString == "search") { ProductSearchInfo productSearch = new ProductSearchInfo(); productSearch.Name = RequestHelper.GetQueryString <string>("Name"); productSearch.ClassID = RequestHelper.GetQueryString <string>("ClassID"); productSearch.InBrandID = RequestHelper.GetQueryString <string>("BrandID"); productSearch.StartAddDate = RequestHelper.GetQueryString <DateTime>("StartAddDate"); productSearch.EndAddDate = ShopCommon.SearchEndDate(RequestHelper.GetQueryString <DateTime>("EndAddDate")); this.ClassID.Text = RequestHelper.GetQueryString <string>("ClassID"); this.BrandID.Text = RequestHelper.GetQueryString <string>("BrandID"); this.Name.Text = RequestHelper.GetQueryString <string>("Name"); this.StartAddDate.Text = RequestHelper.GetQueryString <string>("StartAddDate"); this.EndAddDate.Text = RequestHelper.GetQueryString <string>("EndAddDate"); base.BindControl(ProductBLL.SearchProductList(productSearch), this.RecordList); } } else { this.UnionEdit(); } } this.userGradeList = UserGradeBLL.ReadUserGradeCacheList(); foreach (UserGradeInfo info3 in this.userGradeList) { if (this.userGradeIDList == string.Empty) { this.userGradeIDList = info3.ID.ToString(); this.userGradeNameList = info3.Name; } else { this.userGradeIDList = this.userGradeIDList + "," + info3.ID.ToString(); this.userGradeNameList = this.userGradeNameList + "," + info3.Name; } } } }
protected override void OnInitComplete(EventArgs e) { base.OnInitComplete(e); if (!Page.IsPostBack) { BindFiles(); ProductClass.DataSource = ProductClassBLL.ReadUnlimitClassList(); ProductClass.DataBind(); } }
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 override void PageLoad() { ProductClassList = ProductClassBLL.ReadList(); TopBanner = AdImageBLL.ReadList((int)AdImageType.TopBanner).FirstOrDefault() ?? new AdImageInfo(); hotKeyword = ShopConfig.ReadConfigInfo().HotKeyword; //productClassList = ProductClassBLL.ReadRootList(); helpClassList = ArticleClassBLL.ReadChilds(ArticleClass.Help); bottomList = ArticleBLL.ReadBottomList(); topNavMenuList = NavMenuBLL.ReadList(true); }
protected void Page_Load(object sender, EventArgs e) { int classId = RequestHelper.GetQueryString <int>("classId"); int productId = RequestHelper.GetQueryString <int>("productId"); var cls = ProductClassBLL.Read(classId); standardList = ProductTypeStandardBLL.ReadList(cls.ProductTypeId); if (productId > 0) { standardRecordList = ProductTypeStandardRecordBLL.ReadList(productId); } }
/// <summary> /// 搜索1级分类列表 /// </summary> protected void GetTopClass() { string classname = RequestHelper.GetQueryString <string>("classname"); List <ProductClassInfo> childList = ProductClassBLL.ReadRootList(); if (!string.IsNullOrEmpty(classname)) { childList = childList.Where(k => k.Name.Contains(classname)).ToList(); } Response.Clear(); ResponseHelper.Write(Newtonsoft.Json.JsonConvert.SerializeObject(new { count = childList.Count, dataList = childList })); Response.End(); }
protected void Page_Load(object sender, EventArgs e) { ClearCache(); int attributeClassID = RequestHelper.GetQueryString <int>("AttributeClassID"); productID = RequestHelper.GetQueryString <int>("ProductID"); if (productID > 0) { product = ProductBLL.Read(productID); } int proTypeID = ProductClassBLL.GetProductClassType(attributeClassID); standardList = ProductTypeStandardBLL.ReadList(proTypeID); }
/// <summary> /// 页面加载方法 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { CheckAdminPower("ReadProduct", PowerCheckType.Single); RegionID.DataSource = RegionBLL.ReadRegionUnlimitClass(); RegionID.ClassID = "|1|27|607|"; foreach (ProductClassInfo productClass in ProductClassBLL.ReadNamedList()) { ClassID.Items.Add(new ListItem(productClass.Name, "|" + productClass.Id + "|")); } ClassID.Items.Insert(0, new ListItem("所有分类", string.Empty)); BrandID.DataSource = ProductBrandBLL.ReadList(); BrandID.DataTextField = "Name"; BrandID.DataValueField = "ID"; BrandID.DataBind(); BrandID.Items.Insert(0, new ListItem("所有品牌", string.Empty)); ClassID.Text = RequestHelper.GetQueryString <string>("ClassID"); BrandID.Text = RequestHelper.GetQueryString <string>("BrandID"); Key.Text = RequestHelper.GetQueryString <string>("Key"); StartAddDate.Text = RequestHelper.GetQueryString <string>("StartAddDate"); EndAddDate.Text = RequestHelper.GetQueryString <string>("EndAddDate"); IsSpecial.Text = RequestHelper.GetQueryString <string>("IsSpecial"); IsNew.Text = RequestHelper.GetQueryString <string>("IsNew"); IsHot.Text = RequestHelper.GetQueryString <string>("IsHot"); IsTop.Text = RequestHelper.GetQueryString <string>("IsTop"); List <ProductInfo> productList = new List <ProductInfo>(); ProductSearchInfo productSearch = new ProductSearchInfo(); productSearch.Key = RequestHelper.GetQueryString <string>("Key"); productSearch.ClassId = RequestHelper.GetQueryString <string>("ClassID"); productSearch.BrandId = RequestHelper.GetQueryString <int>("BrandID"); productSearch.IsSpecial = RequestHelper.GetQueryString <int>("IsSpecial"); productSearch.IsNew = RequestHelper.GetQueryString <int>("IsNew"); productSearch.IsHot = RequestHelper.GetQueryString <int>("IsHot"); productSearch.IsSale = (int)BoolType.True; productSearch.IsTop = RequestHelper.GetQueryString <int>("IsTop"); productSearch.StartAddDate = RequestHelper.GetQueryString <DateTime>("StartAddDate"); productSearch.EndAddDate = ShopCommon.SearchEndDate(RequestHelper.GetQueryString <DateTime>("EndAddDate")); productSearch.IsDelete = 0;//没有逻辑删除的商品 PageSize = Session["AdminPageSize"] == null ? 20 : Convert.ToInt32(Session["AdminPageSize"]); AdminPageSize.Text = Session["AdminPageSize"] == null ? "20" : Session["AdminPageSize"].ToString(); productList = ProductBLL.SearchList(CurrentPage, PageSize, productSearch, ref Count); BindControl(productList, RecordList, MyPager); } }
protected void Page_Load(object sender, EventArgs e) { if (companyID < 0) { companyID = CompanyBLL.SystemCompanyId; } if (!this.Page.IsPostBack) { this.BindClassBrandAttributeClassStandardType(); this.ProductClass.DataSource = ProductClassBLL.ReadProductClassUnlimitClass(); this.productID = RequestHelper.GetQueryString <int>("ID"); if (this.productID != -2147483648) { base.CheckAdminPower("ReadProduct", PowerCheckType.Single); ProductInfo product = ProductBLL.ReadProduct(this.productID); companyID = product.CompanyID; companyName = CompanyBLL.ReadCompany(product.CompanyID).CompanyName; this.Name.Text = product.Name; this.Name.Attributes.Add("style", "color:" + product.Color); this.color = product.Color; //this.FontStyle.Text = product.FontStyle; this.ProductNumber.Text = product.ProductNumber; this.ProductClass.ClassIDList = product.ClassID; this.Keywords.Text = product.Keywords; brandIDStr = product.BrandID; this.MarketPrice.Text = product.MarketPrice.ToString(); this.Photo.Text = product.Photo; this.Summary.Text = product.Summary; this.Introduction.Value = product.Introduction; this.IsSpecial.Text = product.IsSpecial.ToString(); this.IsNew.Text = product.IsNew.ToString(); this.IsHot.Text = product.IsHot.ToString(); this.IsSale.Text = product.IsSale.ToString(); this.IsTop.Text = product.IsTop.ToString(); this.Remark.Text = product.Remark; this.AllowComment.Text = product.AllowComment.ToString(); this.AttributeClassID.Text = product.AttributeClassID.ToString(); this.StandardType.Text = product.StandardType.ToString(); this.sendCount = product.SendCount; this.Sort.Text = product.Sort.ToString(); this.Editor.Text = product.Editor; this.BindRelation(product); this.BindTestSetting(product); this.productPhotoList = ProductPhotoBLL.ReadProductPhotoByProduct(this.productID); } this.BindSystemTestSetting(); this.userGradeList = UserGradeBLL.JoinUserGrade(this.productID); } }
/// <summary> /// 提交按钮点击方法 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void SubmitButton_Click(object sender, EventArgs e) { ProductClassInfo productClass = new ProductClassInfo(); productClass.Id = RequestHelper.GetQueryString <int>("ID"); if (FatherID.Text.Trim() == RequestHelper.GetQueryString <string>("ID")) { ScriptHelper.Alert("不能将上级分类设置成自己", RequestHelper.RawUrl); Response.End(); } if (string.IsNullOrEmpty(ProductType.Text)) { ScriptHelper.Alert("必须选择产品类型", RequestHelper.RawUrl); Response.End(); } productClass.ParentId = Convert.ToInt32(FatherID.Text); productClass.OrderId = Convert.ToInt32(OrderID.Text); productClass.Name = ClassName.Text; productClass.Keywords = Keywords.Text; productClass.Remark = Description.Value; productClass.Photo = Photo.Text; productClass.ProductTypeId = Convert.ToInt32(ProductType.Text); productClass.Tm = DateTime.Now; productClass.EnClassName = EnClassName.Text.Trim(); productClass.PageTitle = PageTitle.Text.Trim(); productClass.PageKeyWord = PageKeyWord.Text.Trim(); productClass.PageSummary = PageSummary.Text.Trim(); string alertMessage = ShopLanguage.ReadLanguage("AddOK"); if (productClass.Id == int.MinValue) { CheckAdminPower("AddProductClass", PowerCheckType.Single); int id = ProductClassBLL.Add(productClass); AdminLogBLL.Add(ShopLanguage.ReadLanguage("AddRecord"), ShopLanguage.ReadLanguage("ProductClass"), id); } else { CheckAdminPower("UpdateProductClass", PowerCheckType.Single); ProductClassBLL.Update(productClass); AdminLogBLL.Add(ShopLanguage.ReadLanguage("UpdateRecord"), ShopLanguage.ReadLanguage("ProductClass"), productClass.Id); alertMessage = ShopLanguage.ReadLanguage("UpdateOK"); } ScriptHelper.Alert(alertMessage, RequestHelper.RawUrl); }
protected void Page_Load(object sender, EventArgs e) { if (!this.Page.IsPostBack) { foreach (ProductClassInfo info in ProductClassBLL.ReadProductClassNamedList()) { this.RelationClassID.Items.Add(new ListItem(info.ClassName, "|" + info.ID + "|")); } this.RelationClassID.Items.Insert(0, new ListItem("所有分类", string.Empty)); 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)); } }
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(); }
/// <summary> /// 页面加载方法 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { FatherID.DataSource = ProductClassBLL.ReadNamedList(); FatherID.DataTextField = "Name"; FatherID.DataValueField = "ID"; FatherID.DataBind(); FatherID.Items.Insert(0, new ListItem("作为最大类", "0")); //foreach (ProductClassInfo productClass in ProductClassBLL.ReadNamedList()) //{ // FatherID.Items.Add(new ListItem(productClass.Name, "|" + productClass.Id + "|")); //} //FatherID.Items.Insert(0, new ListItem("作为最大类", "0")); ProductType.DataSource = ProductTypeBLL.ReadList(); ProductType.DataTextField = "Name"; ProductType.DataValueField = "ID"; ProductType.DataBind(); ProductType.Items.Insert(0, new ListItem("请选择类型", "0")); int productClassID = RequestHelper.GetQueryString <int>("ID"); int fatherID = RequestHelper.GetQueryString <int>("FatherID"); if (productClassID != int.MinValue) { CheckAdminPower("ReadProductClass", PowerCheckType.Single); ProductClassInfo productClass = ProductClassBLL.Read(productClassID); FatherID.Text = productClass.ParentId.ToString(); OrderID.Text = productClass.OrderId.ToString(); ClassName.Text = productClass.Name; Keywords.Text = productClass.Keywords; Description.Value = productClass.Remark; Photo.Text = productClass.Photo; ProductType.Text = productClass.ProductTypeId.ToString(); EnClassName.Text = productClass.EnClassName; PageTitle.Text = productClass.PageTitle; PageKeyWord.Text = productClass.PageKeyWord; PageSummary.Text = productClass.PageSummary; } else { FatherID.Text = fatherID.ToString(); } } }
protected void Page_Load(object sender, EventArgs e) { if (!this.Page.IsPostBack) { base.CheckAdminPower("ReadProduct", PowerCheckType.Single); if (isSale < 0) { isSale = 1; //默认为上架课程 } foreach (ProductClassInfo info in ProductClassBLL.ReadProductClassNamedList()) { this.ClassID.Items.Add(new ListItem(info.ClassName, "|" + info.ID + "|")); } this.ClassID.Items.Insert(0, new ListItem("所有分类", string.Empty)); //this.BrandID.DataSource = ProductBrandBLL.ReadProductBrandCacheList(); //this.BrandID.DataTextField = "Name"; //this.BrandID.DataValueField = "ID"; //this.BrandID.DataBind(); //this.BrandID.Items.Insert(0, new ListItem("所有品牌", string.Empty)); //this.BrandID.Text = RequestHelper.GetQueryString<string>("BrandID"); this.ClassID.Text = RequestHelper.GetQueryString <string>("ClassID"); this.Key.Text = RequestHelper.GetQueryString <string>("Key"); this.IsSpecial.Text = RequestHelper.GetQueryString <string>("IsSpecial"); this.IsNew.Text = RequestHelper.GetQueryString <string>("IsNew"); this.IsHot.Text = RequestHelper.GetQueryString <string>("IsHot"); this.IsTop.Text = RequestHelper.GetQueryString <string>("IsTop"); ProductSearchInfo product = new ProductSearchInfo(); product.Key = RequestHelper.GetQueryString <string>("Key"); product.ClassID = RequestHelper.GetQueryString <string>("ClassID"); product.InBrandID = RequestHelper.GetQueryString <string>("BrandID"); product.IsSpecial = RequestHelper.GetQueryString <int>("IsSpecial"); product.IsNew = RequestHelper.GetQueryString <int>("IsNew"); product.IsHot = RequestHelper.GetQueryString <int>("IsHot"); product.IsSale = isSale; product.IsTop = RequestHelper.GetQueryString <int>("IsTop"); product.StartAddDate = RequestHelper.GetQueryString <DateTime>("StartAddDate"); product.EndAddDate = ShopCommon.SearchEndDate(RequestHelper.GetQueryString <DateTime>("EndAddDate")); product.IsSpecialTestSetting = RequestHelper.GetQueryString <int>("IsSpecialTestSetting"); //product.IsComplete = RequestHelper.GetQueryString<int>("IsComplete"); List <ProductInfo> dataSource = ProductBLL.SearchProductList(base.CurrentPage, base.PageSize, product, ref this.Count); //把列表中的产品的更新时间属性都读取出来 attributeRecordList = AttributeRecordBLL.ReadList("3", ProductBLL.ReadProductIdStr(dataSource)); base.BindControl(dataSource, this.RecordList, this.MyPager); } }
protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { UserGrade.DataSource = UserGradeBLL.ReadList(); UserGrade.DataTextField = "Name"; UserGrade.DataValueField = "Id"; UserGrade.DataBind(); RegionID.DataSource = RegionBLL.ReadRegionUnlimitClass(); ProductClass.DataSource = ProductClassBLL.ReadUnlimitClassList(); favorableActivityID = RequestHelper.GetQueryString <int>("ID"); if (favorableActivityID != int.MinValue) { CheckAdminPower("ReadFavorableActivity", PowerCheckType.Single); favorableActivity = FavorableActivityBLL.Read(favorableActivityID); Photo.Text = favorableActivity.Photo; Name.Text = favorableActivity.Name; Content.Text = favorableActivity.Content; StartDate.Text = favorableActivity.StartDate.ToString("yyyy-MM-dd"); EndDate.Text = favorableActivity.EndDate.ToString("yyyy-MM-dd"); ControlHelper.SetCheckBoxListValue(UserGrade, favorableActivity.UserGrade); OrderProductMoney.Text = favorableActivity.OrderProductMoney.ToString(); RegionID.ClassIDList = favorableActivity.RegionId ?? ""; ReduceMoney.Text = favorableActivity.ReduceMoney.ToString(); ReduceDiscount.Text = favorableActivity.ReduceDiscount.ToString(); favorableType = favorableActivity.Type; ProductClass.ClassIDList = favorableActivity.ClassIds ?? ""; if (!string.IsNullOrEmpty(favorableActivity.GiftId)) { var giftSearch = new FavorableActivityGiftSearchInfo(); giftSearch.InGiftIds = Array.ConvertAll <string, int>(favorableActivity.GiftId.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries), k => Convert.ToInt32(k)); giftList = FavorableActivityGiftBLL.SearchList(giftSearch); } } else {//新增:默认所有会员等级全部选中 foreach (ListItem item in UserGrade.Items) { item.Selected = true; } } } }
protected void Page_Load(object sender, EventArgs e) { ClearCache(); int attributeClassID = RequestHelper.GetQueryString <int>("AttributeClassID"); int proTypeID = ProductClassBLL.GetProductClassType(attributeClassID); ProductTypeInfo aci = ProductTypeBLL.Read(proTypeID); if (aci.Id > 0) { string[] strArr = aci.BrandIds.Split(new char[] { ';' }, StringSplitOptions.RemoveEmptyEntries); int[] intArr = Array.ConvertAll <string, int>(strArr, s => int.Parse(s)); productBrandList = ProductBrandBLL.ReadList(intArr); } }
protected void Page_Load(object sender, EventArgs e) { ClearCache(); int attributeClassID = RequestHelper.GetQueryString <int>("AttributeClassID"); int productID = RequestHelper.GetQueryString <int>("ProductID"); string Action = RequestHelper.GetQueryString <string>("Action"); if (!string.IsNullOrEmpty(Action)) { int proTypeID = ProductClassBLL.GetProductClassType(attributeClassID);//通过产品分类ID获取所对应的产品类型ID; attributeList = ProductTypeAttributeBLL.JoinAttribute(proTypeID, productID); } else { attributeList = ProductTypeAttributeBLL.JoinAttribute(attributeClassID, productID); } }
protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { foreach (ProductClassInfo productClass in ProductClassBLL.ReadNamedList()) { RelationClassID.Items.Add(new ListItem(productClass.Name, "|" + productClass.Id + "|")); } RelationClassID.Items.Insert(0, new ListItem("所有分类", string.Empty)); List <ProductBrandInfo> productBrandList = ProductBrandBLL.ReadList(); RelationBrandID.DataSource = productBrandList; RelationBrandID.DataTextField = "Name"; RelationBrandID.DataValueField = "ID"; RelationBrandID.DataBind(); RelationBrandID.Items.Insert(0, new ListItem("选择品牌", string.Empty)); } }
protected override void PageLoad() { ProductClassList = ProductClassBLL.ReadList(); TopBanner = AdImageBLL.ReadList((int)AdImageType.TopBanner).FirstOrDefault() ?? new AdImageInfo(); hotKeyword = ShopConfig.ReadConfigInfo().HotKeyword; productClassList = ProductClassBLL.ReadRootList(); helpClassList = ArticleClassBLL.ReadChilds(ArticleClass.Help); bottomList = ArticleBLL.ReadBottomList(); strHistorySearch = Server.UrlDecode(CookiesHelper.ReadCookieValue("HistorySearch")); textLinkList = LinkBLL.ReadLinkCacheListByClass((int)LinkType.Text); topNavMenuList = NavMenuBLL.ReadList(true); ReadCart(); }
/// <summary> /// 属性处理 /// </summary> /// <param name="productID"></param> protected void HanderAttribute(ProductInfo product) { if (product.Id > 0) { ProductTypeAttributeRecordBLL.Delete(product.Id); } int lastClassID = ProductClassBLL.GetLastClassID(product.ClassId); int productTypeID = ProductClassBLL.GetProductClassType(lastClassID); List <ProductTypeAttributeInfo> attributeList = ProductTypeAttributeBLL.ReadList(productTypeID); foreach (ProductTypeAttributeInfo attribute in attributeList) { ProductTypeAttributeRecordInfo attributeRecord = new ProductTypeAttributeRecordInfo(); attributeRecord.AttributeId = attribute.Id; attributeRecord.ProductId = product.Id; attributeRecord.Value = RequestHelper.GetForm <string>(attribute.Id.ToString() + "Value").Replace(',', ';'); ProductTypeAttributeRecordBLL.Add(attributeRecord); } }
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(); }