/// <summary> /// This method creates and populates PM related data. /// </summary> private void LoadPageData() { SetProximityMessageForLoad(); List <ProximityMessage> tempObjPM; if (!IsPostBack) { AMSResult <List <ProximityMessage> > tempPM = m_ProximityMessageRewardService.GetProximityMessageReward(OfferID, 9); if (tempPM.ResultType == AMSResultType.Success && tempPM.Result.Count > 0) { tempObjPM = tempPM.Result; if (PMID == 0) { if (PMCount == 0) { objProximityMessage = tempObjPM.FirstOrDefault(); if (objProximityMessage != null) { ThresholdTypeId = objProximityMessage.ThresholdTypeId; } } } else { objProximityMessage = tempObjPM.Where(p => p.Id == PMID).FirstOrDefault(); if (objProximityMessage != null) { ThresholdTypeId = objProximityMessage.ThresholdTypeId; } } } } UpdateUnitRelatedInformation(); LoadDefaultData(); }
protected void btnDelete_Click(Object sender, EventArgs e) { try { if (!String.IsNullOrEmpty(AssociateOfferID)) { DisplayError(PhraseLib.Lookup("tcpedit.programused", LanguageID)); return; } tcpService = CurrentRequest.Resolver.Resolve <ITrackableCouponProgramService>(); activityLogService = CurrentRequest.Resolver.Resolve <IActivityLogService>(); AMSResult <bool> retVal = tcpService.DeleteTrackableCouponProgram(Convert.ToInt32(ProgramID)); if (retVal.ResultType != AMSResultType.Success) { DisplayError(retVal.GetLocalizedMessage <bool>(LanguageID)); } else { activityLogService.Activity_Log(ActivityTypes.TCProgram, ProgramID.ConvertToInt32(), CurrentUser.AdminUser.ID, String.Concat(PhraseLib.Lookup("term.trackablecouponprogram", LanguageID), " ", PhraseLib.Lookup("term.deleted", LanguageID))); Response.Redirect("~/logix/tcp-list.aspx", false); } } catch (Exception ex) { DisplayError(ErrorHandler.ProcessError(ex)); } }
private static string LogMessage <T>(this AMSResult <T> source) { string strerror = string.Empty; switch (source.ResultType) { case AMSResultType.Warning: logger.WriteWarn(source.MessageString); break; case AMSResultType.Unknown: logger.WriteError(source.MessageString); break; case AMSResultType.ValidationError: logger.WriteError(source.MessageString); break; case AMSResultType.Exception: strerror = errorHandler.ProcessError(source.MessageString); break; case AMSResultType.SQLException: strerror = errorHandler.ProcessError(source.MessageString); break; } return(strerror); }
protected void btnDelete_Click(object sender, EventArgs e) { try { foreach (GridViewRow row in gvCouponList.Rows) { CheckBox cb = (CheckBox)row.FindControl("chkSelect"); if (cb.Checked == true) { bool LockStatus = Convert.ToBoolean(gvCouponList.DataKeys[row.DataItemIndex].Values[1].ToString()); long CouponID = Convert.ToInt64(gvCouponList.DataKeys[row.DataItemIndex].Values[0].ToString()); trackableCouponProgram = CurrentRequest.Resolver.Resolve <ITrackableCouponService>(); AMSResult <bool> objResult = trackableCouponProgram.DeleteTrackableCouponById(CouponID); if (objResult.ResultType != AMSResultType.Success) { DisplayError(ErrorHandler.ProcessError(objResult.GetLocalizedMessage(LanguageID))); gvCouponList.DataSource = null; gvCouponList.DataBind(); } GetSortingText(); GetSearchText(); FetchData(0); } } } catch (Exception ex) { DisplayError(ErrorHandler.ProcessError(ex)); } }
protected void btnCancelDeploy_Click(object sender, EventArgs e) { try { var ajaxProcessingFunctions = new AjaxProcessingFunctions(); AMSResult <Boolean> response = ajaxProcessingFunctions.UpdateCollideOfferStatus(iOfferID_CDS, 2); if (response.ResultType == AMSResultType.Success) { canceldeploy.Attributes["style"] = "display: none;"; infobar.Attributes["style"] = ""; infobar.InnerText = PhraseLib.Lookup("term.collisiondetectioncancelled", LanguageID); statusbar.Attributes["style"] = "display: none;"; if (hdnIsPGEmptyAfterResolution.Value == "true") { rdResolution.Items[0].Attributes.Add("Disabled", ""); } } else { infobar.Attributes["style"] = ""; infobar.InnerText = response.MessageString; } } catch (Exception ex) { infobar.Attributes["style"] = ""; infobar.InnerText = ex.Message; } }
private void BindOffer(int offerId) { ICollisionDetectionService collisionService; AMSResult <CMS.AMS.Models.OCD.Offer> lst = new AMSResult <CMS.AMS.Models.OCD.Offer>(); collisionService = CurrentRequest.Resolver.Resolve <ICollisionDetectionService>(); lst = collisionService.GetOfferDetail(offerId); if (lst.ResultType == AMSResultType.Success) { obj = new CMS.AMS.Models.OCD.Offer(); obj = (CMS.AMS.Models.OCD.Offer)lst.Result; if (obj != null) { lblOfferName.Text = MyCommon.TruncateString(obj.IncentiveName, 37); if (!string.IsNullOrEmpty(obj.BuyerID)) { lblBID.Text = obj.BuyerID.ToString(); } lblDescription.Text = obj.OfferDescription; lblEndDate.Text = obj.EndDate.ToString("MM/dd/yy"); lblExtID.Text = obj.ClientOfferID; lblName.Text = obj.IncentiveName; lblStartDate.Text = obj.StartDate.ToString("MM/dd/yy"); lblID.Text = obj.IncentiveID.ToString(); lblReportDate.Text = obj.CollisionRanOn.ToString(); } else { Response.Redirect("CollidingOffers-list.aspx"); } } }
protected void Page_Load(object sender, EventArgs e) { infobar.InnerHtml = statusbar.InnerHtml = ""; infobar.Visible = statusbar.Visible = false; (this.Master as logix_LogixMasterPage).Tab_Name = "8_4"; AssignPageTitle("term.attributepg-builderconfiguration"); SetPageData(); ResolveDependencies(); btnSave.Enabled = m_Common.Fetch_UE_SystemOption(157) == "1"; if (!IsPostBack) { LoadData(); SetButtons(); amsResultHierarchyLevels = m_ProductService.GetProductHierarchyLevels(); if (amsResultHierarchyLevels.ResultType != AMSResultType.Success) { DisplayError(amsResultHierarchyLevels.MessageString); } else { LoadProdHierarchyLevels(); SetGroupingControls(); ShowPreviousLevelUpdateStatus(); } } }
private void SetHeader() { time.Attributes.Add("title", DateTime.Now.ToString(@"HH:mm:ss, G\MT zzz")); time.InnerText = DateTime.Now.ToString("HH:mm") + " | "; if (AunthUI.Handheld) { date.InnerText = DateTime.Now.ToShortDateString() + " | "; } else { date.InnerText = DateTime.Now.ToLongDateString() + " | "; } string Name = AunthUI.CurrentUser.AdminUser.Name; useredit.HRef = "/logix/user-edit.aspx?UserID=" + AunthUI.CurrentUser.AdminUser.ID; useredit.InnerText = (Name.Length > 20 ? Name.Substring(0, 19) + "..." : Name); if (!string.IsNullOrEmpty(Tab_Name)) { IAppMenuService AppMenuSvc = CurrentRequest.Resolver.Resolve <IAppMenuService>(); AMSResult <AppMenu> result = AppMenuSvc.GetApplicationMenus(AunthUI.CurrentUser, Tab_Name, Request.QueryString); if (result.ResultType != AMSResultType.Success) { lblErrorMsg.Text = result.GetLocalizedMessage(AunthUI.LanguageID); return; } AppMenu appMenu = result.Result; AppMenuEventArg e = new AppMenuEventArg(); e.AppMenu = appMenu; if (OnOverridePageMenu != null) { OnOverridePageMenu(this, e); } SetUpMenu(e.AppMenu); } }
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();"); } }
protected void Approve_Click(object sender, EventArgs e) { try { int approvalType = 13; GridViewRow gvRow = (GridViewRow)((Button)sender).NamingContainer; long offer_Id = ((Label)gvRow.FindControl("ID")).Text.ConvertToLong(); AMSResult <bool> isOCDEnabledResult = offerService.IsCollisionDetectionEnabled(Engines.UE, offer_Id); if (isOCDEnabledResult.ResultType == AMSResultType.Success && isOCDEnabledResult.Result == true) { isOCDEnabled = true; } AMSResult <int> approvalTypeResult = oawService.GetOfferStatusFlag(offer_Id); if (approvalTypeResult.ResultType == AMSResultType.Success) { approvalType = approvalTypeResult.Result; } CallScript("ApproveOffer", "ApproveOffer(" + "'" + offer_Id + "'" + ", " + "'" + approvalType + "'" + ")"); } catch (Exception ex) { m_logger.WriteCritical(ex.ToString()); DisplayError(PhraseLib.Lookup("error.checklogs", LanguageID)); } }
protected void reject_Click(object sender, EventArgs e) { string rejectionMsg = string.Empty; if (Request.Form["rejectText"].ToString().Trim() != "") { rejectionMsg = Request.Form["rejectText"].ToString().Trim(); } AMSResult <bool> offerRejected = oawService.RejectOffer(OfferID.Value.ConvertToLong(), adminUserID, rejectionMsg); if (offerRejected.Result) { string logMessage = Copient.PhraseLib.Lookup("term.offer-rejected", LanguageID); if (rejectionMsg != "") { logMessage = logMessage + " " + Copient.PhraseLib.Lookup("term.rejectionreason", LanguageID) + ": " + rejectionMsg; } mCommon.Activity_Log(3, OfferID.Value.ConvertToLong(), adminUserID, logMessage); FilterOffers(); } else { DisplayError(PhraseLib.Lookup("error.checklogs", LanguageID)); } CallScript("hideRejectConfirmation", "hideRejectConfirmation()"); }
private void LevelUpdateCallBack(object state) { //object[] objParams = state as object[]; DataTable dtHL = state as DataTable; string extHierarchyID = string.Empty; Int16 groupingLevel = 0; ResolverBuilder requestResolver = new ResolverBuilder(); try { requestResolver.Build(); requestResolver.Container.RegisterType <IProductService, ProductService>(new HierarchicalLifetimeManager()); IProductService ps = requestResolver.Container.Resolve <IProductService>(); foreach (DataRow row in dtHL.Rows) { extHierarchyID = row["ExtHierarchyID"].ToString(); groupingLevel = row["LevelInHierarchy"].ConvertToInt16(); AMSResult <bool> amsResult = m_ProductService.UpdateHierarchyLevel(extHierarchyID, groupingLevel); if (amsResult.ResultType != AMSResultType.Success) { infobar.Visible = true; infobar.InnerHtml = PhraseLib.Lookup("pab.config.levelupdateerror", LanguageID) + ": " + amsResult.MessageString; } } } catch (Exception ex) { infobar.Visible = true; infobar.InnerHtml = PhraseLib.Lookup("pab.config.levelupdateerror", LanguageID) + ": " + ex.Message; } }
private int GetCollisionCount(long offerID) { int count = 0; AMSResult <int> reportCount = offerService.GetCollidingOfferCount(offerID, adminUserID, 9); if (reportCount.ResultType == AMSResultType.Success && reportCount.Result > 0) { count = reportCount.Result; } return(count); }
private void LoadData() { AMSResult <List <AttributeType> > AttributeTypes = m_AttributeService.GetAllAttributeTypes(); if (AttributeTypes.ResultType != AMSResultType.Success) { DisplayError(AttributeTypes.MessageString); return; } SetAvailableData(AttributeTypes.Result); }
private void GetAllPreferences() { Int32 PageSize = 100; AMSResult <List <Preference> > lstPreference = m_Preference.GetPreferences(PageSize, functioninput.Text, functionradio1.Checked, LanguageID); if (lstPreference.ResultType != AMSResultType.Success) { DisplayError(lstPreference.MessageString); return; } AllPreferences = lstPreference.Result; }
private bool LoadPreferenceDataTypes() { AMSResult <List <PreferenceDataTypes> > preferencedatatypes = m_Preference.GetPreferenceDataTypes(LanguageID); if (preferencedatatypes.ResultType != AMSResultType.Success) { DisplayError(preferencedatatypes.MessageString); return(false); } lstPreferenceDataTypes = preferencedatatypes.Result; return(true); }
private void GetUsersWithDeploymentPermission() { AMSResult <List <OfferApprover> > result = m_OAWServices.GetUsersWithDeploymentPermission((isBannerEnabled) ? bannerddl.SelectedValue.ConvertToInt32() : 0); if (result.ResultType == AMSResultType.Success) { AllUsersWithDeploymentPermission = result.Result; } else { DisplayError(PhraseLib.Lookup("error.fetching-users", LanguageID)); } }
private void GetAllTCProgram() { int RecordCount = 100; string SearchText = GetSearchText(); AMSResult <List <TrackableCouponProgram> > AllTCProgram = m_TCProgram.GetAllTrackableCouponPrograms(RecordCount, SearchText, functionradio1.Checked); if (AllTCProgram.ResultType != AMSResultType.Success) { AvailableFilteredTCProgram = new List <TrackableCouponProgram>(); DisplayError(AllTCProgram.GetLocalizedMessage(LanguageID)); } AvailableFilteredTCProgram = AllTCProgram.Result; }
private void GetAllTCProgram() { int RecordCount = 100; AMSResult <List <TrackableCouponProgram> > AllTCProgram = m_TCProgram.GetAvailableTrackableCouponPrograms(RecordCount, functioninput.Text, functionradio1.Checked); if (AllTCProgram.ResultType != AMSResultType.Success) { AvailableFilteredTCProgram = new List <TrackableCouponProgram>(); infobar.Visible = true; infobar.InnerHtml = AllTCProgram.GetLocalizedMessage(LanguageID); } AvailableFilteredTCProgram = AllTCProgram.Result; }
// validating password from change password page private void ValidatePassword() { string confirmnewpassword = ConfirmNewPassword.Text; string currentpassword = CurrentPassword.Text; DataTable dt = m_adminUserDataService.GetAdminUserIDbyUserName(Username, currentpassword); if (dt.Rows.Count > 0) { string username = dt.Rows[0]["UserName"].ToString(); //Validating Password if (ConfirmNewPassword.Text != NewPassword.Text) { DisplayError(PhraseLib.Lookup("term.Passwordmatch", LanguageID)); return; } AMSResult <bool> u_Passwordvalid = m_adminUserDataService.ValidatePassword(confirmnewpassword, username, LanguageID, true); if (!(u_Passwordvalid.ResultType == AMSResultType.Success)) { infobar.Attributes["class"] = "red-background"; DisplayError(u_Passwordvalid.MessageString); } else { //updating Password AMSResult <bool> u_Passwordvalidupdate = m_adminUserDataService.UpdatePasswordLogin(confirmnewpassword, username, LanguageID); if (u_Passwordvalidupdate.ResultType == AMSResultType.Success) { infobar.Attributes["class"] = "green-background"; DisplayError(u_Passwordvalidupdate.MessageString); Continue.Visible = true; CurrentPassword.Enabled = false; NewPassword.Enabled = false; ConfirmNewPassword.Enabled = false; ChangePasswordPushButton.Enabled = false; CancelPushButton.Enabled = false; } else { infobar.Attributes["class"] = "red-background"; DisplayError(u_Passwordvalidupdate.MessageString); } } } else { infobar.Attributes["class"] = "red-background"; DisplayError(PhraseLib.Lookup("term.invalidpassword", LanguageID)); } }
/// <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(); } }
private void populateCardTypeWithRange() { AMSResult <List <CMS.AMS.Models.CardType> > lstCardTypesHavingRange = m_CardTypeService.GetAllNumericCardTypesWithRange(); if (lstCardTypesHavingRange.ResultType == AMSResultType.SQLException || lstCardTypesHavingRange.ResultType == AMSResultType.Exception) { statusbar.Attributes.Add("style", "display:none"); infobar.Attributes.Add("display", "block"); infobar.InnerText = lstCardTypesHavingRange.MessageString; return; } repCardType.DataSource = lstCardTypesHavingRange.Result; repCardType.DataBind(); }
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(); } }
private void IsPGEmptyAfterResolution() { m_CollisionDetectionService = CurrentRequest.Resolver.Resolve <ICollisionDetectionService>(); AMSResult <bool> status = m_CollisionDetectionService.IsPGEmptyAfterResolution(1, Convert.ToInt32(lblOfferID.Text)); if (CurrentUser.UserPermissions.EditOffer == true && status.Result == true) { RegisterScript("OfferChangeStatus", "javascript:PGEmptyAfterResolution();"); hdnIsPGEmptyAfterResolution.Value = "true"; } else if (CurrentUser.UserPermissions.EditOffer == false && status.Result == true) { RegisterScript("OfferChangeStatus", "javascript:NoEditPermission();"); } }
private List <CMS.AMS.Models.Offer> GetAttachedOffersByID(Int32 pID) { offerService = CurrentRequest.Resolver.Resolve <IOffer>(); AMSResult <List <CMS.AMS.Models.Offer> > offerResObj = offerService.GetofferByTrackableProgramID(pID); if (offerResObj.ResultType != AMSResultType.Success) { DisplayError(offerResObj.GetLocalizedMessage <List <CMS.AMS.Models.Offer> >(LanguageID)); return(null); } else { return((List <CMS.AMS.Models.Offer>)offerResObj.Result); } }
private TrackableCouponProgram GetProgramByID(Int32 pID) { tcpService = CurrentRequest.Resolver.Resolve <ITrackableCouponProgramService>(); AMSResult <TrackableCouponProgram> tcProgram = SystemCacheData.GetSystemOption_UE_ByOptionId(152) == "0" ? tcpService.GetTrackableCouponProgramById(pID) : tcpService.GetTrackableCouponProgramById(pID, true); if (tcProgram.ResultType != AMSResultType.Success) { DisplayError(tcProgram.GetLocalizedMessage <TrackableCouponProgram>(LanguageID)); return(null); } else { return((TrackableCouponProgram)tcProgram.Result); } }
private void RemoveUserApprovers(string removeApprovers = "") { int adminUserId = lstAvailable.SelectedValue.ConvertToInt32(); int bannerId = (isBannerEnabled) ? bannerddl.SelectedValue.ConvertToInt32() : 0; AMSResult <bool> recordUpdated = m_OAWServices.RemoveApproverForAUser(removeApprovers, bannerId, adminUserId); if (recordUpdated.ResultType == AMSResultType.Success) { DisplaySuccessMsg(PhraseLib.Lookup("info.approverselection-updated", LanguageID)); } else { DisplayError(PhraseLib.Lookup("error.offerapproval-update", LanguageID)); } }
//public static AMSResult<P> Convert<T,P>(this AMSResult<T> source) where P : T //{ // AMSResult<P> result = new AMSResult<P>(); // result.MessageString = source.MessageString; // result.ParameterList = source.ParameterList; // result.PhraseString = source.PhraseString; // result.ResultType = source.ResultType; // result.Result = source.Result as P; //} public static string GetLocalizedMessage <T>(this AMSResult <T> source, int LanguageID) { ResolveDependencies(); // default error message string localizedError = phraseLib.Lookup("term.UnknownError", LanguageID); if (source.ResultType != AMSResultType.Success && !string.IsNullOrEmpty(source.PhraseString)) { // TODO eventually move this into a custom resource manager // See if there is a terminal specific resource string resourceString = phraseLib.Lookup(source.PhraseString, LanguageID); // If the resource key isn't present in the resources then it returns an empty string if (!string.IsNullOrEmpty(resourceString)) { try { if (source.ParameterList == null || source.ParameterList.Count() == 0) { localizedError = resourceString; } else { localizedError = string.Format(resourceString, source.ParameterList.ToArray()); } } catch (FormatException ex) { logger.WriteCritical(string.Format("{0} - {1} - {2}", System.Reflection.MethodBase.GetCurrentMethod().ReflectedType.FullName, System.Reflection.MethodBase.GetCurrentMethod().Name, ex)); } } else { logger.WriteError(string.Format("Unable to find resource named '{0}' in Phrase Lib", source.PhraseString)); } } string err = LogMessage <T>(source); if (!string.IsNullOrEmpty(err)) { localizedError = err; } return(localizedError); }
private void FillExpirePeriodType() { tcpService = CurrentRequest.Resolver.Resolve <ITrackableCouponProgramService>(); AMSResult <List <TrackableCouponExpirePeriodType> > lstExpirePeriodTypes = tcpService.GetTrackableCouponExpirePeriodTypes(); if (lstExpirePeriodTypes.ResultType != AMSResultType.Success) { DisplayError(lstExpirePeriodTypes.GetLocalizedMessage <List <TrackableCouponExpirePeriodType> >(LanguageID)); return; } ddlExpirePeriodTypes.DataSource = (from item in lstExpirePeriodTypes.Result select new { Text = PhraseLib.Lookup(item.PhraseID, LanguageID).Replace("'", "'"), Value = item.TCExpirePeriodTypeID.ToString() }).ToList(); ddlExpirePeriodTypes.DataTextField = "Text"; ddlExpirePeriodTypes.DataValueField = "Value"; ddlExpirePeriodTypes.DataBind(); }
private void GetApproversForAUser() { AMSResult <List <OfferApprover> > offerApprovers = m_OAWServices.GetOfferApprovers(lstAvailable.SelectedValue.ConvertToInt32(), (isBannerEnabled) ? bannerddl.SelectedValue.ConvertToInt32() : 0); if (offerApprovers.ResultType == AMSResultType.Success) { if (offerApprovers.Result != null) { IncludedOfferApprovers = offerApprovers.Result; } } else { DisplayError(PhraseLib.Lookup("error.fetching-approvers", LanguageID)); } }