Add Method
For the latest version of Commerce Server 2007 Help, see the Microsoft Web site.
Adds the specified Payment to the end of the PaymentCollection.
Namespace: Microsoft.CommerceServer.Runtime.Orders
Assembly: Microsoft.CommerceServer.Runtime (in Microsoft.CommerceServer.Runtime.dll)
Syntax
'Declaration
Public Sub Add ( _
payment As Payment _
)
'Usage
Dim instance As PaymentCollection
Dim payment As Payment
instance.Add(payment)
public void Add(
Payment payment
)
public:
void Add(
Payment^ payment
)
public function Add(
payment : Payment
)
Parameters
- payment
Type: Microsoft.CommerceServer.Runtime.Orders..::.Payment
The new Payment to add. Cannot be nullNothingnullptra null reference (Nothing in Visual Basic).
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | payment is nullNothingnullptra null reference (Nothing in Visual Basic). |
ArgumentException | The entry being added is already a member of a collection. |
ConfiguredLimitExceededException | The number of payments in the collection is already at the PaymentCountPerOrderGroupLimit set in the web.config. |
EntityAlreadyExistsException | A Payment with the same PaymentId already exists in the collection. |
Remarks
Adds the specified Payment to the end of the PaymentCollection. Successfully calling Add updates LastModified. ParentOrderForm and OrderGroupId will be set during an Add operation.
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.