private static string AmountType2String(RewardAmountType amountType)
        {
            var retVal = "$";

            if (amountType == RewardAmountType.Relative)
            {
                retVal = "%";
            }
            else if (amountType == RewardAmountType.Gift)
            {
                retVal = "free";
            }
            return(retVal);
        }
		private PromotionReward AddCatalogReward(Promotion promotion, decimal amount, RewardAmountType amountType)
		{
			var promotionReward = new CatalogItemReward
			{
				Amount = amount,
				AmountTypeId = amountType.GetHashCode(),
				PromotionId = promotion.PromotionId
			};

			MarketingRepository.Add(promotionReward);
			MarketingRepository.UnitOfWork.Commit();

			return promotionReward;
		}
Exemplo n.º 3
0
        private PromotionReward AddCatalogReward(Promotion promotion, decimal amount, RewardAmountType amountType)
        {
            var promotionReward = new CatalogItemReward
            {
                Amount       = amount,
                AmountTypeId = amountType.GetHashCode(),
                PromotionId  = promotion.PromotionId
            };

            MarketingRepository.Add(promotionReward);
            MarketingRepository.UnitOfWork.Commit();

            return(promotionReward);
        }
		private static string AmountType2String(RewardAmountType amountType)
		{
			var retVal = "$";
			if (amountType == RewardAmountType.Relative)
			{
				retVal = "%";
			}
			else if (amountType == RewardAmountType.Gift)
			{
				retVal = "free";
			}
			return retVal;
		}