Partilhar via


AddInventorySku Method (String, String, String, String, String, Boolean, Boolean, Int16, Decimal, Decimal, Decimal, Decimal, Decimal, Decimal, Decimal, DateTime, DateTime, DateTime, String, String, DateTime, Decimal, Decimal, Byte[])

Add an InventorySku to this InventorySkusDataSet..::.InventorySkusDataTable table and return an InventorySkusDataSet..::.InventorySku.

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

Syntax

'Declaration
Public Function AddInventorySku ( _
    Oid As String, _
    InventoryCatalogName As String, _
    ProductCatalogName As String, _
    ProductId As String, _
    VariantId As String, _
    Backorderable As Boolean, _
    Preorderable As Boolean, _
    Status As Short, _
    OnHandQuantity As Decimal, _
    ExcessOnHandQuantity As Decimal, _
    ReorderPoint As Decimal, _
    TargetQuantity As Decimal, _
    BackorderLimit As Decimal, _
    PreorderLimit As Decimal, _
    StockOutThreshold As Decimal, _
    PreorderAvailabilityDate As DateTime, _
    BackorderAvailabilityDate As DateTime, _
    LastRestocked As DateTime, _
    UnitOfMeasure As String, _
    Memo As String, _
    LastModified As DateTime, _
    PreorderedQuantity As Decimal, _
    BackorderedQuantity As Decimal, _
    Timestamp As Byte() _
) As InventorySkusDataSet..::.InventorySku
'Usage
Dim instance As InventorySkusDataSet..::.InventorySkusDataTable
Dim Oid As String
Dim InventoryCatalogName As String
Dim ProductCatalogName As String
Dim ProductId As String
Dim VariantId As String
Dim Backorderable As Boolean
Dim Preorderable As Boolean
Dim Status As Short
Dim OnHandQuantity As Decimal
Dim ExcessOnHandQuantity As Decimal
Dim ReorderPoint As Decimal
Dim TargetQuantity As Decimal
Dim BackorderLimit As Decimal
Dim PreorderLimit As Decimal
Dim StockOutThreshold As Decimal
Dim PreorderAvailabilityDate As DateTime
Dim BackorderAvailabilityDate As DateTime
Dim LastRestocked As DateTime
Dim UnitOfMeasure As String
Dim Memo As String
Dim LastModified As DateTime
Dim PreorderedQuantity As Decimal
Dim BackorderedQuantity As Decimal
Dim Timestamp As Byte()
Dim returnValue As InventorySkusDataSet..::.InventorySku

returnValue = instance.AddInventorySku(Oid, _
    InventoryCatalogName, ProductCatalogName, _
    ProductId, VariantId, Backorderable, _
    Preorderable, Status, OnHandQuantity, _
    ExcessOnHandQuantity, ReorderPoint, _
    TargetQuantity, BackorderLimit, _
    PreorderLimit, StockOutThreshold, _
    PreorderAvailabilityDate, BackorderAvailabilityDate, _
    LastRestocked, UnitOfMeasure, Memo, _
    LastModified, PreorderedQuantity, _
    BackorderedQuantity, Timestamp)
public InventorySkusDataSet..::.InventorySku AddInventorySku(
    string Oid,
    string InventoryCatalogName,
    string ProductCatalogName,
    string ProductId,
    string VariantId,
    bool Backorderable,
    bool Preorderable,
    short Status,
    decimal OnHandQuantity,
    decimal ExcessOnHandQuantity,
    decimal ReorderPoint,
    decimal TargetQuantity,
    decimal BackorderLimit,
    decimal PreorderLimit,
    decimal StockOutThreshold,
    DateTime PreorderAvailabilityDate,
    DateTime BackorderAvailabilityDate,
    DateTime LastRestocked,
    string UnitOfMeasure,
    string Memo,
    DateTime LastModified,
    decimal PreorderedQuantity,
    decimal BackorderedQuantity,
    byte[] Timestamp
)
public:
InventorySkusDataSet..::.InventorySku^ AddInventorySku(
    String^ Oid, 
    String^ InventoryCatalogName, 
    String^ ProductCatalogName, 
    String^ ProductId, 
    String^ VariantId, 
    bool Backorderable, 
    bool Preorderable, 
    short Status, 
    Decimal OnHandQuantity, 
    Decimal ExcessOnHandQuantity, 
    Decimal ReorderPoint, 
    Decimal TargetQuantity, 
    Decimal BackorderLimit, 
    Decimal PreorderLimit, 
    Decimal StockOutThreshold, 
    DateTime PreorderAvailabilityDate, 
    DateTime BackorderAvailabilityDate, 
    DateTime LastRestocked, 
    String^ UnitOfMeasure, 
    String^ Memo, 
    DateTime LastModified, 
    Decimal PreorderedQuantity, 
    Decimal BackorderedQuantity, 
    array<unsigned char>^ Timestamp
)
public function AddInventorySku(
    Oid : String, 
    InventoryCatalogName : String, 
    ProductCatalogName : String, 
    ProductId : String, 
    VariantId : String, 
    Backorderable : boolean, 
    Preorderable : boolean, 
    Status : short, 
    OnHandQuantity : decimal, 
    ExcessOnHandQuantity : decimal, 
    ReorderPoint : decimal, 
    TargetQuantity : decimal, 
    BackorderLimit : decimal, 
    PreorderLimit : decimal, 
    StockOutThreshold : decimal, 
    PreorderAvailabilityDate : DateTime, 
    BackorderAvailabilityDate : DateTime, 
    LastRestocked : DateTime, 
    UnitOfMeasure : String, 
    Memo : String, 
    LastModified : DateTime, 
    PreorderedQuantity : decimal, 
    BackorderedQuantity : decimal, 
    Timestamp : byte[]
) : InventorySkusDataSet..::.InventorySku

