Class PromotionManager
Promotion manager acts as proxy between methods that call data layer functions and the facade layer. The methods here check if the appropriate security is set and that the data is cached.
Inheritance
Inherited Members
Namespace: Mediachase.Commerce.Marketing.Managers
Assembly: Mediachase.Commerce.dll
Version: 10.8.0Syntax
public static class PromotionManager
Methods
GetPromotionDto()
Loads all promotions.
Declaration
public static PromotionDto GetPromotionDto()
Returns
| Type | Description |
|---|---|
| PromotionDto |
GetPromotionDto(DateTime)
Gets promotion dto based on the date passed. Only promotions that are active for the period specified (plus 1 week) will be returned.
Declaration
public static PromotionDto GetPromotionDto(DateTime dateTime)
Parameters
| Type | Name | Description |
|---|---|---|
| System.DateTime | dateTime | The date time. |
Returns
| Type | Description |
|---|---|
| PromotionDto |
GetPromotionDto(Int32)
Gets the Promotion dto without caching the results.
Declaration
public static PromotionDto GetPromotionDto(int promotionId)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | promotionId | The promotion id. |
Returns
| Type | Description |
|---|---|
| PromotionDto |
GetPromotionUsageDto(Int32, Guid, Int32)
Gets the promotion usage dto. Results are not cached.
Declaration
public static PromotionUsageDto GetPromotionUsageDto(int promotionId, Guid customerId, int orderGroupId)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | promotionId | The promotion id. |
| System.Guid | customerId | The customer id. |
| System.Int32 | orderGroupId | The order group id. |
Returns
| Type | Description |
|---|---|
| PromotionUsageDto |
GetPromotionUsageStatistics()
Gets the promotion usage statistics.
Declaration
public static DataTable GetPromotionUsageStatistics()
Returns
| Type | Description |
|---|---|
| System.Data.DataTable |
GetPromotionUsageStatistics(Guid)
Gets the promotion usage statistics.
Declaration
public static DataTable GetPromotionUsageStatistics(Guid customerId)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Guid | customerId | The customer id. |
Returns
| Type | Description |
|---|---|
| System.Data.DataTable |
SavePromotion(PromotionDto)
Saves the promotion.
Declaration
public static void SavePromotion(PromotionDto dto)
Parameters
| Type | Name | Description |
|---|---|---|
| PromotionDto | dto | The dto. |
SavePromotionUsage(PromotionUsageDto)
Saves the promotion usage.
Declaration
public static void SavePromotionUsage(PromotionUsageDto dto)
Parameters
| Type | Name | Description |
|---|---|---|
| PromotionUsageDto | dto | The dto. |