private void btnAddSearch_Click(object sender, EventArgs e) { ProductQuery query = new ProductQuery(); query.Keywords = txtSearchText.Text; query.CategoryId = categoryId; query.SaleStatus = ProductSaleStatus.OnSale; IList <int> productIds = SubSiteProducthelper.GetProductIds(query); if (SubSiteProducthelper.AddSubjectProducts(subjectType, productIds)) { BindSubjectProducts(); } }
private void btnAddSearch_Click(object sender, EventArgs e) { ProductQuery query = new ProductQuery(); query.Keywords = this.keywords; query.CategoryId = this.categoryId; query.SaleStatus = ProductSaleStatus.OnSale; foreach (int num in SubSiteProducthelper.GetProductIds(query)) { if (this.productId != num) { SubSiteProducthelper.AddRelatedProduct(this.productId, num); } } base.Response.Redirect(HttpContext.Current.Request.Url.ToString(), true); }
private void btnAddSearch_Click(object sender, System.EventArgs e) { System.Collections.Generic.IList <int> productIds = SubSiteProducthelper.GetProductIds(new ProductQuery { Keywords = this.keywords, CategoryId = this.categoryId, SaleStatus = ProductSaleStatus.OnSale }); foreach (int current in productIds) { if (this.productId != current) { SubSiteProducthelper.AddRelatedProduct(this.productId, current); } } base.Response.Redirect(System.Web.HttpContext.Current.Request.Url.ToString(), true); }
private void btnAddSearch_Click(object sender, EventArgs e) { ProductQuery query = new ProductQuery(); query.Keywords = txtSearchText.Text; query.CategoryId = dropCategories.SelectedValue; query.SaleStatus = ProductSaleStatus.OnSale; IList <int> productIds = SubSiteProducthelper.GetProductIds(query); foreach (int num in productIds) { if (!ProductIds.Contains(num)) { ProductIds.Add(num); SubsitePromoteHelper.InsertPromotionProduct(activeId, num); } } ProductIds = productIds; BindPromoteProducts(); }