ExportPromoCodesForDefinition Method (String, Int32, Guid, PromoCodeDefinitionManager.ProgressEventHandler)
Synchronously saves all promocodes in a given definition and batch 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, _
batchId As Guid, _
eventHandler As PromoCodeDefinitionManager..::.ProgressEventHandler _
)
'Usage
Dim instance As PromoCodeDefinitionManager
Dim filePath As String
Dim promoCodeDefinitionId As Integer
Dim batchId As Guid
Dim eventHandler As PromoCodeDefinitionManager..::.ProgressEventHandler
instance.ExportPromoCodesForDefinition(filePath, _
promoCodeDefinitionId, batchId, _
eventHandler)
public void ExportPromoCodesForDefinition(
string filePath,
int promoCodeDefinitionId,
Guid batchId,
PromoCodeDefinitionManager..::.ProgressEventHandler eventHandler
)
public:
void ExportPromoCodesForDefinition(
String^ filePath,
int promoCodeDefinitionId,
Guid batchId,
PromoCodeDefinitionManager..::.ProgressEventHandler^ eventHandler
)
public function ExportPromoCodesForDefinition(
filePath : String,
promoCodeDefinitionId : int,
batchId : Guid,
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 that contains the batch specified by batchId.
- batchId
Type: System..::.Guid
Id of the batch 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