Dynamicweb.eCommerce.Prices Namespace : MultiplePriceCollection Class |
'Declaration
<DefaultMemberAttribute("Item")> <SerializableAttribute()> Public Class MultiplePriceCollection Inherits System.Collections.ObjectModel.Collection(Of MultiplePrice)
[DefaultMemberAttribute("Item")] [SerializableAttribute()] public class MultiplePriceCollection : System.Collections.ObjectModel.Collection<MultiplePrice>
class MyPage : System.Web.UI.Page { private Dynamicweb.eCommerce.Products.Product product; private SortedList _objectList; private void Page_Load(System.Object sender, System.EventArgs e) { product = (Dynamicweb.eCommerce.Products.Product)Session["Ecom.Backend.Product"]; } public SortedList objectList { get { return _objectList; } set { _objectList = value; } } public void addObjeckList(int level) { if (!string.IsNullOrEmpty(Base.ChkString(product.PriceMatrixQuantitySpecification))) { string multiSpecs = product.PriceMatrixQuantitySpecification.Replace(":", ";"); Dynamicweb.eCommerce.Prices.MultiplePriceCollection multipleprices = new Dynamicweb.eCommerce.Prices.MultiplePriceCollection(); string[] QuantitySpecArr = multiSpecs.Split(';'); System.Collections.DictionaryEntry Item = default(System.Collections.DictionaryEntry); SortedList sortedList = new SortedList(); foreach (string quantity in QuantitySpecArr) { if (Base.ChkDouble(quantity) > 0) { sortedList.Add(quantity, quantity); } } foreach (DictionaryEntry Item_loopVariable in sortedList) { Item = Item_loopVariable; Dynamicweb.eCommerce.Prices.MultiplePrice multiplePrice = new Dynamicweb.eCommerce.Prices.MultiplePrice(); multiplePrice.Quantity = Base.ChkDouble(Item.Key); multipleprices.Add(multiplePrice); } if (multipleprices.Count > 0) { objectList.Add(level, multipleprices); } } } }
System.Object
System.Collections.ObjectModel.Collection<T>
Dynamicweb.eCommerce.Prices.MultiplePriceCollection
Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2