Dynamicweb 8 Documentation
PriceCalculated Class
Members  Example 

Represents information about calculated price.
Object Model
PriceCalculated ClassCurrency ClassPriceRaw ClassProduct Class
Syntax
'Declaration
 
<SerializableAttribute()> 
Public Class PriceCalculated 
   Inherits PriceInfo 
   Implements IPriceInfo 
[SerializableAttribute()] 
public class PriceCalculated : PriceInfo, IPriceInfo  
Example
class MyPage : System.Web.UI.Page
{
    private Dynamicweb.eCommerce.Prices.PriceInfo GetPriceInfo(double priceWithVAT, double priceWithoutVAT, double VATPercent)
    {
        Dynamicweb.eCommerce.Prices.PriceInfo info = new Dynamicweb.eCommerce.Prices.PriceInfo();
        info.Currency = Dynamicweb.eCommerce.Common.Context.Currency;

        Dynamicweb.eCommerce.Prices.PriceRaw rp = new Dynamicweb.eCommerce.Prices.PriceRaw();
        rp.Price = priceWithoutVAT;
        rp.Currency = Dynamicweb.eCommerce.Common.Context.Currency;

        Dynamicweb.eCommerce.Prices.PriceCalculated cp = new Dynamicweb.eCommerce.Prices.PriceCalculated();
        cp.PriceRaw = rp;

        cp.PriceWithoutVAT = priceWithoutVAT;
        cp.PriceWithVAT = priceWithVAT;
        cp.VATPercent = VATPercent;
        cp.VAT = priceWithVAT - priceWithoutVAT;

        return info.Add(cp);
    }
}
Inheritance Hierarchy

System.Object
   Dynamicweb.eCommerce.Prices.PriceInfo
      Dynamicweb.eCommerce.Prices.PriceCalculated

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

PriceCalculated Members
Dynamicweb.eCommerce.Prices Namespace

Send Feedback