Поделиться через


Add Method

Adds the specified Shipment to the end of the ShipmentCollection.

Namespace:  Microsoft.CommerceServer.Runtime.Orders
Assembly:  Microsoft.CommerceServer.Runtime (in Microsoft.CommerceServer.Runtime.dll)

Syntax

'Declaration
Public Sub Add ( _
    shipment As Shipment _
)
'Usage
Dim instance As ShipmentCollection
Dim shipment As Shipment

instance.Add(shipment)
public void Add(
    Shipment shipment
)
public:
void Add(
    Shipment^ shipment
)
public function Add(
    shipment : Shipment
)

Parameters

Exceptions

Exception Condition
ArgumentNullException

shipment is nullNothingnullptra null reference (Nothing in Visual Basic).

ArgumentException

The entry being added is already a member of a collection.

ConfiguredLimitExceededException

The number of Shipment within the current instance is already at the ShipmentCountPerOrderFormLimit set in Web.config.

EntityAlreadyExistsException

A shipment with the same ShipmentId already exists in the current collection.

Remarks

Adds the specified Shipment to the end of the ShipmentCollection.

Successfully calling Add updates LastModified, ParentOrderForm, OrderFormId, and OrderGroupId.

Permissions

See Also

Reference

ShipmentCollection Class

ShipmentCollection Members

Microsoft.CommerceServer.Runtime.Orders Namespace