Esempio n. 1
0
        /// <summary>
        ///     Executes the filter and returns the <see cref="ID8ListItem" /> of the results.
        /// </summary>
        /// <returns>
        ///     An <see cref="ID8ListItem" /> containing the results.
        /// </returns>
        protected virtual ID8ListItem InternalExecute()
        {
            int nodeTypeID = PxApplication.Helper.GetNodeTypeID(_NodeTypeName);

            if (nodeTypeID == 0)
            {
                return(null);
            }

            // Create the top level node.
            IMMPxNodeEdit nodeEdit = new MMPxNodeListClass();

            ((IMMPxNodeEdit2)nodeEdit).IsPxTopLevel = true;
            nodeEdit.Initialize(nodeTypeID, _NodeTypeName, 0);
            nodeEdit.DisplayName = _DisplayName;
            ((IMMPxApplicationEx)PxApplication).HydrateNodeFromDB((IMMPxNode)nodeEdit);

            // Use the builder to create the list.
            IMMDynamicList list = (IMMDynamicList)nodeEdit;

            list.BuildObject = this.GetNodeBuilder(PxApplication);
            list.Build(false);

            return((ID8ListItem)nodeEdit);
        }
Esempio n. 2
0
        /// <summary>
        ///     Adds a parameter to the supported parameters.
        /// </summary>
        /// <param name="key">The key of the parameter.</param>
        /// <param name="description">The description of the parameter.</param>
        protected void AddParameter(string key, string description)
        {
            if (SupportedParameterNames == null)
            {
                SupportedParameterNames = new MMPxNodeListClass();
            }

            object k = key;
            object d = description;

            SupportedParameterNames.Add(ref k, ref d);
        }
Esempio n. 3
0
        /// <summary>
        ///     Hydrates the node from the database.
        /// </summary>
        protected void Hydrate()
        {
            int           nodeType = _PxApp.Helper.GetNodeTypeID(_NodeTypeName);
            IMMPxNodeEdit nodeEdit = new MMPxNodeListClass();

            nodeEdit.Initialize(nodeType, _NodeTypeName, this.ID);
            nodeEdit.DisplayName = this.Name;

            this.Node = (IMMPxNode)nodeEdit;
            ((IMMPxApplicationEx)_PxApp).HydrateNodeFromDB(this.Node);

            IMMDynamicList list    = (IMMDynamicList)nodeEdit;
            IMMListBuilder builder = this.GetListBuilder();

            if (builder != null)
            {
                list.BuildObject = builder;
            }

            this.History = _PxApp.GetHistory(this.Node);
        }