protected void rptProduct_ItemDataBound(object sender, RepeaterItemEventArgs e) { if ((e.Item.ItemType == ListItemType.AlternatingItem) || (e.Item.ItemType == ListItemType.Item)) { DataRowView dataItem = (DataRowView)e.Item.DataItem; Label label = (Label)e.Item.Controls[0].FindControl("lbBundlingID"); FormatedMoneyLabel label2 = (FormatedMoneyLabel)e.Item.Controls[0].FindControl("lbltotalPrice"); FormatedMoneyLabel label3 = (FormatedMoneyLabel)e.Item.Controls[0].FindControl("lblbundlingPrice"); FormatedMoneyLabel label4 = (FormatedMoneyLabel)e.Item.Controls[0].FindControl("lblsaving"); HyperLink link = (HyperLink)e.Item.Controls[0].FindControl("hlBuy"); Repeater repeater = (Repeater)e.Item.Controls[0].FindControl("rpbundlingitem"); List <BundlingItemInfo> bundlingItemsByID = ProductBrowser.GetBundlingItemsByID(Convert.ToInt32(label.Text)); decimal num = 0M; foreach (BundlingItemInfo info in bundlingItemsByID) { num += info.ProductNum * info.ProductPrice; } label2.Money = num; label4.Money = Convert.ToDecimal(label2.Money) - Convert.ToDecimal(label3.Money); if (!HiContext.Current.SiteSettings.IsDistributorSettings && !HiContext.Current.SiteSettings.IsOpenSiteSale) { link.Visible = false; } repeater.DataSource = bundlingItemsByID; repeater.DataBind(); } }
public static ShoppingCartInfo GetShoppingCart(int Boundlingid, int buyAmount) { ShoppingCartInfo shoppingCartInfo = new ShoppingCartInfo(); List <BundlingItemInfo> bundlingItemsByID = ProductBrowser.GetBundlingItemsByID(Boundlingid); Member member = HiContext.Current.User as Member; foreach (BundlingItemInfo current in bundlingItemsByID) { ShoppingCartItemInfo cartItemInfo = ShoppingProvider.Instance().GetCartItemInfo(member, current.SkuId, buyAmount * current.ProductNum); if (cartItemInfo != null) { shoppingCartInfo.LineItems.Add(current.SkuId, cartItemInfo); } } return(shoppingCartInfo); }
public static ShoppingCartInfo GetShoppingCart(int Boundlingid, int buyAmount) { ShoppingCartInfo info = new ShoppingCartInfo(); List <BundlingItemInfo> bundlingItemsByID = ProductBrowser.GetBundlingItemsByID(Boundlingid); Member user = HiContext.Current.User as Member; foreach (BundlingItemInfo info2 in bundlingItemsByID) { ShoppingCartItemInfo info3 = ShoppingProvider.Instance().GetCartItemInfo(user, info2.SkuId, buyAmount * info2.ProductNum); if (info3 != null) { info.LineItems.Add(info2.SkuId, info3); } } return(info); }
public System.Collections.Generic.List <BundlingItemInfo> BindBundlingItems(int int_0) { return(ProductBrowser.GetBundlingItemsByID(int_0)); }
protected void rptProduct_ItemDataBound(object sender, System.Web.UI.WebControls.RepeaterItemEventArgs e) { if (e.Item.ItemType == System.Web.UI.WebControls.ListItemType.AlternatingItem || e.Item.ItemType == System.Web.UI.WebControls.ListItemType.Item) { DataRowView arg_37_0 = (DataRowView)e.Item.DataItem; System.Web.UI.WebControls.Label label = (System.Web.UI.WebControls.Label)e.Item.Controls[0].FindControl("lbBundlingID"); FormatedMoneyLabel formatedMoneyLabel = (FormatedMoneyLabel)e.Item.Controls[0].FindControl("lbltotalPrice"); FormatedMoneyLabel formatedMoneyLabel2 = (FormatedMoneyLabel)e.Item.Controls[0].FindControl("lblbundlingPrice"); FormatedMoneyLabel formatedMoneyLabel3 = (FormatedMoneyLabel)e.Item.Controls[0].FindControl("lblsaving"); System.Web.UI.WebControls.HyperLink hyperLink = (System.Web.UI.WebControls.HyperLink)e.Item.Controls[0].FindControl("hlBuy"); System.Web.UI.WebControls.Repeater repeater = (System.Web.UI.WebControls.Repeater)e.Item.Controls[0].FindControl("rpbundlingitem"); System.Collections.Generic.List <BundlingItemInfo> bundlingItemsByID = ProductBrowser.GetBundlingItemsByID(System.Convert.ToInt32(label.Text)); decimal num = 0m; foreach (BundlingItemInfo current in bundlingItemsByID) { num += current.ProductNum * current.ProductPrice; } formatedMoneyLabel.Money = num; formatedMoneyLabel3.Money = System.Convert.ToDecimal(formatedMoneyLabel.Money) - System.Convert.ToDecimal(formatedMoneyLabel2.Money); if (!Hidistro.Membership.Context.HiContext.Current.SiteSettings.IsDistributorSettings && !Hidistro.Membership.Context.HiContext.Current.SiteSettings.IsOpenSiteSale) { hyperLink.Visible = false; } repeater.DataSource = bundlingItemsByID; repeater.DataBind(); } }
public List <BundlingItemInfo> BindBundlingItems(int id) { return(ProductBrowser.GetBundlingItemsByID(id)); }