Parameters

  • ProductCatalogName
    Type: System..::.String
    The product catalog name. Cannot be nullNothingnullptra null reference (Nothing in Visual Basic).
  • ProductId
    Type: System..::.String
    The product identifier. Cannot be nullNothingnullptra null reference (Nothing in Visual Basic).
  • VariantId
    Type: System..::.String
    The variant identifier. Can be nullNothingnullptra null reference (Nothing in Visual Basic) but can be an empty string.
  • Backorderable
    Type: System..::.Boolean
    Determines if the product is back orderable. Cannot be nullNothingnullptra null reference (Nothing in Visual Basic).
  • Preorderable
    Type: System..::.Boolean
    Determines if the product is pre orderable. Cannot be nullNothingnullptra null reference (Nothing in Visual Basic).
  • Status
    Type: System..::.Int16
    The SKU status. Cannot be nullNothingnullptra null reference (Nothing in Visual Basic).
  • OnHandQuantity
    Type: System..::.Decimal
    A value to specify the excess on hand quantity for the product. Cannot be nullNothingnullptra null reference (Nothing in Visual Basic).
  • ExcessOnHandQuantity
    Type: System..::.Decimal
    Specifies the excess on hand quantity for the product. Can be nullNothingnullptra null reference (Nothing in Visual Basic).
  • ReorderPoint
    Type: System..::.Decimal
    The quantity at which the SKU should be reordered. Can be nullNothingnullptra null reference (Nothing in Visual Basic).
  • BackorderLimit
    Type: System..::.Decimal
    The backorder limit for the product. Can be nullNothingnullptra null reference (Nothing in Visual Basic).
  • PreorderLimit
    Type: System..::.Decimal
    The preorder limit for the product. Can be nullNothingnullptra null reference (Nothing in Visual Basic).
  • StockOutThreshold
    Type: System..::.Decimal
    A "fudge factor" value that the SKU's quantity must be above or equal to be considered in-stock. Cannot be nullNothingnullptra null reference (Nothing in Visual Basic).
  • PreorderAvailabilityDate
    Type: System..::.DateTime
    The preorder availability date for the product. The preorderAvailabilityDate should be greater than the current DateTime. Can be nullNothingnullptra null reference (Nothing in Visual Basic).
  • BackorderAvailabilityDate
    Type: System..::.DateTime
    Specifies when the backorder will be available. Can be nullNothingnullptra null reference (Nothing in Visual Basic).
  • LastRestocked
    Type: System..::.DateTime
    The date the product was last restocked. Cannot be nullNothingnullptra null reference (Nothing in Visual Basic).
  • UnitOfMeasure
    Type: System..::.String
    The unit of measure for the product. For example, pounds or grams. Can be nullNothingnullptra null reference (Nothing in Visual Basic).
  • Memo
    Type: System..::.String
    Store user defined information for the product. The attribute is limited to 128 characters. Can be nullNothingnullptra null reference (Nothing in Visual Basic).
  • LastModified
    Type: System..::.DateTime
    The DateTime this inventory catalog was last modified. Cannot be nullNothingnullptra null reference (Nothing in Visual Basic).
  • PreorderedQuantity
    Type: System..::.Decimal
    A value that indicates the quantity that has been preordered. Can be nullNothingnullptra null reference (Nothing in Visual Basic).
  • BackorderedQuantity
    Type: System..::.Decimal
    A value to determine how many units are backordered. Can be nullNothingnullptra null reference (Nothing in Visual Basic).

Return Value

Type: Microsoft.CommerceServer.Inventory..::.InventorySkusDataSet..::.InventorySku
An InventorySkusDataSet..::.InventorySku with the added InventorySku.

Remarks

The InventorySkusDataSet object must be saved before these changes will be persisted to the database.

Permissions

See Also

Reference

InventorySkusDataSet..::.InventorySkusDataTable Class

InventorySkusDataSet..::.InventorySkusDataTable Members

AddInventorySku Overload

Microsoft.CommerceServer.Inventory Namespace