Ejemplo n.º 1
0
        /// <summary>
        /// Initialize.
        /// </summary>
        protected void Init()
        {
            haveReadAll         = false;
            haveReadWorkVersion = false;

            // Provide empty collections for document versions and attachments
            docs = ClassFactory.NewDocVersions(null, this, FWDocVersionType.TYPE_VERSION);
            atts = ClassFactory.NewDocVersions(null, this, FWDocVersionType.TYPE_ATTACHMENT);

            // If the sord object contains a version, put it into the versions collection
            if (sordVal.docVersion != null)
            {
                docs.InternalAdd(sordVal.docVersion);
            }
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Call checkinDocBegin for all modified versions.
        /// </summary>
        /// <param name="xdvs">Collection of modified versions.</param>
        /// <returns></returns>
        protected virtual List <FWDocVersion> prepareModifiedVersions(FWDocVersions xdvs)
        {
            List <FWDocVersion> modifiedVersions = new List <FWDocVersion>(xdvs.Count);

            foreach (FWDocVersion xdv in xdvs)
            {
                // File modified?
                if (xdv.FileModified)
                {
                    // prepare for upload: encryption set, path ID
                    xdv.prepareCheckinDocBegin(sordVal);
                    modifiedVersions.Add(xdv);
                }
                else if (xdv.Modified)
                {
                    // only version comment etc. changed
                    modifiedVersions.Add(xdv);
                }
            }
            return(modifiedVersions);
        }