Partilhar via


How to Use the ExpressionCategorySet

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

The following example programmatically accesses the ExpressionCategorySet.

To access the ExpressionCategorySet

  1. Create a ExpressionCategorySet object.

  2. Use the ExpressionCategories property on this object to access and modify the expression categories.

  3. Use the SaveExpressionCategories method to save the changes.

Example

MarketingServiceAgent agent = new MarketingServiceAgent(url);
MarketingSystem marketingSystem = new MarketingSystem(agent);

ExpressionCategorySet ds = marketingSystem.Expressions.GetAllExpressionCategories();

// Modify an existing expression category.
ds.ExpressionCategories[0].Profile = “UpdatedProfile”;

// Delete an expression category.
ds.ExpressionCategories[1].Delete();

// Add a new expression category.
ds.ExpressionCategories.AddExpressionCategoryRow(“MyNewCategory”, “MyNewProfile”);

// Save changes to the Marketing System.
marketingSystem.Expressions.SaveExpressionCategories(ds);

See Also

Other Resources

ExpressionCategorySet