OrderGroup.PutItemValue Method (PIA)

Use this method to put the specified values into the specified keys of the line item.

Definition

[Visual Basic .NET]

Imports Microsoft.CommerceServer.Interop.Orders
…
Public Sub PutItemValue(strKey As String,
  vtValue As Object,
  Optional bOverWrite As Boolean,
  Optional nItemIndex As Object,
  Optional strOrderFormName As Object)

[C#]

using Microsoft.CommerceServer.Interop.Orders;
…
public void PutItemValue(string strKey,
  objectvtValue,
  boolbOverWrite,
  objectnItemIndex,
  objectstrOrderFormName);

Parameters

[Visual Basic .NET]

  • strKey
    A String that specifies the key whose attribute will store the value specified by the vtValue parameter.
  • vtValue
    An Object that specifies the value to store in the attribute of the key specified by the strKey parameter.
  • bOverWrite
    A Boolean that indicates whether to overwrite the existing attribute of the key specified by the strKey parameter. A value of True indicates that the attribute will be overwritten. A value of False indicates that the attribute will not be overwritten.
  • nItemIndex
    An Object that specifies the line-item index.
  • strOrderFormName
    An Object that specifies the OrderForm object name.

[C#]

  • strKey
    A string that specifies the key whose attribute will store the value specified by the vtValue parameter.
  • vtValue
    An object that specifies the value to store in the attribute of the key specified by the strKey parameter.
  • bOverWrite
    A bool that indicates whether to overwrite the existing attribute of the key specified by the strKey parameter. A value of true indicates that the attribute will be overwritten. A value of false indicates that the attribute will not be overwritten if one already exists.
  • nItemIndex
    An object that specifies the line-item index.
  • strOrderFormName
    An object that specifies the OrderForm object name.

Exceptions

This method may throw one of many mapped exceptions or an exception of type COMException. See Standard COM Errors for additional details.

Remarks

If the line-item index is specified, this method sets the name/value pair for the specified line item on the OrderForm object specified in the strOrderFormName parameter. (The strOrderFormName parameter defaults to "default" if unspecified.)

If the line-item index is not specified, this method sets the name/value pair for all line items for the specified OrderForm object. If no OrderForm object name is specified, this method sets the name/value pair for all line items in the OrderGroup object.

If there is no OrderForm object for the strOrderFormName specified in the strOrderFormName parameter, one is created.

[Visual Basic .NET]

Example

' oOrderGroup is a Commerce.OrderGroup Object
oOrderGroup.PutItemValue(payment_method, credit_card, False)

Requirements

Namespace: Microsoft.CommerceServer.Interop.Orders

Platforms: Windows 2000, Windows Server 2003

Assembly: Microsoft.CommerceServer.Interop.Orders.Requisition.dll

See Also

OrderGroup Class

Copyright © 2005 Microsoft Corporation.
All rights reserved.