Exemplo n.º 1
0
 public ITATDocument()
 {
     _ITATDocumentID = Guid.NewGuid();
     _documentName = string.Empty;
     _defaultDocument = false;
     _workflowEnabled = true;
     _clause = new ITATClause();
     _clause.Name = XMLNames._E_Document;
     _header = new ITATDocumentHeader();
     _footer = new ITATDocumentFooter();           
     
 }
Exemplo n.º 2
0
        public ITATDocument(XmlDocument xmlTemplateDoc, XmlNode node, Template template, bool isNewDocStructure)
        {
            if (isNewDocStructure)
            {
                _ITATDocumentID = new Guid(Utility.XMLHelper.GetAttributeString(node, XMLNames._A_ID));
                _documentName = Utility.XMLHelper.GetAttributeString(node, XMLNames._A_Name);
                _defaultDocument = Utility.XMLHelper.GetAttributeBool(node, XMLNames._A_Document_DefaultDocument);
                _workflowEnabled = Utility.XMLHelper.GetAttributeBool(node, XMLNames._A_Document_WorkflowEnabled);
                _generatedDocumentID = Utility.XMLHelper.GetAttributeString(node, XMLNames._A_GeneratedDocumentID);
            }
            else
            {
                _ITATDocumentID = Guid.NewGuid();
                _documentName = Utility.XMLHelper.GetAttributeString(node.SelectSingleNode(XMLNames._E_Body), XMLNames._A_Name);
                _defaultDocument = true;
                _workflowEnabled = true;
                _generatedDocumentID = Utility.XMLHelper.GetAttributeString(xmlTemplateDoc.DocumentElement, XMLNames._A_GeneratedDocument); ;
            }


            XmlNode nodeHeader = node.SelectSingleNode(XMLNames._E_Header);
            _header = new ITATDocumentHeader(nodeHeader);

            XmlNode nodeFooter = node.SelectSingleNode(XMLNames._E_Footer);
            _footer = new ITATDocumentFooter(nodeFooter);

            XmlNode nodeBody = node.SelectSingleNode(XMLNames._E_Body);
            _clause = new ITATClause();
            _clause.Name = Utility.XMLHelper.GetAttributeString(nodeBody, XMLNames._A_Name);
            _clause.ChildNumberingScheme = ChildNumberingSchemeHelper.GetSchemeType(Utility.XMLHelper.GetAttributeString(nodeBody, XMLNames._A_ChildNumberingScheme));
            _clause.Create(nodeBody);
        }