Partilhar via


AddCatalogRelationship Method (String, String, String, String, String, Int32, String, Decimal, Int32)

Add a CatalogRelationship to this CatalogRelationshipsDataSet and return a CatalogRelationshipsDataSet..::.CatalogRelationship.

Namespace:  Microsoft.CommerceServer.Catalog
Assembly:  Microsoft.CommerceServer.Catalog (in Microsoft.CommerceServer.Catalog.dll)

Syntax

'Declaration
Public Function AddCatalogRelationship ( _
    TargetCatalogName As String, _
    TargetProductId As String, _
    TargetCategoryName As String, _
    RelationshipName As String, _
    RelationshipDescription As String, _
    Rank As Integer, _
    DisplayName As String, _
    ListPrice As Decimal, _
    CatalogClassTypes As Integer _
) As CatalogRelationshipsDataSet..::.CatalogRelationship
'Usage
Dim instance As CatalogRelationshipsDataSet..::.CatalogRelationshipsDataTable
Dim TargetCatalogName As String
Dim TargetProductId As String
Dim TargetCategoryName As String
Dim RelationshipName As String
Dim RelationshipDescription As String
Dim Rank As Integer
Dim DisplayName As String
Dim ListPrice As Decimal
Dim CatalogClassTypes As Integer
Dim returnValue As CatalogRelationshipsDataSet..::.CatalogRelationship

returnValue = instance.AddCatalogRelationship(TargetCatalogName, _
    TargetProductId, TargetCategoryName, _
    RelationshipName, RelationshipDescription, _
    Rank, DisplayName, ListPrice, CatalogClassTypes)
public CatalogRelationshipsDataSet..::.CatalogRelationship AddCatalogRelationship(
    string TargetCatalogName,
    string TargetProductId,
    string TargetCategoryName,
    string RelationshipName,
    string RelationshipDescription,
    int Rank,
    string DisplayName,
    decimal ListPrice,
    int CatalogClassTypes
)
public:
CatalogRelationshipsDataSet..::.CatalogRelationship^ AddCatalogRelationship(
    String^ TargetCatalogName, 
    String^ TargetProductId, 
    String^ TargetCategoryName, 
    String^ RelationshipName, 
    String^ RelationshipDescription, 
    int Rank, 
    String^ DisplayName, 
    Decimal ListPrice, 
    int CatalogClassTypes
)
public function AddCatalogRelationship(
    TargetCatalogName : String, 
    TargetProductId : String, 
    TargetCategoryName : String, 
    RelationshipName : String, 
    RelationshipDescription : String, 
    Rank : int, 
    DisplayName : String, 
    ListPrice : decimal, 
    CatalogClassTypes : int
) : CatalogRelationshipsDataSet..::.CatalogRelationship

Parameters

  • Rank
    Type: System..::.Int32
    The order of sibling entities in the product catalog system with respect to their container

Return Value

Type: Microsoft.CommerceServer.Catalog..::.CatalogRelationshipsDataSet..::.CatalogRelationship
A CatalogRelationshipsDataSet..::.CatalogRelationship containing the added item.

Remarks

Prioritizing, ordering, or sequencing may involve using the Rank Property. Positive and negative rank values are allowed in the catalog system.

The CatalogRelationshipsDataSet object must be saved before these changes will be persisted to the database.

Permissions

See Also

Reference

CatalogRelationshipsDataSet..::.CatalogRelationshipsDataTable Class

CatalogRelationshipsDataSet..::.CatalogRelationshipsDataTable Members

AddCatalogRelationship Overload

Microsoft.CommerceServer.Catalog Namespace