/// <summary> /// The on subcategories_ item data bound. /// </summary> /// <param name="sender"> /// The sender. /// </param> /// <param name="e"> /// The e. /// </param> protected void OnSubcategories_ItemDataBound(object sender, RepeaterItemEventArgs e) { if (e.Item.ItemType == ListItemType.AlternatingItem || e.Item.ItemType == ListItemType.Item) { if (e.Item.DataItem != null) { //begin - shan - mar 16, 2012 - set root category id UICategoryProduct prd = e.Item.DataItem as UICategoryProduct; (e.Item.FindControl("hdnRootCategoryID") as HiddenField).Value = null != prd && null != prd.RootCategory ? prd.RootCategory.ID.ToString() : string.Empty; //end var rp = e.Item.FindControl("Products") as Repeater; rp.DataSource = from p in (e.Item.DataItem as UICategoryProduct).Product.SKUs from a in AllSKUS.Keys where a == p.SKU select AllSKUS[a]; rp.DataBind(); } } }
/// <summary> /// The get product id. /// </summary> /// <param name="uiCategoryProduct"> /// The ui category product. /// </param> /// <returns> /// The get product id. /// </returns> protected int GetProductID(UICategoryProduct uiCategoryProduct) { return(uiCategoryProduct.Product.ID); }
/// <summary> /// The get category id. /// </summary> /// <param name="uiCategoryProduct"> /// The ui category product. /// </param> /// <returns> /// The get category id. /// </returns> protected int GetCategoryID(UICategoryProduct uiCategoryProduct) { return(uiCategoryProduct.Category.ID); }
/// <summary> /// The get bread crumb text. /// </summary> /// <param name="categoryProudct"> /// The category proudct. /// </param> /// <returns> /// The get bread crumb text. /// </returns> protected string getBreadCrumbText(UICategoryProduct categoryProudct) { //return getCategoryText(categoryProudct.Category) + categoryProudct.Category.DisplayName + " > " + // categoryProudct.Product.DisplayName; return(CatalogHelper.getBreadCrumbText(categoryProudct.Category, categoryProudct.RootCategory, categoryProudct.Product)); }