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
- orderGroup
Type: Microsoft.CommerceServer.Runtime.Orders..::.OrderGroup
An OrderGroup containing the OrderFormCollection to be added to the basket.
- 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
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.