ExportPromoCodesForDefinition Method (String, Int32, PromoCodeDefinitionManager.ProgressEventHandler)
Synchronously saves all promocodes in a given definition to a file.
Namespace: Microsoft.CommerceServer.Marketing
Assembly: Microsoft.CommerceServer.Marketing.CrossTierTypes (in Microsoft.CommerceServer.Marketing.CrossTierTypes.dll)
Syntax
'Declaration
Public Sub ExportPromoCodesForDefinition ( _
filePath As String, _
promoCodeDefinitionId As Integer, _
eventHandler As PromoCodeDefinitionManager..::.ProgressEventHandler _
)
'Usage
Dim instance As PromoCodeDefinitionManager
Dim filePath As String
Dim promoCodeDefinitionId As Integer
Dim eventHandler As PromoCodeDefinitionManager..::.ProgressEventHandler
instance.ExportPromoCodesForDefinition(filePath, _
promoCodeDefinitionId, eventHandler)
public void ExportPromoCodesForDefinition(
string filePath,
int promoCodeDefinitionId,
PromoCodeDefinitionManager..::.ProgressEventHandler eventHandler
)
public:
void ExportPromoCodesForDefinition(
String^ filePath,
int promoCodeDefinitionId,
PromoCodeDefinitionManager..::.ProgressEventHandler^ eventHandler
)
public function ExportPromoCodesForDefinition(
filePath : String,
promoCodeDefinitionId : int,
eventHandler : PromoCodeDefinitionManager..::.ProgressEventHandler
)
Parameters
- filePath
Type: System..::.String
Full path to the file to which the promotion codes will be exported.
- promoCodeDefinitionId
Type: System..::.Int32
Id of the PromoCodeDefinition whose promotion codes will be exported.
- eventHandler
Type: Microsoft.CommerceServer.Marketing..::.PromoCodeDefinitionManager..::.ProgressEventHandler
The PromoCodeDefinitionManager..::.ProgressEventHandler delegate instance called regularly for progress notification.
Exceptions
Exception | Condition |
---|---|
NotAuthorizedException | The user is not authorized to perform this operation. |
ArgumentOutOfRangeException | The promoCodeDefinitionId argument value is less than or equal to zero. |
EntityDoesNotExistException | A PromoCodeDefinition object with such promoCodeDefinitionId does not exist. |
Remarks
eventHandler may be nullNothingnullptra null reference (Nothing in Visual Basic) if the caller does not wish to receive progress notifications.
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.
See Also
Reference
PromoCodeDefinitionManager Class
PromoCodeDefinitionManager Members
ExportPromoCodesForDefinition Overload