コード例 #1
0
        protected OrganizationUnitMaintBase()
        {
            EmployeesAccessor.Cache.AllowInsert = false;
            EmployeesAccessor.Cache.AllowDelete = false;
            EmployeesAccessor.Cache.AllowUpdate = false;
            PXUIFieldAttribute.SetDisplayName <Contact.salutation>(Caches[typeof(Contact)], CR.Messages.Attention);

            PXUIFieldAttribute.SetEnabled <Contact.fullName>(Caches[typeof(Contact)], null);

            bool branchFeatureEnabled = PXAccess.FeatureInstalled <FeaturesSet.branch>();

            Next.SetVisible(branchFeatureEnabled);
            Prev.SetVisible(branchFeatureEnabled);
            Last.SetVisible(branchFeatureEnabled);
            First.SetVisible(branchFeatureEnabled);
            Insert.SetVisible(branchFeatureEnabled);
        }
コード例 #2
0
        public BranchMaint()
        {
            this.Employees.Cache.AllowInsert = false;
            this.Employees.Cache.AllowDelete = false;
            this.Employees.Cache.AllowUpdate = false;
            PXUIFieldAttribute.SetDisplayName(Caches[typeof(Contact)], typeof(Contact.salutation).Name, CR.Messages.Attention);

            PXUIFieldAttribute.SetEnabled <Contact.fullName>(Caches[typeof(Contact)], null);
            if (!PXAccess.FeatureInstalled <FeaturesSet.branch>())
            {
                BranchBAccount br = PXSelectReadonly <BranchBAccount> .SelectWindowed(this, 0, 1);

                this.CurrentBAccount.Cache.AllowInsert = (br == null);
                this.CurrentBAccount.Cache.AllowDelete = (br == null);
                Next.SetVisible(false);
                Prev.SetVisible(false);
                Last.SetVisible(false);
                First.SetVisible(false);
                Insert.SetVisible(false);
                Delete.SetVisible(false);
            }
        }