Dynamicweb 8 Documentation
MultiplePriceCollection Class
Members  Example 

Represents a collection of MultiplePrice objects.
Object Model
MultiplePriceCollection ClassMultiplePrice Class
Syntax
Example
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);
            }
        }
    }
}
Inheritance Hierarchy

System.Object
   System.Collections.ObjectModel.Collection<T>
      Dynamicweb.eCommerce.Prices.MultiplePriceCollection

Requirements

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

See Also

Reference

MultiplePriceCollection Members
Dynamicweb.eCommerce.Prices Namespace

Send Feedback