次の方法で共有


InventoryCatalog Class

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

Manages a single inventory catalog.

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

Syntax

'Declaration
Public Class InventoryCatalog _
    Inherits CatalogObjectBase
'Usage
Dim instance As InventoryCatalog
public class InventoryCatalog : CatalogObjectBase
public ref class InventoryCatalog : public CatalogObjectBase
public class InventoryCatalog extends CatalogObjectBase

Remarks

An inventory catalog is used to store inventory information for the products and variants in the catalog system. One inventory catalog can contain inventory information for one or more product catalogs (base catalogs and virtual catalogs) but one product catalog can be associated with one inventory catalog only. The inventory catalogs can also store inventory information for products which do not belong to product catalogs in the catalog system.

Inventory catalogs are one of two types; the default inventory catalog which is always present, and custom inventory catalogs, which are added by users.

This class provides SKU data and mapping container for a custom inventory catalog. One InventoryCatalog may contain one or more product catalogs.

Examples

public bool CreateAndDeleteInventoryCatalog()
{
  bool result = true;
  InventoryCatalog inventoryCatalog = null;
  string inventoryCatalogName = "My Inventory Catalog";
  string description = "Testing create inventory catalog";
  try
  {
    //Creating the inventory catalog
    inventoryCatalog = helper.InventoryContext.CreateInventoryCatalog(inventoryCatalogName, description);
  }
  catch (Exception e)
  {
    Console.WriteLine("Unexpected exception occured when creating an inventory catalog", e.Message);
    throw e;
  }
  //Get the created inventoryCatalog
  inventoryCatalog = helper.InventoryContext.GetInventoryCatalog(inventoryCatalogName);
  //Deleting the inventory
  helper.InventoryContext.DeleteInventoryCatalog(inventoryCatalogName);
  return result;
} 

Inheritance Hierarchy

System..::.Object
  Microsoft.CommerceServer.Catalog..::.CatalogObjectBase
    Microsoft.CommerceServer.Inventory..::.InventoryCatalog

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

InventoryCatalog Members

Microsoft.CommerceServer.Inventory Namespace