CatalogDefinitionPropertiesDataSet.CatalogDefinitionProperty Class
For the latest version of Commerce Server 2007 Help, see the Microsoft Web site.
Allows access to the CatalogDefinitionPropertiesDataSet..::.CatalogDefinitionPropertiesDataTable table.
Namespace: Microsoft.CommerceServer.Catalog
Assembly: Microsoft.CommerceServer.Catalog (in Microsoft.CommerceServer.Catalog.dll)
Syntax
'Declaration
Public Class CatalogDefinitionProperty _
Inherits DataRow
'Usage
Dim instance As CatalogDefinitionPropertiesDataSet.CatalogDefinitionProperty
public class CatalogDefinitionProperty : DataRow
public ref class CatalogDefinitionProperty : public DataRow
public class CatalogDefinitionProperty extends DataRow
Remarks
Gets and sets the values in the CatalogDefinitionPropertiesDataSet..::.CatalogDefinitionPropertiesDataTable table.
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.Data..::.DataRow
Microsoft.CommerceServer.Catalog..::.CatalogDefinitionPropertiesDataSet..::.CatalogDefinitionProperty
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..::.CatalogDefinitionProperty Members