Jaa


ExportToDW Property

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

Gets or sets the value in the ExportToDWColumn column of the CatalogPropertiesDataSet..::.CatalogPropertiesDataTable table.

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

Syntax

'Declaration
Public Property ExportToDW As Boolean
'Usage
Dim instance As CatalogPropertiesDataSet..::.CatalogProperty
Dim value As Boolean

value = instance.ExportToDW

instance.ExportToDW = value
public bool ExportToDW { get; set; }
public:
property bool ExportToDW {
    bool get ();
    void set (bool value);
}
public function get ExportToDW () : boolean
public function set ExportToDW (value : boolean)

Property Value

Type: System..::.Boolean
The value from the ExportToDWColumn column of the CatalogPropertiesDataSet..::.CatalogPropertiesDataTable table.

Remarks

DataSet: CatalogPropertiesDataSet Table: CatalogProperties Column: ExportToDW.

Examples

internal void UpdateProperty(CatalogProperty property)
{
  try
  {
    // Set the required attributes on the property 
    property.Information.CatalogProperties[0].ExportToDW = true;
    property.Information.CatalogProperties[0].DisplayName = "Test DisplayName";
    property.Information.CatalogProperties[0].DisplayInProductsList = true;
    // To set a  value of an attribute to null use the SetXXXNull() method
    property.Information.CatalogProperties[0].SetCurrencyNull();
    // To set default values use the corresponding XXXDefaultValue method
    // If the property is not multilingual 
    if (property.DataType == CatalogDataType.String && !property.Information.CatalogProperties[0].LanguageSensitive)
    {
      property.Information.CatalogProperties[0].DefaultStringValue = "default";
    }
    else if (property.DataType == CatalogDataType.String && property.Information.CatalogProperties[0].LanguageSensitive)
    {
      string language = "en-US";
      // The language sensitive default value is stored in the u_defaultvalue_<language> column
      string defaultValueColumn = string.Format("{0}_{1}", CatalogPropertiesDataSetSchema.DefaultStringValue, language);
      // Check that the default value column exists before setting th
      if (property.Information.CatalogProperties.Columns.Contains(defaultValueColumn))
      {
        property.Information.CatalogProperties[0][defaultValueColumn] = "en-US default value";
      }
    }
    // To set values for properties added as entity extensions 
    /* Assuming that HelpId is added as an entity extension
     * property["HelpId"] = value;
    */
    // Finally call Save to save the changes to the catalog system
    property.Save();
  }
  catch (OptimisticLockException ex)
  {
    // The property was modified by another user
    Console.WriteLine(ex.Message);
  }
} 

Permissions

See Also

Reference

CatalogPropertiesDataSet..::.CatalogProperty Class

CatalogPropertiesDataSet..::.CatalogProperty Members

Microsoft.CommerceServer.Catalog Namespace