Jaa


CatalogDefinitionPropertiesDataSet Class

For the latest version of Commerce Server 2007 Help, see the Microsoft Web site.

Access the CatalogDefinitionProperties values in the CatalogDefinitionPropertiesDataSet.

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

Syntax

'Declaration
<SerializableAttribute> _
Public Class CatalogDefinitionPropertiesDataSet _
    Inherits DataSet
'Usage
Dim instance As CatalogDefinitionPropertiesDataSet
[SerializableAttribute]
public class CatalogDefinitionPropertiesDataSet : DataSet
[SerializableAttribute]
public ref class CatalogDefinitionPropertiesDataSet : public DataSet
public class CatalogDefinitionPropertiesDataSet extends DataSet

Remarks

Returns the DataSet containing the CatalogDefinitionProperties values. This allows you to get the CatalogDefinitionProperties values.

Examples

internal CatalogDefinition CreateCategoryDefinition(string definitionName, string description, string propertyToAddtoDefinition)
{
  CatalogDefinition definition = null;
  try
  {
    definition = catalogContext.CreateDefinition(definitionName, CatalogDefinitionType.CategoryDefinition);
    // Once the definition has been  created set the description
    definition.Description = description;
    definition.Save();
    /* Once a definition is created the properties can be added to the definition 
      When adding properties to a category definition the DefinitionPropertyType should always be
     DefinitionPropertyType.NormalProperty.
    */
    definition.AddProperty(propertyToAddtoDefinition, DefinitionPropertyType.NormalProperty);
    definition.Save();
    // Accessing the properties in a definiton
    foreach (CatalogDefinitionPropertiesDataSet.CatalogDefinitionProperty definitionProperty in definition.DefinitionProperties.CatalogDefinitionProperties)
    {
      Console.WriteLine(definitionProperty.DefinitionName);
      Console.WriteLine(definitionProperty.PropertyOrder);
    }
  }
  catch (EntityAlreadyExistsException ex)
  {
    Console.WriteLine(ex.Message);
  }
  return definition;
}

Inheritance Hierarchy

System..::.Object
  System.ComponentModel..::.MarshalByValueComponent
    System.Data..::.DataSet
      Microsoft.CommerceServer.Catalog..::.CatalogDefinitionPropertiesDataSet

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

CatalogDefinitionPropertiesDataSet Members

Microsoft.CommerceServer.Catalog Namespace