public static webModel.PromotionReward ToWebModel(this coreModel.PromotionReward reward) { var retVal = new webModel.PromotionReward(); retVal.InjectFrom(reward); retVal.RewardType = reward.GetType().Name; return(retVal); }
public PromotionReward[] GetRewards() { var retVal = new PromotionReward[] { }; if (Children != null) { retVal = Children.OfType<IRewardExpression>().SelectMany(x => x.GetRewards()).ToArray(); } return retVal; }
//Copy constructor protected PromotionReward(PromotionReward other) { IsValid = other.IsValid; Description = other.Description; CouponAmount = other.CouponAmount; Coupon = other.Coupon; CouponMinOrderAmount = other.CouponMinOrderAmount; Promotion = other.Promotion; }
//Copy constructor protected PromotionReward(PromotionReward other) { IsValid = other.IsValid; Description = other.Description; CouponAmount = other.CouponAmount; Coupon = other.Coupon; CouponMinOrderAmount = other.CouponMinOrderAmount; Promotion = other.Promotion; IsExclusive = other.IsExclusive; }