Nihit Kaul [MSFT]
Guest
|
Posted:
Thu Nov 10, 2005 9:51 pm Post subject:
RE: Set Shipping Rates |
|
|
The following class should help you do this:
ShippingMethodManager.CreateMethodInstance Method (PIA)
From the Help:
ShippingMethodManager.CreateMethodInstance Method (PIA)
Use this method to create a new shipping method.
Definition
[Visual Basic .NET]
Imports Microsoft.CommerceServer.Interop.Orders
…
Public Function CreateMethodInstance(
ByRef bOnDisk As Object
) As Object
[C#]
using Microsoft.CommerceServer.Interop.Orders;
…
public object CreateMethodInstance(
ref object bOnDisk
);
Parameters
[Visual Basic .NET]
bOnDisk
An Object containing a Boolean indicating whether or not to create the
shipping method on disk. This parameter is usually set to True.
[C#]
bOnDisk
An object containing a bool value indicating whether or not to create the
shipping method on disk. This parameter is usually set to True.
Return Values
[Visual Basic .NET] If this method completes successfully, it returns an
Object containing a string that is the method ID of the new shipping
method. The method returns an empty string when the bOnDisk parameter is
False.
[C#] This method returns an object containing a string that is the method
ID of the new method. It is set to an empty string value if the bOnDisk
parameter is False.
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 shipping method is created to be saved on disk (the bOnSaved
parameter is True), the function adds a new record to the current recordset
with the enabled column value set to zero (0) and the shipping_method_id
column set to the new shipping method ID.
Thanks,
Nihit Kaul[MSFT]
Commerce Server
http://blogs.msdn.com/nihitk
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm |
|