private void LoadOfferSettings() { Offer = m_Offer.GetOffer(OfferID, LoadOfferOptions.None); Engine = (Engines)Offer.EngineID; IsTemplate = Offer.IsTemplate; FromTemplate = Offer.FromTemplate; }
private void LoadOfferSettings() { Offer = m_Offer.GetOffer(OfferID, LoadOfferOptions.None); // IsTemplate = Offer.IsTemplate; // FromTemplate = Offer.FromTemplate; NumTiers = Offer.NumbersOfTier; }
public void GivenProductWithAssociatedOffer_WhenGetOfferCalled_ThenReturnsExpectedFunc() { // Arrange IOffer productWithOffer = CreateProductWithAssociatedOffer(); // Act var offerProduct = productWithOffer.GetOffer(); // Assert Assert.That(offerProduct, Is.InstanceOf(typeof(Func <IProduct, uint, IProduct>))); }
/// <summary> /// This function is called when proximity message reward is selected. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void Page_Load(object sender, EventArgs e) { AMSResult <SystemOption> objResult = SystemSettings.GetGeneralSystemOption(125); bEnableRestrictedAccessToUEOfferBuilder = MyCommon.Fetch_SystemOption(249) == "1" ? true : false; if (objResult.ResultType == AMSResultType.Success) { Int32.TryParse(objResult.Result.OptionValue, out CustomerFacingLangID); } ResolveDependencies(); GetQueryString(); DefaultLanguageID = SystemSettings.GetSystemDefaultLanguage().LanguageID; IsMultiLanguageEnabled = SystemSettings.IsMultiLanguageEnabled(); if (objOffer == null) { if (OfferID == 0) { //DisplayError(PhraseLib.Lookup("error.invalidoffer", LanguageID)); return; } m_Commondata.QueryStr = "select RewardOptionId from CPE_RewardOptions where IncentiveID = " + OfferID; var result = m_Commondata.LRT_Select(); if (result.Rows.Count > 0) { RewardOptionID = result.Rows[0][0].ConvertToInt32(); } objOffer = m_Offer.GetOffer(OfferID, CMS.AMS.Models.LoadOfferOptions.AllRegularConditions); GetOfferRelatedData(); Languages = SystemSettings.GetAllActiveLanguages((Engines)objOffer.EngineID); AssignHiddenFieldLanguages(); } ucTemplateLockableFields.OfferId = OfferID; if (PMID != 0) { ucTemplateLockableFields.DeliverableId = RewardID; } if (!IsPostBack) { CheckPermissions(); SetupAndLocalizePage(); LoadPageData(); ApplyPermissions(); Page.Header.DataBind(); EnableDisableTemplateFields(); } }
protected void Page_Load(object sender, EventArgs e) { ResolveDependencies(); GetQueryString(); //LanguageID = SystemSettings.GetSystemDefaultLanguage().LanguageID; Image1.AlternateText = PhraseLib.Lookup("term.reload", LanguageID); Image1.ToolTip = PhraseLib.Lookup("term.reload", LanguageID); if (OfferID == 0) { DisplayError(PhraseLib.Lookup("error.invalidoffer", LanguageID)); return; } if (objOffer == null) { objOffer = m_Offer.GetOffer(OfferID, CMS.AMS.Models.LoadOfferOptions.CustomerCondition); if (objOffer == null) { DisplayError(PhraseLib.Lookup("error.invalidoffer", LanguageID)); return; } lstLanguage = SystemSettings.GetAllActiveLanguages((Engines)objOffer.EngineID); RoId = GetOfferRewardOptionID(OfferID); } if (!IsPostBack) { AMSResult <InstantWinCondition> result = m_InstantWinService.GetInstantWinCondition(RoId); if (result.ResultType == AMSResultType.Success) { objInstantWin = result.Result; if (objInstantWin == null) { objInstantWin = new InstantWinCondition(); objInstantWin.ProgramType = InstantWinProgramType.Random; } hdnInstantWinID.Value = objInstantWin.IncentiveInstantWinID.ToString(); } else { hdnInstantWinID.Value = ""; DisplayError(result.GetLocalizedMessage <InstantWinCondition>(LanguageID)); return; } GetInstantWinData(); AssignPhrases(); LoadIWUI(); } }
protected void Page_Load(object sender, EventArgs e) { ResolveDependencies(); GetQueryString(); Int32.TryParse(MyCommon.Fetch_SystemOption(125), out CustomerFacingLangID); if (objOffer == null) { if (OfferID == 0) { DisplayError("Invalid Offer ID"); return; } objOffer = m_Offer.GetOffer(OfferID, CMS.AMS.Models.LoadOfferOptions.CustomerCondition); bEnableRestrictedAccessToUEOfferBuilder = MyCommon.Fetch_SystemOption(249) == "1" ? true : false; isTranslatedOffer = MyCommon.IsTranslatedUEOffer(OfferID, MyCommon); bEnableAdditionalLockoutRestrictionsOnOffers = MyCommon.Fetch_SystemOption(260) == "1" ? true : false; bOfferEditable = MyCommon.IsOfferEditablePastLockOutPeriod(CurrentUser.UserPermissions.EditOfferPastLockoutPeriod, MyCommon, OfferID); } SetUpAndLocalizePage(); CheckPermission(); if (!IsPostBack) { if (DeliverableID != 0) { AMSResult <PassThrough> result = m_PassThroughRewards.GetPassThroughReward(DeliverableID, objOffer.EngineID); if (result.ResultType == AMSResultType.Success) { objPassThrough = result.Result; } else { DisplayError(result.GetLocalizedMessage <PassThrough>(LanguageID)); return; } } LoadPageData(); } DisableControls(); }
protected void Page_Load(object sender, EventArgs e) { ResolveDependencies(); GetQueryStrings(); if (objOffer == null) { if (OfferID == 0) { DisplayError(PhraseLib.Lookup("error.invalidoffer", LanguageID)); return; } objOffer = m_Offer.GetOffer(OfferID, CMS.AMS.Models.LoadOfferOptions.CustomerCondition); } AssignPageTitle("mediatype.imgurl"); if (!IsPostBack) { SetControlText(); if (DeliverableID != 0) { AMSResult <PassThrough> result = m_PassThroughRewards.GetPassThroughReward(DeliverableID, objOffer.EngineID); if (result.ResultType == AMSResultType.Success) { objPassThrough = result.Result; } else { DisplayError(result.GetLocalizedMessage <PassThrough>(LanguageID)); return; } BindImageUrl(); } SetPassThroughForLoad(); } HideDisplayInfoMsg(); PreviewImg.Visible = false; }
private void LoadEligibilityConditions() { objOffer = m_Offer.GetOffer(OfferID, LoadOfferOptions.OfferDetail | LoadOfferOptions.AllEligibilityConditions); }