Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
For the latest version of Commerce Server 2007 Help, see the Microsoft Web site.
Allows access to the CatalogItemsDataSet..::.CatalogItemsDataTable table.
Namespace: Microsoft.CommerceServer.Catalog
Assembly: Microsoft.CommerceServer.Catalog (in Microsoft.CommerceServer.Catalog.dll)
Syntax
'Declaration
Public Class CatalogItem _
Inherits DataRow
'Usage
Dim instance As CatalogItemsDataSet.CatalogItem
public class CatalogItem : DataRow
public ref class CatalogItem : public DataRow
public class CatalogItem extends DataRow
Remarks
Gets and sets the values in the CatalogItemsDataSet..::.CatalogItemsDataTable table.
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;
*/
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.Data..::.DataRow
Microsoft.CommerceServer.Catalog..::.CatalogItemsDataSet..::.CatalogItem
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.