次の方法で共有


Add Method (OrderGroup, Boolean)

Adds the collection of order forms for the specified order group to the current instance.

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

Syntax

'Declaration
Public Sub Add ( _
    orderGroup As OrderGroup, _
    lineItemRollup As Boolean _
)
'Usage
Dim instance As Basket
Dim orderGroup As OrderGroup
Dim lineItemRollup As Boolean

instance.Add(orderGroup, lineItemRollup)
public void Add(
    OrderGroup orderGroup,
    bool lineItemRollup
)
public:
void Add(
    OrderGroup^ orderGroup, 
    bool lineItemRollup
)
public function Add(
    orderGroup : OrderGroup, 
    lineItemRollup : boolean
)

Parameters

  • lineItemRollup
    Type: System..::.Boolean
    false to add the new item even if a duplicate line item exists in the collection; true to update the quantity for an existing duplicate line item.

Remarks

Use this method to add items from the specified orderGroup to this basket instance.

If an OrderForm with the same name does not already exist within the OrderGroup, then a new OrderForm is created and populated with the line items from OrderGroup. If an OrderForm in the specified orderGroup has the same name as an OrderForm in the Basket, the contents of the OrderForm objects are merged by calling the Add method on the LineItemCollection object and providing the lineItemRollup parameter. See Add for more information about how the lineItemRollup parameter is used.

Permissions

See Also

Reference

Basket Class

Basket Members

Add Overload

Microsoft.CommerceServer.Runtime.Orders Namespace