/// <summary> /// /// </summary> /// <param name="promotionRequest"></param> /// <returns></returns> public virtual IRegisterPromotion CreateRegisterPromotion(MemberPromotion promotionRequest) { IRegisterPromotion promotion = null; switch (promotionRequest.PromoType) { case PromotionType.CSTORE: promotion = new RegisterCStorePromotion(); break; case PromotionType.ONLINE: promotion = new RegisterOnlinePromotion(); break; } return(promotion); }
/// <summary> /// /// </summary> /// <param name="registerPromotionRequest"></param> /// <returns></returns> public MemberPromotion RegisterPromotion(MemberPromotion registerPromotionRequest) { try { RegisterPromotion registerPromoBS = new RegisterPromotion(); this.iRegisterPromotion = registerPromoBS.CreateRegisterPromotion(registerPromotionRequest); var memberPromotion = this.iRegisterPromotion.RegisterPromotion(registerPromotionRequest); return(memberPromotion); } catch (Exception ex) { DBLogging.Error("Register Promotion", ex); throw; } }