CatalogItemsDataSet Class
For the latest version of Commerce Server 2007 Help, see the Microsoft Web site.
Access the CatalogItems values in the CatalogItemsDataSet.
Namespace: Microsoft.CommerceServer.Catalog
Assembly: Microsoft.CommerceServer.Catalog (in Microsoft.CommerceServer.Catalog.dll)
Syntax
'Declaration
<SerializableAttribute> _
Public Class CatalogItemsDataSet _
Inherits DataSet
'Usage
Dim instance As CatalogItemsDataSet
[SerializableAttribute]
public class CatalogItemsDataSet : DataSet
[SerializableAttribute]
public ref class CatalogItemsDataSet : public DataSet
public class CatalogItemsDataSet extends DataSet
Remarks
Returns the dataset containing the CatalogItems values. This allows you to get the CatalogItems values.
Examples
internal CatalogItemsDataSet SearchCatalog(string catalogName)
{
CatalogSearchOptions searchOptions = new CatalogSearchOptions();
searchOptions.PropertiesToReturn = "CategoryName, DefinitionName, i_classtype, ProductId, VariantId, DisplayName";
searchOptions.SetPaging(1, 20);
searchOptions.SortProperty = "CategoryName";
CatalogSearch catalogSearch = this.catalogContext.GetCatalogSearch();
catalogSearch.CatalogNames = catalogName;// This is a comma separated list of catalogs to search eg "Catalog1,catalog2"
catalogSearch.SqlWhereClause = "cy_list_price<10";// Return all items with price less than 10
catalogSearch.UseAdvancedFreetextSearch = true;//
catalogSearch.AdvancedFreeTextSearchPhrase = "\"sql books\""; // Returns all rows which contain the phrase "sql books"
/*
* Inventory Integration: Set the inventory options here
catalogSearch.InventoryOptions = new InventoryOptions();
catalogSearch.InventoryOptions.FilterOutOfStockSkus = true; // Do not return products which are out of stock.
*/
/* To restrict searches to a single category
catalogSearch.CategoryName = "categoryname";
catalogSearch.Recursive = true;
*/
catalogSearch.SearchOptions = searchOptions;
int totalRecords = 0;
CatalogItemsDataSet catalogItems = catalogSearch.Search(out totalRecords);
Console.WriteLine(totalRecords);
foreach (CatalogItemsDataSet.CatalogItem catalogItem in catalogItems.CatalogItems)
{
Console.WriteLine(catalogItem.CategoryName);
Console.WriteLine(catalogItem.DisplayName);
}
return catalogItems;
}
Inheritance Hierarchy
System..::.Object
System.ComponentModel..::.MarshalByValueComponent
System.Data..::.DataSet
Microsoft.CommerceServer.Catalog..::.CatalogItemsDataSet
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.