InventorySkusDataSet
For the latest version of Commerce Server 2007 Help, see the Microsoft Web site.
The InventorySkusDataSet class contains all the attributes for an inventory SKU. You can access the DataRowCollection of the dataset’s data table by using the InventorySkus property. You can access each row in the collection by using the properties of the InventorySkusDataSet..::.InventorySku class.
The following table contains the strongly typed properties in this dataset.
Property |
Description |
---|---|
Gets or sets a Boolean value that specifies whether this product can be back-ordered. |
|
Gets or sets a DateTime value that specifies when the back-ordered SKU will be available for shipping. This date is stored in UTC time. |
|
Gets a decimal value that specifies the quantity of this SKU that has been back-ordered. This is a computed property. |
|
Gets or sets a decimal value beyond which this SKU cannot be back-ordered. |
|
Gets or sets the OnHandQuantity value above which the SKU is considered to have excess inventory. |
|
Gets a string that contains the name of the inventory catalog for this SKU. |
|
Gets a DateTime value that specifies when the product was last modified. This date is stored in UTC time. |
|
Gets or sets a DateTime value that specifies when the SKU was last restocked. This date is stored in UTC time. |
|
Gets or sets a string that contains user-defined information. |
|
Gets a string value that is intended for internal use only. |
|
Gets or sets a decimal value that specifies the on-hand quantity for the SKU. |
|
Gets or sets a Boolean value that specifies whether this product can be preordered. |
|
Gets or sets a DateTime value that specifies when the preordered SKU will be available for shipping. This date is stored in UTC time. |
|
Gets a decimal value that specifies the amount that has been preordered until this point. This is a computed property. |
|
Gets or sets a decimal value that specifies the quantity above which preorders should not be taken. |
|
Gets a string that contains the name of the product catalog that contains this product. |
|
Gets a string that specifies the identifier of this product. |
|
Gets or sets the OnHandQuantity value below which the product inventory should be replenished. |
|
Gets or sets an integer that specifies the current stock status for this SKU. This value corresponds to one of the values of the StockStatus class. The possible values are as follows:
|
|
Gets or sets a decimal value that the SKU quantity must exceed to be considered in stock. |
|
Gets or sets a decimal value that specifies the desired amount of inventory for this SKU. |
|
Gets a binary value that specifies the last time this row was updated. This value is for internal use only. |
|
Gets or sets a string that specifies the unit of measure for the quantity properties. |
|
Gets a string that contains the identifier for the variant. |
Constraints
The InventorySkusDataSet class does not define any constraints.
Using the InventorySkusDataSet Class
The following example demonstrates how to access the properties of the InventorySkusDataSet class.
public static void UseDataset(CatalogContext catalogContext, string inventoryCatalogName)
{
// Iterate through the inventory SKUs in the Catalog
// System to access attributes.
// Get an inventory catalog.
InventoryCatalog inventoryCatalog = catalogContext.InventoryContext.GetInventoryCatalog(inventoryCatalogName);
// Get a collection of all SKUs in the Catalog System.
InventorySkuCollection skuCollection = inventoryCatalog.GetSkus();
// Get the dataset for the collection.
InventorySkusDataSet skusDataset = skuCollection.DataSet;
int count = skusDataset.InventorySkus.Count;
// Iterate through the dataset.
for (int skusIndex = 0; skusIndex < count; skusIndex++)
{
string productId = skusDataset.InventorySkus[skusIndex].ProductId;
string catalogName = skusDataset.InventorySkus[skusIndex].ProductCatalogName;
decimal quantity = skusDataset.InventorySkus[skusIndex].OnHandQuantity;
}
}
The InventorySkusDataSetSchema Class
The InventorySkusDataSetSchema class provides constants for all the built-in columns in the dataset and defines all the associated methods. The following table contains the associated methods for this class.
Method |
Description |
---|---|
Returns true if the columnName in the dataset cannot be updated, or false if the columnName in the dataset can be updated. |
|
Returns true if the columnName is a built-in column in the dataset, or false if the columnName is a user-defined property. |