Partilhar via


GetOrderTemplatesForUser Method

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

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

Syntax

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

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

Parameters

  • userId
    Type: System..::.Guid
    The identifier of the customer owning the order templates.

Return Value

Type: Microsoft.CommerceServer.Runtime.Orders..::.OrderGroupCollection
A collection of OrderTemplate 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).

Remarks

Returns a collection of OrderTemplate 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

Microsoft.CommerceServer.Runtime.Orders Namespace