AddPricingRule Method (String, String, String, String, Int16, Decimal, String)
Add a PricingRule to this CatalogPricingRulesDataSet..::.PricingRulesDataTable and return a CatalogPricingRulesDataSet..::.PricingRule.
Namespace: Microsoft.CommerceServer.Catalog
Assembly: Microsoft.CommerceServer.Catalog (in Microsoft.CommerceServer.Catalog.dll)
Syntax
'Declaration
Public Function AddPricingRule ( _
CatalogName As String, _
ProductId As String, _
VariantId As String, _
CategoryName As String, _
CatalogPricingRuleType As Short, _
PriceChange As Decimal, _
DisplayName As String _
) As CatalogPricingRulesDataSet..::.PricingRule
'Usage
Dim instance As CatalogPricingRulesDataSet..::.PricingRulesDataTable
Dim CatalogName As String
Dim ProductId As String
Dim VariantId As String
Dim CategoryName As String
Dim CatalogPricingRuleType As Short
Dim PriceChange As Decimal
Dim DisplayName As String
Dim returnValue As CatalogPricingRulesDataSet..::.PricingRule
returnValue = instance.AddPricingRule(CatalogName, _
ProductId, VariantId, CategoryName, _
CatalogPricingRuleType, PriceChange, _
DisplayName)
public CatalogPricingRulesDataSet..::.PricingRule AddPricingRule(
string CatalogName,
string ProductId,
string VariantId,
string CategoryName,
short CatalogPricingRuleType,
decimal PriceChange,
string DisplayName
)
public:
CatalogPricingRulesDataSet..::.PricingRule^ AddPricingRule(
String^ CatalogName,
String^ ProductId,
String^ VariantId,
String^ CategoryName,
short CatalogPricingRuleType,
Decimal PriceChange,
String^ DisplayName
)
public function AddPricingRule(
CatalogName : String,
ProductId : String,
VariantId : String,
CategoryName : String,
CatalogPricingRuleType : short,
PriceChange : decimal,
DisplayName : String
) : CatalogPricingRulesDataSet..::.PricingRule
Parameters
- CatalogName
Type: System..::.String
The Catalog name to use for this Pricing rule.
- ProductId
Type: System..::.String
The Product identifier to use for this Pricing rule.
- VariantId
Type: System..::.String
The Variant identifier to use for this Pricing rule.
- CategoryName
Type: System..::.String
The Category name to use for this Pricing rule.
- CatalogPricingRuleType
Type: System..::.Int16
The CatalogPricingRuleType for this Pricing rule.
- PriceChange
Type: System..::.Decimal
The Price change for this Pricing rule.
- DisplayName
Type: System..::.String
The Display name for this Pricing rule.
Return Value
Type: Microsoft.CommerceServer.Catalog..::.CatalogPricingRulesDataSet..::.PricingRule
A CatalogPricingRulesDataSet..::.PricingRule containing the added Pricing rule.
Remarks
The CatalogPricingRulesDataSet..::.PricingRulesDataTable object must be saved before these changes will be persisted to the database.
Permissions
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.
See Also
Reference
CatalogPricingRulesDataSet..::.PricingRulesDataTable Class
CatalogPricingRulesDataSet..::.PricingRulesDataTable Members