Scale.UnitPrice Property
2/27/2008
Holds the unit price of the article to be weighed.
Namespace: Microsoft.PointOfService
Assembly: Microsoft.PointOfService (in microsoft.pointofservice.dll)
Syntax
'Declaration
Public MustOverride Property UnitPrice As Decimal
public abstract decimal UnitPrice { get; set; }
public:
virtual property Decimal UnitPrice {
Decimal get () abstract;
void set (Decimal value) abstract;
}
/** @property */
public abstract Decimal get_UnitPrice ()
/** @property */
public abstract void set_UnitPrice (Decimal value)
public abstract function get UnitPrice () : decimal
public abstract function set UnitPrice (value : decimal)
Remarks
For price-calculating scales, set UnitPrice before calling the ReadWeight method. The scale will calculate SalesPrice by multiplying the UnitPrice with the item's weight.
If CapPriceCalculating is false, the scale is not a price-calculating scale. In this case, setting a unit price is not supported and UnitPrice is always zero.
UnitPrice is initialized to zero when the device is first enabled following the Open method.
Accessing UnitPrice may cause a PosControlException to be thrown with the following ErrorCode:
Value |
Meaning |
Illegal |
CapPriceCalculating is false or an invalid price was specified. |
Thread Safety
Any public static (Shared in Visual Basic) members of this type are thread-safe. Any instance members are not guaranteed to be thread-safe.
See Also
Reference
Scale Class
Scale Members
Microsoft.PointOfService Namespace
Scale.ReadWeight Method
WeightUnit
Scale.CapPriceCalculating Property
Scale.SalesPrice Property