Example #1
0
        private void GenerateXmlNodeForMaterial(XmlNode root, MaterialModifyObject m)
        {
            XmlNode materialNode = XmlHelper.AppendNode <string>(root, "material", string.Empty);

            XmlHelper.AppendAttr(materialNode, "id", m.ID);
            XmlHelper.AppendAttr(materialNode, "relativeFilePath", m.RelativeFilePath);
            XmlHelper.AppendAttr(materialNode, "originalName", m.OriginalName);
            XmlHelper.AppendAttr(materialNode, "title", m.Title);
            XmlHelper.AppendAttr(materialNode, "sortID", m.SortID);
            XmlHelper.AppendAttr(materialNode, "wfActivityID", m.WfActivityID);
            XmlHelper.AppendAttr(materialNode, "wfProcessID", m.WfProcessID);
            XmlHelper.AppendAttr(materialNode, "creatorFullPath", m.CreatorFullPath);
        }
Example #2
0
        private MaterialModifyObject GenerateMaterialModifyObjectFromXmlNode(XmlNode node)
        {
            MaterialModifyObject materialModifyObject = new MaterialModifyObject();

            materialModifyObject.ID = XmlHelper.GetAttributeValue <string>(node, "id", string.Empty);
            materialModifyObject.RelativeFilePath = XmlHelper.GetAttributeValue <string>(node, "relativeFilePath", string.Empty);
            materialModifyObject.OriginalName     = XmlHelper.GetAttributeValue <string>(node, "originalName", string.Empty);
            materialModifyObject.Title            = XmlHelper.GetAttributeValue <string>(node, "title", string.Empty);
            materialModifyObject.SortID           = XmlHelper.GetAttributeValue <int>(node, "sortID", 0);
            materialModifyObject.WfActivityID     = XmlHelper.GetAttributeValue <string>(node, "wfActivityID", string.Empty);
            materialModifyObject.WfProcessID      = XmlHelper.GetAttributeValue <string>(node, "wfProcessID", string.Empty);
            materialModifyObject.CreatorFullPath  = XmlHelper.GetAttributeValue <string>(node, "creatorFullPath", string.Empty);

            return(materialModifyObject);
        }
Example #3
0
        /// <summary>
        /// 转化为附件修改对象
        /// </summary>
        /// <returns>附件修改对象</returns>
        internal MaterialModifyObject ConvertToMaterialModifyObject()
        {
            MaterialModifyObject obj = new MaterialModifyObject();

            obj.ID               = this.id;
            obj.OriginalName     = this.originalName;
            obj.RelativeFilePath = this.relativeFilePath;
            obj.SortID           = this.sortID;
            obj.Title            = this.title;
            obj.WfActivityID     = this.wfActivityID;
            obj.WfProcessID      = this.wfProcessID;
            obj.CreatorFullPath  = this.Creator.FullPath;

            return(obj);
        }
Example #4
0
        public bool Contains(MaterialModifyObject materialModifyObject)
        {
            ExceptionHelper.FalseThrow <ArgumentNullException>(materialModifyObject != null, "materialModifyObject");

            return(List.Contains(materialModifyObject));
        }
Example #5
0
 public void Remove(MaterialModifyObject materialModifyObject)
 {
     List.Remove(materialModifyObject);
 }
Example #6
0
 public void Insert(int index, MaterialModifyObject materialModifyObject)
 {
     List.Insert(index, materialModifyObject);
 }
Example #7
0
 public int Add(MaterialModifyObject materialModifyObject)
 {
     return(List.Add(materialModifyObject));
 }
Example #8
0
        public int IndexOf(MaterialModifyObject materialModifyObject)
        {
            ExceptionHelper.FalseThrow <ArgumentNullException>(materialModifyObject != null, "materialModifyObject");

            return(List.IndexOf(materialModifyObject));
        }