/// <summary>
        ///     Adds the history record for the specified node id and type.
        /// </summary>
        /// <param name="source">The source.</param>
        /// <param name="nodeId">The node identifier.</param>
        /// <param name="nodeType">Type of the node.</param>
        /// <param name="description">The description.</param>
        /// <param name="extraData">The extra data.</param>
        /// <returns>Returns a <see cref="IMMPxNodeHistory" /> representing the history records.</returns>
        public static IMMPxNodeHistory AddHistory(this IMMPxApplication source, int nodeId, int nodeType, string description, string extraData)
        {
            var list = source.GetHistory(nodeId, nodeType);

            source.AddHistory(list, nodeId, nodeType, description, extraData);
            return(list);
        }
Beispiel #2
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);
        }
 /// <summary>
 ///     Gets the collection of history for the specified node information.
 /// </summary>
 /// <param name="source">The source.</param>
 /// <param name="nodeId">The node identifier.</param>
 /// <param name="nodeType">Type of the node.</param>
 /// <returns>
 ///     Returns a <see cref="IMMPxNodeHistory" /> representing the history collection.
 /// </returns>
 public static IMMPxNodeHistory GetHistory(this IMMPxApplication source, int nodeId, int nodeType)
 {
     return(source.GetHistory(nodeId, nodeType, string.Format("NODE_ID = {0} AND NODE_TYPE_ID = {1}", nodeId, nodeType)));
 }
 /// <summary>
 ///     Gets the collection of history for the specified node.
 /// </summary>
 /// <param name="source">The source.</param>
 /// <param name="node">The node.</param>
 /// <returns>
 ///     Returns a <see cref="IMMPxNodeHistory" /> representing the history collection.
 /// </returns>
 public static IMMPxNodeHistory GetHistory(this IMMPxApplication source, IMMPxNode node)
 {
     return(source.GetHistory(node.Id, node.NodeType));
 }