Partager via


GetPurchaseOrdersForUser Method (Guid)

Returns the collection of PurchaseOrder objects associated with the specified customer.

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

Syntax

'Declaration
Public Function GetPurchaseOrdersForUser ( _
    userId As Guid _
) As OrderGroupCollection
'Usage
Dim instance As OrderContext
Dim userId As Guid
Dim returnValue As OrderGroupCollection

returnValue = instance.GetPurchaseOrdersForUser(userId)
public OrderGroupCollection GetPurchaseOrdersForUser(
    Guid userId
)
public:
OrderGroupCollection^ GetPurchaseOrdersForUser(
    Guid userId
)
public function GetPurchaseOrdersForUser(
    userId : Guid
) : OrderGroupCollection

Parameters

  • userId
    Type: System..::.Guid
    The identifier of the customer owning the purchase orders.

Return Value

Type: Microsoft.CommerceServer.Runtime.Orders..::.OrderGroupCollection
A collection of PurchaseOrder objects associated with the specified customer, if any are found. otherwise, nullNothingnullptra null reference (Nothing in Visual Basic).

Exceptions

Exception Condition
ArgumentException

userId is empty (Guid.Empty).

SqlException

An error occurred while reading data from the SQL Server.

MappedClassDataMismatchException

Information retrieved for loading mapped classes does not match expected formats defined in the mapping. Likely this means there is a misconfigured SQL Server containing the wrong relational schema information. Alternately, the orders mapping file, OrderObjectMappings.xml, was modified and propagated to Web servers along with appropriate SQL schema changes, but new stored procedures were not generated using the OrderMapping.exe tool and applied to the SQL Server.

Remarks

Returns a collection of PurchaseOrder objects associated with the specified customer, if any are found; otherwise, nullNothingnullptra null reference (Nothing in Visual Basic).

Permissions

See Also

Reference

OrderContext Class

OrderContext Members

GetPurchaseOrdersForUser Overload

Microsoft.CommerceServer.Runtime.Orders Namespace