private void SaveData() { //Library methods calls and processing if (objInstantWin == null) { objInstantWin = new InstantWinCondition(); } objInstantWin.RewardOptionId = RoId; objInstantWin.ProgramType = (rbtnRandom.Checked) ? InstantWinProgramType.Random : InstantWinProgramType.Sequential; objInstantWin.ChanceOfWinningEnterprise = rbtnListChanceOfWin.SelectedValue == "1" ? true : false; objInstantWin.ChanceOfWinning = ((objInstantWin.ProgramType == InstantWinProgramType.Random) ? tboxRandomUsr.Text.Trim() : tboxSequenceUsr.Text.Trim()).ConvertToInt32(); objInstantWin.NumPrizesAllowed = ((rbtnUnlimited.Checked) ? "" : tboxAwardLimitNumber.Text.Trim()).ConvertToInt32(); if (rbtnUnlimited.Checked) { objInstantWin.AwardLimitEnterprise = true; } else { objInstantWin.AwardLimitEnterprise = (rbtnListAwardLimit.SelectedValue == "1") ? true : false; } objInstantWin.Unlimited = rbtnUnlimited.Checked; objInstantWin.DisallowEdit = chkDisallow_Edit.Checked; objInstantWin.Deleted = false; AMSResult <bool> result = m_InstantWinService.CreateUpdateInstantWinCondition(objInstantWin, OfferID, CurrentUser.AdminUser.ID); if (result.ResultType == AMSResultType.Success) { m_OAWService.ResetOfferApprovalStatus(OfferID); //success notification and close popup RegisterScript("Close", "window.close();"); } }
private void SaveCouponReward() { AMSResult <bool> success; string historyString; SetCouponRewardData(); List <CouponTier> CouponTierList = SetCouponTierData(); couponReward.CouponTiers = CouponTierList; if (TCRewardID > 0) { historyString = PhraseLib.Lookup("term.edited", LanguageID) + " " + PhraseLib.Lookup("term.trackablecoupon", LanguageID).ToLower() + " " + PhraseLib.Lookup("term.reward", LanguageID).ToLower(); couponReward.CouponRewardID = TCRewardID; couponReward.DeliverableID = DeliverableID; success = m_CRService.UpdateCouponReward(OfferID, LanguageID, couponReward); } else { historyString = PhraseLib.Lookup("term.created", LanguageID) + " " + PhraseLib.Lookup("term.trackablecoupon", LanguageID).ToLower() + " " + PhraseLib.Lookup("term.reward", LanguageID).ToLower(); success = m_CRService.CreateCouponReward(OfferID, LanguageID, couponReward); } if (success.ResultType == AMSResultType.Success) { if (Offer.IsTemplate) { //time to update the status bits for the templates int form_Disallow_Edit = 0; string[] LockFieldsList = null; form_Disallow_Edit = chkDisallow_Edit.Checked == true ? 1 : 0; if (!string.IsNullOrEmpty(hdnLockedTemplateFields.Value)) { LockFieldsList = hdnLockedTemplateFields.Value.Split(','); m_Commondata.PurgeFieldLevelPermissions(AppName, Offer.OfferID, 0); m_Commondata.UpdateDeliverableAndFieldLevelPermissions(couponReward.DeliverableID.ConvertToInt32(), Offer.OfferID, form_Disallow_Edit, LockFieldsList); } else { m_Commondata.PurgeFieldLevelPermissions(AppName, Offer.OfferID, 0); } } m_OAWService.ResetOfferApprovalStatus(OfferID); m_ActivityLog.Activity_Log(ActivityTypes.Offer, OfferID, CurrentUser.AdminUser.ID, historyString); ScriptManager.RegisterStartupScript(this, this.GetType(), "Close", "CloseModel()", true); } else if (success.ResultType == AMSResultType.SQLException || success.ResultType == AMSResultType.Exception) { DisplayError(success.MessageString); } }
protected void btnSave_Click(object sender, EventArgs e) { try { if (!(lstSelected.Items.Count > 0)) { infobar.InnerText = "Please select at least one inclusion group"; infobar.Visible = true; return; } if (OfferEligibilePointsCondition == null) { OfferEligibilePointsCondition = new CMS.AMS.Models.PointsCondition(); } if (OfferEligibilePointsCondition.ConditionID == 0) { OfferEligibilePointsCondition.JoinTypeID = CMS.AMS.Models.JoinTypes.And; } if (chkDisallow_Edit.Visible) { OfferEligibilePointsCondition.DisallowEdit = chkDisallow_Edit.Checked; } OfferEligibilePointsCondition.Deleted = false; OfferEligibilePointsCondition.ConditionID = ConditionID; OfferEligibilePointsCondition.ConditionTypeID = ConditionTypeID; OfferEligibilePointsCondition.EngineID = EngineID; //OfferEligibilePointsCondition.PointsConditionID = PointsConditionID; OfferEligibilePointsCondition.RequiredFromTemplate = false; OfferEligibilePointsCondition.Quantity = txtValueNeeded.Text.ConvertToInt32(); OfferEligibilePointsCondition.ProgramID = lstSelected.Items[0].Value.ConvertToLong(); if (OfferEligibilePointsCondition.Quantity == 0) { infobar.InnerText = Copient.PhraseLib.Lookup("pointscondition.invalidValueNeeded", LanguageID); infobar.Visible = true; } else { m_Offer.CreateUpdateOfferEligiblePointsCondition(OfferID, EngineID, OfferEligibilePointsCondition); m_Offer.UpdateOfferStatusToModified(OfferID, EngineID, CurrentUser.AdminUser.ID); m_OAWService.ResetOfferApprovalStatus(OfferID); historyString = PhraseLib.Lookup("history.CustomerPointConditionEdit", LanguageID) + ":" + lstSelected.Items[0].Text + " requires " + txtValueNeeded.Text.ConvertToInt32(); WriteToActivityLog(); ScriptManager.RegisterStartupScript(this, this.GetType(), "Close", "CloseModel()", true); } } catch (Exception ex) { infobar.InnerText = ErrorHandler.ProcessError(ex); infobar.Visible = true; } }
protected void btnSave_Click(object sender, EventArgs e) { try { if (!(lstSelected.Items.Count > 0)) { infobar.InnerText = PhraseLib.Lookup("CPE-rew-membership.selectpoints", LanguageID); infobar.Visible = true; return; } if (OfferTCProgramCondition == null) { OfferTCProgramCondition = new TCProgramCondition(); } ConditionTypeID = m_TCProgramCondition.GetTCConditionTypeID(Engine); if (chkDisallow_Edit.Visible) { OfferTCProgramCondition.DisallowEdit = chkDisallow_Edit.Checked; } OfferTCProgramCondition.Deleted = false; OfferTCProgramCondition.ConditionID = ConditionID; OfferTCProgramCondition.ConditionTypeID = ConditionTypeID; OfferTCProgramCondition.EngineID = (int)Engine; OfferTCProgramCondition.RequiredFromTemplate = false; OfferTCProgramCondition.ProgramID = lstSelected.Items[0].Value.ConvertToLong(); m_Offer.CreateUpdateOfferTrackableCouponCondition(OfferID, Engine, OfferTCProgramCondition); // Only update the program expiration when the expiration feature is off // or the program expiration type is offer end date if (!bExpireDateEnabled || (IncludedTCProgram.TCExpireType == 1)) { m_TCProgram.UpdateTCProgramExpiryDate(OfferTCProgramCondition.ProgramID.ConvertToInt32(), Offer.EndDate); } m_Offer.UpdateOfferStatusToModified(OfferID, (int)Engine, CurrentUser.AdminUser.ID); m_OAWService.ResetOfferApprovalStatus(OfferID); historyString = PhraseLib.Lookup("history.CustomerTrackableCouponConditionEdit", LanguageID) + ":" + lstSelected.Items[0].Text; m_ActivityLog.Activity_Log(ActivityTypes.Offer, OfferID.ConvertToInt32(), CurrentUser.AdminUser.ID, historyString); ScriptManager.RegisterStartupScript(this, this.GetType(), "Close", "CloseModel()", true); } catch (Exception ex) { infobar.InnerText = ErrorHandler.ProcessError(ex); infobar.Visible = true; } }
/// <summary> /// Updates the Proximity Reward object and saves the data. /// </summary> private void UpdateObjectAndSave() { bool IsNewPMR = (objProximityMessage.Id == 0); objProximityMessage.ProximityMessageTiers.Clear(); objProximityMessage.RewardOptionPhase = Phase; objProximityMessage.RewardID = IsNewPMR ? 0 : RewardID; objProximityMessage.Required = false; objProximityMessage.RewardTypeID = (int)DELIVERABLE_TYPES.PROXIMITY_MESSAGE; objProximityMessage.ThresholdTypeId = Int32.Parse(ddlMessageType.SelectedValue); ProximityMessageTier tempProximityTierData; foreach (RepeaterItem pmItem in repProximityMsg.Items) { tempProximityTierData = new ProximityMessageTier(); TextBox tempAwayDataTextbox = pmItem.FindControl("awaydata") as TextBox; TextBox tempMessage = pmItem.FindControl("prmessage") as TextBox; tempProximityTierData.TriggerValue = tempAwayDataTextbox != null?Decimal.Parse(tempAwayDataTextbox.Text, CultureInfo.InvariantCulture) : Decimal.Parse("0"); tempProximityTierData.TierLevel = pmItem.ItemIndex + 1; if (IsMultiLanguageEnabled) { tempProximityTierData.PMTierTranslations = new List <ProximityMessageTierTranslation>(); ProximityMessageTierTranslation tempPMTierTranslation; string tempData = ""; for (int i = 0; i < Languages.Count; i++) { tempPMTierTranslation = new ProximityMessageTierTranslation(); tempData = Request.Form["repProximityMsg$ctl0" + pmItem.ItemIndex + "$repProximityMsgDesc$ctl0" + i + "$prmessage"]; if (i == 0) { tempProximityTierData.Message = tempData; } if (tempData != "") { tempPMTierTranslation.ProximityMessageTierId = tempProximityTierData.Id; tempPMTierTranslation.LanguageId = Languages[i].LanguageID; tempPMTierTranslation.Message = tempData; tempProximityTierData.PMTierTranslations.Add(tempPMTierTranslation); } } } else { tempProximityTierData.Message = Request.Form["repProximityMsg$ctl0" + pmItem.ItemIndex + "$repProximityMsgDesc$ctl00$prmessage"]; tempProximityTierData.PMTierTranslations = new List <ProximityMessageTierTranslation>(); } objProximityMessage.ProximityMessageTiers.Add(tempProximityTierData); } AMSResult <bool> result = m_ProximityMessageRewardService.CreateUpdateProximityMessageReward(objProximityMessage, OfferID.ConvertToLong(), 9, RewardOptionID); RewardID = objProximityMessage.RewardID.ConvertToInt32(); //save the templates permission if (objOffer.IsTemplate) { //time to update the status bits for the templates int form_Disallow_Edit = 0; string[] LockFieldsList = null; form_Disallow_Edit = ucTemplateLockableFields.RewardLockStatus == true ? 1 : 0; if (ucTemplateLockableFields.ExceptionFields != null) { LockFieldsList = ucTemplateLockableFields.ExceptionFields.Select(x => x.ToString()).ToArray(); m_Commondata.PurgeFieldLevelPermissions(AppName, objOffer.OfferID, RewardID); m_Commondata.UpdateDeliverableAndFieldLevelPermissions(RewardID, objOffer.OfferID, form_Disallow_Edit, LockFieldsList); LockFieldsList = ucTemplateLockableFields.RewardTemplateFieldSource.TemplateFieldList.Where(x => LockFieldsList.Contains(x.FieldId.ToString()) == false).Select(x => x.FieldId.ToString()).ToArray(); m_Commondata.UpdateDeliverableAndUnlockFieldLevelPermissions(RewardID, objOffer.OfferID, form_Disallow_Edit == 1 ? 0 : 1, LockFieldsList); } else { m_Commondata.PurgeFieldLevelPermissions(AppName, objOffer.OfferID, RewardID); } } if (result.ResultType == AMSResultType.Success) { m_Commondata.QueryStr = "update CPE_Incentives with (RowLock) set LastUpdate=getdate(), LastUpdatedByAdminID=" + CurrentUser.AdminUser.ID + ", StatusFlag=1 where IncentiveID=" + OfferID + ";"; m_Commondata.LRT_Execute(); m_OAWService.ResetOfferApprovalStatus(OfferID); RegisterScript("Close", "window.close();"); } }
private void Save() { bool isNewCondition = false; string strIncludedGroup = string.Empty; string strExcludedGroup = string.Empty; try { if (OfferEligibileCustomerGroupCondition.ConditionID == 0) { isNewCondition = true; } if (chkDisallow_Edit.Visible) { OfferEligibileCustomerGroupCondition.DisallowEdit = chkDisallow_Edit.Checked; } if (spnHouseHold.Visible) { OfferEligibileCustomerGroupCondition.HouseHoldEnabled = chkHouseHold.Checked; } if (spnOffline.Visible) { OfferEligibileCustomerGroupCondition.EvaluateOfflineCustomer = chkOffline.Checked; } //Updated Include List var deletedlist = OfferEligibileCustomerGroupCondition.IncludeCondition.Where(p => !IncludedGroup.Any(inc => inc.CustomerGroupID == p.CustomerGroupID)); foreach (CMS.AMS.Models.CustomerConditionDetails custdetail in deletedlist) { custdetail.Deleted = true; } historyString = PhraseLib.Lookup("history.con-customer-edit", LanguageID) + ": "; foreach (CMS.AMS.Models.CustomerGroup CustGroup in IncludedGroup) { if (!OfferEligibileCustomerGroupCondition.IncludeCondition.Exists(p => p.CustomerGroupID == CustGroup.CustomerGroupID)) { CMS.AMS.Models.CustomerConditionDetails condetail = new CMS.AMS.Models.CustomerConditionDetails(); condetail.CustomerGroupID = CustGroup.CustomerGroupID; OfferEligibileCustomerGroupCondition.IncludeCondition.Add(condetail); strIncludedGroup = strIncludedGroup + CustGroup.CustomerGroupID.ToString() + ","; } } historyString = historyString + strIncludedGroup.TrimEnd(','); //Update Exclude List exc var deletedexclist = OfferEligibileCustomerGroupCondition.ExcludeCondition.Where(p => !ExcludedGroup.Any(exc => exc.CustomerGroupID == p.CustomerGroupID)); foreach (CMS.AMS.Models.CustomerConditionDetails custdetail in deletedexclist) { custdetail.Deleted = true; } bool IsExcludedExist = false; foreach (CMS.AMS.Models.CustomerGroup CustGroup in ExcludedGroup) { if (!OfferEligibileCustomerGroupCondition.ExcludeCondition.Exists(p => p.CustomerGroupID == CustGroup.CustomerGroupID)) { CMS.AMS.Models.CustomerConditionDetails condetail = new CMS.AMS.Models.CustomerConditionDetails(); condetail.CustomerGroupID = CustGroup.CustomerGroupID; strExcludedGroup = strExcludedGroup + CustGroup.CustomerGroupID.ToString() + ","; OfferEligibileCustomerGroupCondition.ExcludeCondition.Add(condetail); IsExcludedExist = true; } } if (ExcludedConditionGroup != null) { //if it is a new condition then add excluded customer groups which are currently exist in regualr customer condition if (isNewCondition) { foreach (CMS.AMS.Models.CustomerGroup CustGroup in ExcludedConditionGroup) { if (!OfferEligibileCustomerGroupCondition.ExcludeCondition.Exists(p => p.CustomerGroupID == CustGroup.CustomerGroupID)) { CMS.AMS.Models.CustomerConditionDetails condetail = new CMS.AMS.Models.CustomerConditionDetails(); condetail.CustomerGroupID = CustGroup.CustomerGroupID; strExcludedGroup = strExcludedGroup + CustGroup.CustomerGroupID.ToString() + ","; OfferEligibileCustomerGroupCondition.ExcludeCondition.Add(condetail); IsExcludedExist = true; } } } else { //if it is an existing eligibility condition and user attempt to remove group from excluded condition which is exist in regular excluded condition then ask user to delete remove the same from regualr condition as well var mustExcludedList = deletedexclist.Where(p => ExcludedConditionGroup.Any(exc => exc.CustomerGroupID == p.CustomerGroupID)).Select(z => z.CustomerGroup); List <long> ExcludedGroupIds = new List <long>(); foreach (CustomerGroup item in mustExcludedList) { ExcludedGroupIds.Add(item.CustomerGroupID); } if (ExcludedGroupIds.Count > 0) { //Delete the excluded condition m_CustCondition.DeleteRegulerExcludedConditionsByCustomerGroupIDs(OfferID, EngineID, ExcludedGroupIds); } } } if (IsExcludedExist) { historyString = historyString + " " + PhraseLib.Lookup("term.excluding", LanguageID) + " " + strExcludedGroup.TrimEnd(','); } m_offer.CreateUpdateOfferEligibleCustomerCondition(OfferID, EngineID, OfferEligibileCustomerGroupCondition); if (isNewCondition) { CMS.AMS.Models.CustomerGroup CustomerGroup = new CMS.AMS.Models.CustomerGroup(); CustomerGroup.Name = string.Format(Constants.DEFAULT_OFFER_GROUP_NAME, hdnOfferName.Value); CustomerGroup.IsOptinGroup = true; m_CustGroup.CreateOptInCustomerGroup(CustomerGroup); CMS.AMS.Models.CustomerGroupConditions CustomerCondition = new CMS.AMS.Models.CustomerGroupConditions(); CustomerCondition.DisallowEdit = OfferEligibileCustomerGroupCondition.DisallowEdit; CustomerCondition.RequiredFromTemplate = OfferEligibileCustomerGroupCondition.RequiredFromTemplate; CustomerCondition.IncludeCondition = new List <CMS.AMS.Models.CustomerConditionDetails>(); CustomerCondition.IncludeCondition.Add(new CMS.AMS.Models.CustomerConditionDetails()); CustomerCondition.IncludeCondition[0].CustomerGroupID = CustomerGroup.CustomerGroupID; m_offer.CreateDefaultCustomerCondition(OfferID, EngineID, CustomerCondition); } m_offer.UpdateOfferStatusToModified(OfferID, EngineID, CurrentUser.AdminUser.ID); m_OAWService.ResetOfferApprovalStatus(OfferID); WriteToActivityLog(); ScriptManager.RegisterStartupScript(this, this.GetType(), "Close", "CloseModel()", true); } catch (Exception ex) { infobar.InnerText = ErrorHandler.ProcessError(ex); infobar.Visible = true; } }
protected void btnSave_Click(object sender, EventArgs e) { try { if (SelectedPreference == null) { DisplayError(PhraseLib.Lookup("ueoffer-con-pref.SelectPreference", LanguageID)); return; } if (PreferenceTierData == null || PreferenceTierData.Count == 0) { return; } List <PreferenceTiers> lstInvalidTierValues = (from p in PreferenceTierData where p.PreferenceItems.Count(pi => pi.Selected == true) == 0 select p).ToList(); if (lstInvalidTierValues.Count > 0) { DisplayError(String.Format(PhraseLib.Lookup("ueoffer-con-pref.SupplyTierValue", LanguageID), lstInvalidTierValues[0].TierLevel)); return; } /* if Preference allows mulitple values - should check min seleted values*/ if (!CheckValidationListMinValue()) { return; } if (OfferPreferenceReward != null) { } else { OfferPreferenceReward = new PreferenceReward(); } string historyString = PhraseLib.Lookup((OfferPreferenceReward.PreferenceRewardID == 0 ? "history.rew-pref-create" : "history.rew-pref-edit"), LanguageID) + ":" + SelectedPreference.PhraseText; if (TempDisallow.Visible) { OfferPreferenceReward.DisallowEdit = chkDisallow_Edit.Checked; } OfferPreferenceReward.Deleted = false; OfferPreferenceReward.PreferenceID = (Int64)SelectedPreference.PreferenceID; OfferPreferenceReward.RewardTypeID = 15; OfferPreferenceReward.RewardOptionId = RewardID; List <String> TierValues; if (OfferPreferenceReward.PreferenceRewardTiers == null) { OfferPreferenceReward.PreferenceRewardTiers = new List <PreferenceRewardTier>(); } for (int counter = OfferPreferenceReward.PreferenceRewardTiers.Count; counter < NumTiers; counter++) { PreferenceRewardTier rewardtier = new PreferenceRewardTier(); rewardtier.TierLevel = counter + 1; rewardtier.PreferenceRewardID = OfferPreferenceReward.PreferenceRewardID; rewardtier.PreferenceRewardTierValues = new List <PreferenceRewardTierValue>(); OfferPreferenceReward.PreferenceRewardTiers.Add(rewardtier); } PreferenceRewardTierValue rewardtierval; foreach (RepeaterItem item in rptTierValues.Items) { ListBox selecteditems = (ListBox)item.FindControl("lstSelectedPreference"); TierValues = selecteditems.Items.Cast <ListItem>().Select(i => i.Value).ToList(); PreferenceRewardTier rewardtier = OfferPreferenceReward.PreferenceRewardTiers.Where(p => p.TierLevel == (item.ItemIndex + 1)).FirstOrDefault(); if (OfferPreferenceReward.PreferenceRewardID > 0) { rewardtier.PreferenceRewardTierValues.RemoveAll(x => !TierValues.Contains(x.PreferenceValue)); } foreach (String preferencevalue in TierValues) { if (rewardtier.PreferenceRewardTierValues.Count(p => p.PreferenceValue == preferencevalue) == 0) { rewardtierval = new PreferenceRewardTierValue(); rewardtierval.PreferenceRewardTierID = (Int64)rewardtier.PreferenceRewardTierID; rewardtierval.PreferenceValue = preferencevalue; rewardtier.PreferenceRewardTierValues.Add(rewardtierval); } } } AMSResult <bool> SavePreferenceReward = m_PreferenceReward.CreateUpdatePreferenceReward(OfferID, OfferPreferenceReward); if (SavePreferenceReward.ResultType != AMSResultType.Success) { DisplayError(SavePreferenceReward.MessageString); return; } m_Offer.UpdateOfferStatusToModified(OfferID, (Int32)Engines.UE, CurrentUser.AdminUser.ID); m_OAWService.ResetOfferApprovalStatus(OfferID); m_ActivityLog.Activity_Log(ActivityTypes.Offer, OfferID.ConvertToInt32(), CurrentUser.AdminUser.ID, historyString); ScriptManager.RegisterStartupScript(this, this.GetType(), "Close", "CloseModel()", true); } catch (Exception ex) { DisplayError(ex); } }
private void CreateObjectAndSave() { bool isValid = true; bool isTextEntered = false; string errMsg = String.Empty; objPassThrough.TiersData.Clear(); objPassThrough.DisallowEdit = chkDisallow_Edit.Checked; objPassThrough.Required = chkRequiredToDeliver.Checked; foreach (RepeaterItem item in repXMLPassThroughData.Items) { Label lblTierLevel = item.FindControl("lblTierLevel") as Label; Label lblLanguageID = item.FindControl("lblLanguageID") as Label; TextBox txtData = item.FindControl("txtData") as TextBox; if (lblTierLevel != null && lblLanguageID != null && txtData != null) { string strXML = txtData.Text; if (!string.IsNullOrWhiteSpace(txtData.Text)) { isTextEntered = true; } if (txtData.Text.Trim() != string.Empty && !ValidateXML(txtData.Text)) { isValid = false; var lang = (from lan in lstLanguage where lan.LanguageID == lblLanguageID.Text.ConvertToInt32() select lan).SingleOrDefault(); if (objOffer.NumbersOfTier > 1) { errMsg = String.Format(PhraseLib.Lookup("term.invalidxmltier", LanguageID), lblTierLevel.Text, lang.Name); } else { errMsg = String.Format(PhraseLib.Lookup("term.invalidxml", LanguageID), lang.Name); } break; } //validate XML and then add it, if invalid display the message and abort the save PassThroughTier objTierData = new PassThroughTier(); objTierData.LanguageID = lblLanguageID.Text.ConvertToInt32(); objTierData.TierLevel = lblTierLevel.Text.ConvertToInt32(); objTierData.Data = txtData.Text.TrimEnd(Environment.NewLine.ToCharArray()).TrimStart(Environment.NewLine.ToCharArray()).Trim(); //Update Values RepeaterItem valItem = repValues.Items[objTierData.TierLevel - 1]; TextBox txtVal = valItem.FindControl("txtValue") as TextBox; if (txtVal != null) { objTierData.Value = txtVal.Text.ConvertToDecimal(); } objPassThrough.TiersData.Add(objTierData); } } if (!isTextEntered) { DisplayError(PhraseLib.Lookup("term.enterxmlpassthru", LanguageID)); return; } if (!isValid) { DisplayError(errMsg); return; } IsNewXMLPassThru = (objPassThrough.PassThroughID == 0); AMSResult <bool> result = m_PassThroughRewards.CreateUpdatePassThroughReward(objPassThrough, objOffer.OfferID, objOffer.EngineID); if (result.ResultType != AMSResultType.Success) { DisplayError(result.GetLocalizedMessage <bool>(LanguageID)); } else { Description = IsNewXMLPassThru ? "reward.createxmlpassthru" : "reward.editxmlpassthru"; m_OAWService.ResetOfferApprovalStatus(OfferID); WriteToActivityLog(PhraseLib.Lookup(Description, LanguageID)); ScriptManager.RegisterStartupScript(this, this.GetType(), "Close", "window.close();", true); } }