Partilhar via


Save Method (String)

Saves the purchase order to the SQL database.

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

Syntax

'Declaration
Public Sub Save ( _
    applicationId As String _
)
'Usage
Dim instance As PurchaseOrder
Dim applicationId As String

instance.Save(applicationId)
public void Save(
    string applicationId
)
public:
void Save(
    String^ applicationId
)
public function Save(
    applicationId : String
)

Parameters

  • applicationId
    Type: System..::.String
    The application that this method is called from. The application IDs are defined in the StatusManager table.

Exceptions

Exception Condition
UnexpectedContainedTypeException

A collection in a mapped class contains an instance of an unmapped class.

WeaklyTypedPropertyTypeException

A class having weakly-typed properties mapped to specific table columns contains a property value that is incompatible with the column type to which it is mapped.

OrderNotSavedException

The row entry of the current purchase order was modified in storage after the purchase order was loaded.

InvalidOperationException

The current purchase order has been disposed.

Remarks

When a PurchaseOrder is serialized and saved to the database, the LastModified field is automatically updated even if no recent changes have been made to the PurchaseOrder. Created and LastModified are system properties that are written by the Commerce Server system. If you want to preserve PurchaseOrder properties that reflect historical Created and LastModified values, you should create a set of custom properties that are not overridden by the system. Save conducts a two-phase commit using a distributed transaction coordinator.

Permissions

See Also

Reference

PurchaseOrder Class

PurchaseOrder Members

Save Overload

Microsoft.CommerceServer.Runtime.Orders Namespace