SearchPurchaseOrders Method (SearchClause, SearchOptions)
Returns a DataSet containing all the PurchaseOrder objects that match specified search criteria.
Namespace: Microsoft.CommerceServer.Orders
Assembly: Microsoft.CommerceServer.Orders.CrossTierTypes (in Microsoft.CommerceServer.Orders.CrossTierTypes.dll)
Syntax
'Declaration
Public Function SearchPurchaseOrders ( _
searchClause As SearchClause, _
searchOptions As SearchOptions _
) As DataSet
'Usage
Dim instance As PurchaseOrderManager
Dim searchClause As SearchClause
Dim searchOptions As SearchOptions
Dim returnValue As DataSet
returnValue = instance.SearchPurchaseOrders(searchClause, _
searchOptions)
public DataSet SearchPurchaseOrders(
SearchClause searchClause,
SearchOptions searchOptions
)
public:
DataSet^ SearchPurchaseOrders(
SearchClause^ searchClause,
SearchOptions^ searchOptions
)
public function SearchPurchaseOrders(
searchClause : SearchClause,
searchOptions : SearchOptions
) : DataSet
Parameters
- searchClause
Type: Microsoft.CommerceServer..::.SearchClause
XML blob representing the search criteria.
- searchOptions
Type: Microsoft.CommerceServer..::.SearchOptions
A SearchOptions that contains options for this search.
Return Value
Type: System.Data..::.DataSet
A DataSet containing all the PurchaseOrder objects that match specified search criteria.
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | The searchClause is nullNothingnullptra null reference (Nothing in Visual Basic). |
ArgumentNullException | The specified search clause is not a well formed search clause. |
NotAuthorizedException | User does not have permission to perform this operation. |
TimeoutException | Thrown if an SQL command timeout occurs. |
Remarks
The returned DataSet contains just the top level properties from PurchaseOrder class. It contains a DataTable named PurchaseOrder with columns named as properties to return. The DataSet does not contain all the records that match the criteria. It is populated with the pages the user asks for using the searchClause parameter.
In order to perform a SearchPurchaseOrders, the user must have the OrdersAdapter permissions. See Orders System Roles [CS06] for more information about the specific roles in the Order System.
Some order system APIs support distributed transactions. If a cookie with a valid transaction is found the order system enlists as part of that transaction. If a valid transaction is not found the order system initiates a new transaction.
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.