/// <summary> /// /// </summary> protected void Page_Load(object sender, EventArgs e) { if (this.Page.Request.UrlReferrer != null && this.Page.Request.UrlReferrer.AbsolutePath.IndexOf("/Frames/Outlook/") >= 0 || __isOutlook.Value == "1") { __isOutlook.Value = "1"; } string copyR = PXVersionInfo.Copyright; String version = PXMessages.LocalizeFormatNoPrefix(PX.AscxControlsMessages.PageTitle.Version, PXVersionInfo.Version); if (!PX.Data.Update.PXUpdateHelper.VersionsEquals()) { version = "<b style=\"color:red\">" + version + "</b>"; } if (!PX.Data.Update.PXUpdateHelper.ChectUpdateStatus()) { version = "<b style=\"color:red\">" + version + "</b>"; } lblCopy.Text = PXMessages.LocalizeNoPrefix(copyR) + "<br>Acumatica " + PXVersionInfo.ProductVersion + "<br>" + version; string cstProjects = Customization.CstWebsiteStorage.PublishedProjectList; if (!string.IsNullOrEmpty(cstProjects)) { this.lblCstProjects.Visible = true; this.lblCstProjects.Text = string.Format("Customized: {0}", cstProjects.Replace(",", ", ")); } this.CorrectCssUrl(); }
public static PXSettings GetSettings(Page page) { PXSettings settings = new PXSettings { NamedLinks = false, EditLinkText = PXMessages.LocalizeNoPrefix(Messages.Edit), CloseLinkText = PXMessages.LocalizeNoPrefix(Messages.Close), DefaultStylesPath = page.ResolveUrl/**/ ("~/App_Themes/Wiki.css"), GetCSSUrl = page.ResolveUrl/**/ ("~/App_Themes/GetCSS.aspx"), ArticleShowUrl = page.ResolveUrl/**/ ("~/Wiki/ShowWiki.aspx"), GetFileUrl = page.ResolveUrl/**/ ("~/Frames/GetFile.ashx"), FileEditUrl = page.ResolveUrl/**/ ("~/Pages/SM/SM202510.aspx"), GetRSSUrl = page.ResolveUrl/**/ ("~/Frames/GetRSS.ashx"), HintImageUrl = PXImages.ResolveImageUrl("~/App_Themes/Default/Images/Wiki/info.png"), WarnImageUrl = PXImages.ResolveImageUrl("~/App_Themes/Default/Images/Wiki/Warn.png"), MagnifyImageUrl = PXImages.ResolveImageUrl("~/App_Themes/Default/Images/Wiki/magnify.png"), DefaultExtensionImage = PXImages.ResolveImageUrl("~/App_Themes/Default/Images/Wiki/binary.gif"), RSSImageUrl = PXImages.ResolveImageUrl("~/App_Themes/Default/Images/Wiki/rss.gif"), FilesDirectAccess = true }; foreach (UploadAllowedFileTypes ext in SitePolicy.AllowedFileTypes) { if (!string.IsNullOrEmpty(ext.IconUrl) && !settings.ExtensionsImages.ContainsKey(ext.FileExt.ToLower())) { settings.ExtensionsImages.Add(ext.FileExt.ToLower(), page.ResolveUrl/**/ (ext.IconUrl)); } } return(settings); }
/// <summary> /// Searches for Rate based on RateCode, PriceClass and Transaction properties. /// Rate is first searched for the given PriceClass; if not found it is then searched in BasePriceClass. /// </summary> public decimal?GetRate(string rateTableID) { if (string.IsNullOrEmpty(rateTableID)) { throw new ArgumentNullException(nameof(rateTableID), PXMessages.LocalizeNoPrefix(Messages.ArgumentIsNullOrEmpty)); } trace = new StringBuilder(); trace.AppendFormat("Calculating Rate. RateTable:{0}", rateTableID); PXSelectBase <PMRateDefinition> select = new PXSelect <PMRateDefinition, Where <PMRateDefinition.rateTableID, Equal <Required <PMRateDefinition.rateTableID> >, And <PMRateDefinition.rateTypeID, Equal <Required <PMRateDefinition.rateTypeID> > > >, OrderBy <Asc <PMRateDefinition.sequence> > >(graph); PXResultset <PMRateDefinition> rateDefinitions = select.Select(rateTableID, rateTypeID); foreach (PMRateDefinition rd in rateDefinitions) { trace.AppendFormat("Start Processing Sequence:{0}", rd.Description); decimal?rate = GetRate(rd); if (rate != null) { trace.AppendFormat("End Processing Sequence. Rate Defined:{0}", rate); return(rate); } else { trace.AppendFormat("End Processing Sequence. Rate Not Defined"); } } return(null); }
private void CreateProductMenu(PXGraph graph, PXDropDown dd) { PXListItem liall = new PXListItem(PXMessages.LocalizeNoPrefix(PX.SM.Messages.SearchProduct)); dd.Items.Add(liall); foreach (PXResult result in PXSelect <SPWikiProduct> .Select(graph)) { SPWikiProduct wc = result[typeof(SPWikiProduct)] as SPWikiProduct; PXListItem li = new PXListItem(wc.Description, wc.ProductID); dd.Items.Add(li); } for (int i = 0; i < dd.Items.Count; i++) { if (ProductID == dd.Items[i].Value) { dd.SelectedIndex = i; } } string path = PXUrl.SiteUrlWithPath(); path += path.EndsWith("/") ? "" : "/"; var url = string.Format("{0}Search/{1}?query={2}&adv=1", path, this.ResolveClientUrl("~/Search/Wiki.aspx"), txtSearch.Value); url = url + "&wikiid=" + WikiID + "&wikinumber=" + WikiNumber + "&categoryID=" + CategoryID + "&productID=" + SearchCaptionProduct.Value + "&orderID=" + OrderID + "&isWiki=" + IsWiki + "&globalsearchcaption=" + Globalsearchcaption; }
/// <summary> /// Gets the localized "applied to" string for AR641500 and AR642000 AR statement /// reports. /// </summary> public string AppliedToLocalized(string localeName) { using (new PXLocaleScope(localeName)) { return(PXMessages.LocalizeNoPrefix(AR.Messages.AppliedTo)); } }
public override void FieldSelecting(PXCache sender, PXFieldSelectingEventArgs e) { List <string> allowedValues = new List <string>(); List <string> allowedLabels = new List <string>(); allowedValues.Add(BudgetLevels.Task); allowedLabels.Add(PXMessages.LocalizeNoPrefix(Messages.Task)); if (CostCodeAttribute.UseCostCode()) { allowedValues.Add(BudgetLevels.CostCode); allowedLabels.Add(PXMessages.LocalizeNoPrefix(Messages.BudgetLevel_CostCode)); } allowedValues.Add(BudgetLevels.Item); allowedLabels.Add(PXMessages.LocalizeNoPrefix(Messages.BudgetLevel_Item)); if (CostCodeAttribute.UseCostCode() && PXAccess.FeatureInstalled <CS.FeaturesSet.construction>()) { allowedValues.Add(BudgetLevels.Detail); allowedLabels.Add(PXMessages.LocalizeNoPrefix(Messages.BudgetLevel_Detail)); } _AllowedValues = allowedValues.ToArray(); _AllowedLabels = allowedLabels.ToArray(); base.FieldSelecting(sender, e); }
protected virtual void Page_PreInit(object sender, EventArgs e) { pageTitle.ScreenID = PXSiteMap.IsPortal ? "SE.00.00.50" : "SE.00.00.40"; pageTitle.ScreenTitle = PXMessages.LocalizeNoPrefix(Messages.scrSearch); pageTitle.FavoriteAvailable = false; pageTitle.CustomizationAvailable = false; }
private void CreateRateMenu(PXDropDown dd) { if (PXSiteMap.IsPortal) { String[] MarkList = new String[5] { PXMessages.LocalizeNoPrefix(Msg.Terrible), PXMessages.LocalizeNoPrefix(Msg.NotHelpful), PXMessages.LocalizeNoPrefix(Msg.Average), PXMessages.LocalizeNoPrefix(Msg.Helpful), PXMessages.LocalizeNoPrefix(Msg.Excellent) }; if (PXSiteMap.IsPortal) { PXListItem liall = new PXListItem("<" + PXMessages.LocalizeNoPrefix(Msg.SelectTip) + ">"); dd.Items.Add(liall); for (Int16 i = 5; i > 0; i--) { PXListItem li = new PXListItem(i.ToString() + " - " + MarkList[i - 1], i.ToString()); dd.Items.Add(li); } } for (int i = 0; i < dd.Items.Count; i++) { if (rateid == dd.Items[i].Value) { dd.SelectedIndex = i; } } } }
public static string FormatCCPaymentState(CCPaymentState aState) { Dictionary <CCPaymentState, string> stateDict = new Dictionary <CCPaymentState, string>(); stateDict[CCPaymentState.None] = PXMessages.LocalizeNoPrefix(Messages.CCNone); stateDict[CCPaymentState.PreAuthorized] = PXMessages.LocalizeNoPrefix(Messages.CCPreAuthorized); stateDict[CCPaymentState.PreAuthorizationFailed] = PXMessages.LocalizeNoPrefix(Messages.CCPreAuthorizationFailed); stateDict[CCPaymentState.PreAuthorizationExpired] = PXMessages.LocalizeNoPrefix(Messages.CCPreAuthorizationExpired); stateDict[CCPaymentState.Captured] = PXMessages.LocalizeNoPrefix(Messages.CCCaptured); stateDict[CCPaymentState.CaptureFailed] = PXMessages.LocalizeNoPrefix(Messages.CCCaptureFailed); stateDict[CCPaymentState.Voided] = PXMessages.LocalizeNoPrefix(Messages.CCVoided); stateDict[CCPaymentState.VoidFailed] = PXMessages.LocalizeNoPrefix(Messages.CCVoidFailed); stateDict[CCPaymentState.Refunded] = PXMessages.LocalizeNoPrefix(Messages.CCRefunded); stateDict[CCPaymentState.RefundFailed] = PXMessages.LocalizeNoPrefix(Messages.CCRefundFailed); stateDict[CCPaymentState.VoidFailed] = PXMessages.LocalizeNoPrefix(Messages.CCRefundFailed); StringBuilder result = new StringBuilder(); foreach (KeyValuePair <CCPaymentState, string> it in stateDict) { if ((aState & it.Key) != 0) { if (result.Length > 0) { result.Append(","); } result.Append(it.Value); } } return(result.ToString()); }
public decimal?GetRate(string rateTableID, string rateTypeID, PMTran tran) { if (string.IsNullOrEmpty(rateTableID)) { throw new ArgumentNullException(nameof(rateTableID), PXMessages.LocalizeNoPrefix(Messages.ArgumentIsNullOrEmpty)); } trace = new StringBuilder(); trace.AppendFormat("Calculating Rate. RateTable:{0}, RateType:{1}", rateTableID, rateTypeID); List <PMRateDefinition> list; if (definitions.TryGetValue(GetDefinitionKey(rateTableID, rateTypeID), out list)) { foreach (PMRateDefinition rd in list) { trace.AppendFormat("Start Processing Sequence:{0}", rd.Description); decimal?rate = GetRate(rd, tran); if (rate != null) { trace.AppendFormat("End Processing Sequence. Rate Defined:{0}", rate); return(rate); } else { trace.AppendFormat("End Processing Sequence. Rate Not Defined"); } } } return(null); }
protected virtual void DRDeferredCode_RowDeleting(PXCache sender, PXRowDeletingEventArgs e) { var code = e.Row as DRDeferredCode; if (code == null) { return; } var inventory = new PXSelect <InventoryItem, Where <InventoryItem.deferredCode, Equal <Current <DRDeferredCode.deferredCodeID> > > >(this).SelectSingle(); var component = new PXSelect <INComponent, Where <INComponent.deferredCode, Equal <Current <DRDeferredCode.deferredCodeID> > > >(this).SelectSingle(); var unreleasedARTran = new PXSelect <AR.ARTran, Where <AR.ARTran.released, Equal <False>, And <AR.ARTran.deferredCode, Equal <Current <DRDeferredCode.deferredCodeID> > > > >(this).SelectSingle(); var unreleasedAPTran = new PXSelect <AP.APTran, Where <AP.APTran.released, Equal <False>, And <AP.APTran.deferredCode, Equal <Current <DRDeferredCode.deferredCodeID> > > > >(this).SelectSingle(); var checks = new List <Tuple <string, object> > { new Tuple <string, object>(IN.Messages.InventoryItem, inventory), new Tuple <string, object>(IN.Messages.Component, component), new Tuple <string, object>(AR.Messages.ARTran, unreleasedARTran), new Tuple <string, object>(AP.Messages.APTran, unreleasedAPTran) }; foreach (var check in checks) { if (check.Item2 != null) { throw new PXException(Messages.CodeInUseCantDelete, PXMessages.LocalizeNoPrefix(check.Item1)); } } }
public override void FieldSelecting(PXCache sender, PXFieldSelectingEventArgs e) { if (string.IsNullOrEmpty(InputMask)) { InputMask = "### d\\ays ## hrs ## mins"; } if (_AttributeLevel == PXAttributeLevel.Item || e.IsAltered) { string inputMask = _inputMasks[(int)this._Format]; int lenght = _lengths[(int)this._Format]; inputMask = PXMessages.LocalizeNoPrefix(inputMask); e.ReturnState = PXStringState.CreateInstance(e.ReturnState, lenght, null, _FieldName, _IsKey, null, String.IsNullOrEmpty(inputMask) ? null : inputMask, null, null, null, null); } int maskLenght = 0; foreach (char c in InputMask) { if (c == '#' || c == '0') { maskLenght += 1; } } if (e.ReturnValue != null) { int mins = 0; int.TryParse(e.ReturnValue.ToString(), out mins); TimeSpan span = new TimeSpan(0, 0, mins, 0); int hours = (this._Format == TimeSpanFormatType.LongHoursMinutes) ? span.Days * 24 + span.Hours : span.Hours; var returnValue = string.Format(_outputFormats[(int)this._Format], span.Days, hours, span.Minutes); e.ReturnValue = returnValue.Length < 0 ? (new String(' ', maskLenght - returnValue.Length)) + returnValue : returnValue; } }
private string GetListFilterName() { string listScreenID = PXList.Provider.GetListID(PXSiteMap.CurrentNode.ScreenID); if (listScreenID != null) // check if you need to add the control at all { PXFilterTuple filters = PXList.Provider.GetListFilters(PXSiteMap.CurrentNode.ScreenID, PXList.Provider.GetListView(listScreenID)); if (filters != null) { if (filters.FilterID != null) { string dynamicFilterName = DynamicFilterManager.GetFilterName((long)filters.FilterID); if (!String.IsNullOrEmpty(dynamicFilterName)) { return(dynamicFilterName); } FilterHeader filter = FilterHeader.Definition.Get().FirstOrDefault(f => f.FilterID == filters.FilterID); if (filter != null) { return(filter.FilterName); } } else if (filters.FilterRows != null) { return(PXMessages.LocalizeNoPrefix(Msg.GrdFilterApplied)); } } } return(null); }
protected override void Initialize() { if (_templateWikiArticleType != null && _rootTemplate != null) { string language = Request.Params["Language"]; if (string.IsNullOrEmpty(language)) { language = LocaleInfo.GetCulture().Name; } int revision; Guid pageID = WikiPageId; int? correctRevision = int.TryParse(Request.Params["PageRevisionID"], out revision) ? (int?)revision : null; WikiReader graph = PXGraph.CreateInstance <WikiReader>(); try { object article = pageID == Guid.Empty ? Activator.CreateInstance(_templateWikiArticleType, graph, Request.Params["wiki"], Request.Params["art"], language, correctRevision) : Activator.CreateInstance(_templateWikiArticleType, graph, pageID, language, correctRevision); _wikiShow = new TemplateWikiShow((IWikiArticle)article, (IRootTemplateInfo)_rootTemplate.GetValue(article, null)); } catch (StackOverflowException) { throw; } catch (OutOfMemoryException) { throw; } catch { _wikiShow = new PXWikiShow(); } } else { _wikiShow = new PXWikiShow(); } _wikiShow.NotFoundMessage = PXMessages.LocalizeNoPrefix(Msg.WkNotFound); base.Initialize(); }
public void SendMessage(object message) { if (message == null) { throw new ArgumentNullException(nameof(message), PXMessages.LocalizeNoPrefix(Messages.Message)); } if (!(message is SMEmail)) { string errorText = PXMessages.LocalizeFormatNoPrefixNLA(Messages.CanNotProcessMessage, message.GetType().Name, typeof(SMEmail).Name); throw new ArgumentException(errorText, PXMessages.LocalizeNoPrefix(Messages.Message)); } SMEmail email = message as SMEmail; if (email.MailAccountID != null && PX.Objects.CS.Email.PXEmailSyncHelper.IsExchange(email.MailAccountID.Value)) { CRSMEmail emailProjection = PXSelect <CRSMEmail, Where <CRSMEmail.noteID, Equal <Required <SMEmail.refNoteID> > > > .Select(new PXGraph(), email.RefNoteID); CS.Email.PXEmailSyncHelper.SendMessage(emailProjection); } else { using (var processor = new MessageProcessor(email.MailAccountID)) { processor.Process(email); } } }
protected void Page_Init(object sender, EventArgs e) { string query = Request.QueryString["query"]; WikiID = Request.QueryString["wikiid"]; WikiNumber = Request.QueryString["wikinumber"]; CategoryID = Request.QueryString["categoryID"]; ProductID = Request.QueryString["productID"]; OrderID = Request.QueryString["orderID"]; imgMessage = PXFormView1.FindControl("imgMessage") as Image; lblMessage = PXFormView1.FindControl("lblMessage") as Label; lblResults = PXFormView1.FindControl("lblResults") as Label; txtSearch = PXFormView1.FindControl("txtSearch") as PXTextEdit; chkSearchReplace = PXFormView1.FindControl("chkSearchReplace") as PXCheckBox; txtReplace = PXFormView1.FindControl("txtReplace") as PXTextEdit; SearchCaption = PXFormView1.FindControl("SearchCaption") as PXDropDown; SearchCaptionCategory = PXFormView1.FindControl("SearchCaptionCategory") as PXDropDown; SearchCaptionProduct = PXFormView1.FindControl("SearchCaptionProduct") as PXDropDown; OrderCaption = PXFormView1.FindControl("OrderCaption") as PXDropDown; Go = PXFormView1.FindControl("btnSearch") as PXButton; mainContentTable = CreateMainTable(); pager = CreatePager(query); PXFormView1.TemplateContainer.Controls.Add(MainContentTable); SetEditBoxAttrributes(); FullText = true; if (this.searchType == SearchType.Wiki) { this.txtSearch.ToolTip = PXMessages.LocalizeNoPrefix(Messages.ttipHelpSearch); } else if (this.searchType == SearchType.Files) { this.txtSearch.ToolTip = PXMessages.LocalizeNoPrefix(Messages.ttipFileSearch); } else if (this.searchType == SearchType.Entity) { this.txtSearch.ToolTip = PXMessages.LocalizeNoPrefix(Messages.ttipEntitySearch); } else if (this.searchType == SearchType.Notes) { this.txtSearch.ToolTip = PXMessages.LocalizeNoPrefix(Messages.ttipNoteSearch); } FormatSearchCaption(); RegisterThisId(); imgMessage.ImageUrl = ResolveUrl("~/App_Themes/Default/Images/Message/information.gif"); if (query == null || string.IsNullOrEmpty(query.Trim())) { imgMessage.Visible = true; lblMessage.Visible = true; lblResults.Visible = false; lblMessage.Text = PXMessages.LocalizeNoPrefix(Messages.SpecifySearchRequest); return; } imgMessage.Visible = false; lblMessage.Visible = false; lblResults.Visible = true; }
public Closing() { GLSetup setup = GLSetup.Current; APSetup apSetup = APSetup.Select(); ARSetup arSetup = ARSetup.Select(); INSetup inSetup = INSetup.Select(); CASetup caSetup = CASetup.Select(); FASetup faSetup = FASetup.Select(); PRSetup prSetup = PRSetup.Select(); PXCache periodCache = Caches[typeof(FinPeriod)]; PXUIFieldAttribute.SetEnabled <FinPeriod.finPeriodID>(periodCache, null, false); PXUIFieldAttribute.SetEnabled <FinPeriod.descr>(periodCache, null, false); PXUIFieldAttribute.SetVisible <FinPeriod.aPClosed>(periodCache, null, apSetup != null); PXUIFieldAttribute.SetVisible <FinPeriod.aRClosed>(periodCache, null, arSetup != null); PXUIFieldAttribute.SetVisible <FinPeriod.iNClosed>(periodCache, null, inSetup != null); PXUIFieldAttribute.SetVisible <FinPeriod.cAClosed>(periodCache, null, caSetup != null); PXUIFieldAttribute.SetVisible <FinPeriod.fAClosed>(periodCache, null, faSetup != null); PXUIFieldAttribute.SetVisible <FinPeriod.pRClosed>(periodCache, null, prSetup != null); Caches[typeof(FinPeriod)].AllowInsert = false; Caches[typeof(FinPeriod)].AllowDelete = false; if (this.GetType() != typeof(Closing)) { ShowDocuments.SetCaption(PXMessages.LocalizeNoPrefix(GL.Messages.ShowDocumentsNonGL)); } }
private void InitBAccount(BAccount row) { //Inserting Address record if (row.DefAddressID == null) { var addressOldDirty = AddressCurrent.Cache.IsDirty; var addr = (Address)AddressCurrent.Cache.CreateInstance(); addr.BAccountID = row.BAccountID; addr = AddressCurrent.Insert(addr); row.DefAddressID = addr.AddressID; AddressCurrent.Cache.IsDirty = addressOldDirty; } // Inserting Default Contact record if (row.DefContactID == null) { var contactsOldDirty = Contacts.Cache.IsDirty; var contact = (Contact)Contacts.Cache.CreateInstance(); contact.ContactType = ContactTypesAttribute.BAccountProperty; contact.BAccountID = row.BAccountID; contact = Contacts.Insert(contact); row.DefContactID = contact.ContactID; Contacts.Cache.IsDirty = contactsOldDirty; } // Inserting delivery locaiton record if (row.DefLocationID == null) { var locationOldDirty = Locations.Cache.IsDirty; var location = (Location)Locations.Cache.CreateInstance(); location.BAccountID = row.BAccountID; // Location CD need to be formatted accorfing to segmented key mask prior inserting object cd = PXMessages.LocalizeNoPrefix(Messages.DefaultLocationCD); Locations.Cache.RaiseFieldUpdating <Location.locationCD>(location, ref cd); location.LocationCD = (string)cd; location.LocType = LocTypeList.CustomerLoc; switch (row.Type) { case BAccountType.VendorType: location.LocType = LocTypeList.VendorLoc; break; case BAccountType.CombinedType: location.LocType = LocTypeList.CombinedLoc; break; } location.Descr = PXMessages.LocalizeNoPrefix(Messages.DefaultLocationDescription); location.IsDefault = true; location.DefAddressID = row.DefAddressID; location.IsAddressSameAsMain = true; location.DefContactID = row.DefContactID; location.IsContactSameAsMain = true; location = (Location)Locations.Cache.Insert(location); row.DefLocationID = location.LocationID; Locations.Cache.IsDirty = locationOldDirty; } }
protected virtual void PMRateSequence_Sequence_FieldSelecting(PXCache sender, PXFieldSelectingEventArgs e) { PXSelectBase <PMRateDefinition> select = new PXSelect <PMRateDefinition, Where <PMRateDefinition.rateTableID, Equal <Current <PMRateSequence.rateTableID> >, And <PMRateDefinition.rateTypeID, Equal <Current <PMRateSequence.rateTypeID> > > >, OrderBy <Asc <PMRateDefinition.sequence> > >(this); List <string> labels = new List <string>(); List <int> values = new List <int>(); int? retValue = (int?)e.ReturnValue; bool valueValid = false; foreach (PMRateDefinition rd in select.Select()) { string description = string.Format("{0} - [ ", rd.Sequence); if (rd.Project == true) { description = description + PXMessages.LocalizeNoPrefix(Messages.Project) + " "; } if (rd.Task == true) { description = description + PXMessages.LocalizeNoPrefix(Messages.Task) + " "; } if (rd.AccountGroup == true) { description = description + PXMessages.LocalizeNoPrefix(Messages.AccountGroup) + " "; } if (rd.RateItem == true) { description = description + PXMessages.LocalizeNoPrefix(Messages.Item) + " "; } if (rd.Employee == true) { description = description + PXMessages.LocalizeNoPrefix(EP.Messages.Employee) + " "; } description = description + "] " + rd.Description; if (retValue != null && retValue.Value == rd.Sequence.Value) { valueValid = true; } labels.Add(description); values.Add(Convert.ToInt32(rd.Sequence.Value)); } if (!valueValid && values.Count > 0) { e.ReturnValue = values[0]; } e.ReturnState = PXIntState.CreateInstance(e.ReturnState, "Sequence", false, 1, null, null, values.ToArray(), labels.ToArray(), null, null); }
protected void Page_Load(object sender, EventArgs e) { this.Response.AppendHeader("Refresh", "10"); this.lblMessage.Text = PXMessages.LocalizeNoPrefix(PX.Data.Update.Messages.SiteUnderMaintenanceCannotAccess); this.lblPersentCaption.Text = PXMessages.LocalizeNoPrefix(PX.Data.Update.Messages.PersentCaption) + " "; this.lblActionCaption.Text = PXMessages.LocalizeNoPrefix(PX.Data.Update.Messages.ActionCaption) + " "; this.lblAction.Text = PXMessages.LocalizeNoPrefix(PX.Data.Update.Messages.ActionDatabaseUpdate); this.lblDatabaseNameCaption.Text = PXMessages.LocalizeNoPrefix(PX.Data.Update.Messages.DatabaseNameCaption) + " "; this.lblDatabaseVersionCaption.Text = PXMessages.LocalizeNoPrefix(PX.Data.Update.Messages.DatabaseVersionCaption) + " "; this.lblSiteVersionCaption.Text = PXMessages.LocalizeNoPrefix(PX.Data.Update.Messages.SiteVersionCaption) + " "; this.lblQuestion.Text = PXMessages.LocalizeNoPrefix(PX.Data.Update.Messages.Question) + " "; if (!PX.Data.Update.PXUpdateHelper.CheckUpdateLock() && PX.Data.Maintenance.PXSiteLockout.GetStatus() != PXSiteLockout.Status.Locked) { this.lblMessage.Text = PX.Data.PXMessages.Localize(PX.Data.InfoMessages.SiteMaintetanceComplite); PX.Data.Redirector.RedirectPage(this.Context, PXUrl.MainPagePath); } if (PXSiteLockout.GetStatus() == PXSiteLockout.Status.Locked) { this.lblMessage.Text += "<br/>" + string.Format( PXMessages.Localize(PX.Data.Update.Messages.LockoutReason), PXSiteLockout.Message); } PXUpdateStatusResult result = PXUpdateHelper.GetUpdateStatus(); if ((result.ProcessStatus == PX.Data.PXLongRunStatus.InProcess)) { if (result.UpdateStatus != null) { this.statusTable.Visible = true; this.lblPersent.Text = result.UpdateStatus.Peresent.ToString() + "%"; this.lblAction.Text = PXMessages.LocalizeNoPrefix(result.UpdateStatus.Message); } if (result.UpdateQuetion != null) { this.questionTable.Visible = true; this.lblQuestion.Text = result.UpdateQuetion.Question; this.lblDatabaseVersion.Text = result.UpdateQuetion.DatabaseVersion; this.lblSiteVersion.Text = result.UpdateQuetion.AssemblyVersion; if (!String.IsNullOrEmpty(result.UpdateQuetion.DatabaseName)) { this.applicationTable.Visible = true; this.lblDatabaseName.Text = result.UpdateQuetion.DatabaseName; } } } else { this.statusTable.Visible = false; this.questionTable.Visible = false; this.applicationTable.Visible = false; } }
public string PXMessagesSimple() { string localizedString; localizedString = PXMessages.Localize(InnerNamespace.NonLocalizableMessagesInNamespace.CommasInUserName); localizedString = PXMessages.Localize(NonLocalizableMessages.CommasInUserName, out string strPrefix); localizedString = PXMessages.LocalizeNoPrefix(NonLocalizableMessages.CommasInUserName); return(localizedString); }
public string PXMessagesLocalizationSimpleMethods() { string localizedString; localizedString = PXMessages.Localize(MyMessages.CommasInUserName); localizedString = PXMessages.Localize(MyMessages.CommasInUserName, out string strPrefix); localizedString = PXMessages.LocalizeNoPrefix(MyMessages.CommasInUserName); return(localizedString); }
public virtual void DisplaySearchTips(string query) { divMessage.Visible = true; lblMessage.Visible = true; if (!string.IsNullOrEmpty(query)) { lblMessage.Text = PXMessages.LocalizeNoPrefix(Messages.NothingFound) + ": <b>" + HttpUtility.HtmlEncode(query) + "</b>"; divTips.Visible = true; } }
public string PXMessagesSimple() { string localizedString; localizedString = PXMessages.Localize("Usernames cannot contain commas."); localizedString = PXMessages.Localize("Usernames cannot contain commas.", out string strPrefix); localizedString = PXMessages.LocalizeNoPrefix("Usernames cannot contain commas."); return(localizedString); }
protected void Page_Load(object sender, EventArgs e) { if (!this.IsCallback) { PXLabel lbl = this.form.FindControl("lblNote1") as PXLabel; if (lbl != null) { lbl.Text = PXMessages.LocalizeNoPrefix(Messages.EstimatedCosts); } } }
protected void Page_Load(object sender, EventArgs e) { if (!this.IsCallback) { PXLabel lbl = this.formSettings.FindControl("lblPeriodsNumberAfter") as PXLabel; if (lbl != null) { lbl.Text = PXMessages.LocalizeNoPrefix(Messages.Periods); } } }
protected virtual void OnValidateEntities() { if (RateDefinition.Current != null && RateSequence.Current != null) { string errors = RunEntryValidationAndReturnErrors(RateDefinition.Current, RateSequence.Current.RateCodeID); if (!string.IsNullOrEmpty(errors)) { throw new PXException(PXMessages.LocalizeNoPrefix(Messages.RateTableIsInvalid) + Environment.NewLine + errors); } } }
protected virtual void GLBudgetTree_SubID_FieldVerifying(PXCache sender, PXFieldVerifyingEventArgs e) { if (e.NewValue == null) { return; } if (!MatchMask(((Sub)PXSelect <Sub, Where <Sub.subID, Equal <Required <Sub.subID> > > > .Select(this, e.NewValue)).SubCD, CurrentSelected.SubMaskWildcard ?? String.Empty)) { throw new PXSetPropertyException(String.Format(PXMessages.LocalizeNoPrefix(Messages.BudgetSubaccountNotAllowed), CurrentSelected.SubMaskWildcard)); } }
public override void SetMessage(string message) { if (MessagePrefix != null) { string strtemp = string.Format("{0}:", MessagePrefix, ExceptionNumber); int idx = message.IndexOf(strtemp); if (idx != -1) { message = message.Substring(message.IndexOf(strtemp) + strtemp.Length); } } _Message = PXMessages.LocalizeNoPrefix(message); }
public override void SetMessage(string message) { if (MessagePrefix != null) { string strtemp = MessagePrefix + ':'; int idx = message.IndexOf(strtemp); if (idx != -1) { message = message.Substring(message.IndexOf(strtemp) + strtemp.Length); } } _Message = PXMessages.LocalizeNoPrefix(message); }