Dynamicweb.eCommerce.Prices Namespace : PriceCalculated Class |
'Declaration
<SerializableAttribute()> Public Class PriceCalculated Inherits PriceInfo Implements IPriceInfo
[SerializableAttribute()] public class PriceCalculated : PriceInfo, IPriceInfo
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); } }
System.Object
Dynamicweb.eCommerce.Prices.PriceInfo
Dynamicweb.eCommerce.Prices.PriceCalculated
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