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)); } }
protected virtual void _(Events.CacheAttached <SOInvoice.refNbr> e) { PXUIFieldAttribute.SetEnabled <SOInvoice.refNbr>(e.Cache, null, false); PXUIFieldAttribute.SetRequired <SOInvoice.refNbr>(e.Cache, false); PXUIFieldAttribute.SetReadOnly <SOInvoice.refNbr>(e.Cache, null, true); Release.SetEnabled(false); Release.SetCaption("Release"); }
private void InsertNewRecord(PXCache cache) { PXUIFieldAttribute.SetVisible(cache, nameof(SOInvoice.RefNbr), true); PXUIFieldAttribute.SetEnabled <SOInvoice.refNbr>(cache, null, false); PXUIFieldAttribute.SetDisplayName <SOInvoice.refNbr>(cache, "Invoice Nbr."); PXUIFieldAttribute.SetRequired <SOInvoice.refNbr>(e.Cache, false); PXUIFieldAttribute.SetReadOnly <SOInvoice.refNbr>(e.Cache, null, true); Release.SetVisible(true); Release.SetEnabled(false); Release.SetCaption("Release"); Release.SetTooltip("Release the document"); }
public void action1() { Action1.SetVisible(false); Action1.SetEnabled(false); Action1.SetCaption("Action1"); Action1.SetTooltip("Tooltip"); PXUIFieldAttribute.SetVisible <Users.displayName>(AllUsers.Cache, null); PXUIFieldAttribute.SetVisibility <Users.displayName>(AllUsers.Cache, null, PXUIVisibility.Invisible); PXUIFieldAttribute.SetEnabled <Users.displayName>(AllUsers.Cache, null); PXUIFieldAttribute.SetRequired <Users.displayName>(AllUsers.Cache, false); PXUIFieldAttribute.SetReadOnly <Users.displayName>(AllUsers.Cache, null); PXUIFieldAttribute.SetDisplayName <Users.displayName>(AllUsers.Cache, "Action1"); PXUIFieldAttribute.SetNeutralDisplayName(AllUsers.Cache, nameof(Users.displayName), "Action1"); var newList = new Users.state.List(); PXStringListAttribute.SetList <Users.state>(AllUsers.Cache, null, newList); PXStringListAttribute.AppendList <Users.state>(AllUsers.Cache, null, newList.ValueLabelDic.Keys.ToArray(), newList.ValueLabelDic.Values.ToArray()); PXStringListAttribute.SetLocalizable <Users.displayName>(AllUsers.Cache, null, false); PXIntListAttribute.SetList <Users.loginTypeID>(AllUsers.Cache, null, new[] { 0, 1 }, new[] { "A", "B" }); }
protected virtual void _(Events.RowPersisting <SOInvoice> e) { Release.SetCaption("Release"); }