Пример #1
0
        public override XmlNode XmlAppend(XmlNode node)
        {
            node.AddAttribute("key", this.Key);
            node.AddAttribute("name", this.Name);
            node.AddAttribute("codeFacade", this.CodeFacade, _def_codefacade);
            node.AddAttribute("description", this.Description, _def_description);
            node.AddAttribute("dataFieldSortOrder", this.SortOrder, _def_sortOrder);
            node.AddAttribute("isPrimaryKey", this.IsPrimaryKey, _def_isPrimaryKey);
            node.AddAttribute("default", this.Default, _def_default);
            node.AddAttribute("length", this.Length, _def_length);
            node.AddAttribute("scale", this.Scale, _def_scale);
            node.AddAttribute("id", this.Id);
            node.AddAttribute("sortOrder", this.SortOrder, _def_sortOrder);
            node.AddAttribute("type", (int)this.DataType);
            node.AddAttribute("allowNull", this.AllowNull, _def_allowNull);

            if (RelationshipRef != null)
            {
                var relationshipRefNode = node.CreateElement("relationshipRef");
                RelationshipRef.XmlAppend(relationshipRefNode);
                node.AppendChild(relationshipRefNode);
            }

            node.AppendChild(ParentViewRef.XmlAppend(node.CreateElement("parentTableRef")));
            return(node);
        }
Пример #2
0
        public override void XmlAppend(XmlNode node)
        {
            try
            {
                var oDoc = node.OwnerDocument;

                node.AddAttribute("key", this.Key);
                node.AddAttribute("primaryKey", this.PrimaryKey, _def_primaryKey);
                node.AddAttribute("computedColumn", this.ComputedColumn, _def_computedColumn);
                node.AddAttribute("isReadOnly", this.IsReadOnly, _def_isReadOnly);
                node.AddAttribute("formula", this.Formula, _def_formula);
                node.AddAttribute("identity", (int)this.Identity, (int)_def_identity);
                node.AddAttribute("name", this.Name);
                node.AddAttribute("codeFacade", this.CodeFacade, _def_codefacade);
                node.AddAttribute("description", this.Description, _def_description);
                node.AddAttribute("prompt", this.Prompt, _def_prompt);
                node.AddAttribute("dataFieldSortOrder", this.SortOrder, _def_sortOrder);
                node.AddAttribute("default", this.Default, _def_default);
                node.AddAttribute("defaultIsFunc", this.DefaultIsFunc, _def_defaultIsFunc);

                if ((this.Length != _def_length) && !this.IsDefinedSize)
                {
                    node.AddAttribute("length", this.Length);
                }

                if (this.Scale != _def_scale && !this.IsDefinedScale)
                {
                    node.AddAttribute("scale", this.Scale);
                }

                node.AddAttribute("isIndexed", this.IsIndexed, _def_isIndexed);
                node.AddAttribute("isUnique", this.IsUnique, _def_isUnique);
                node.AddAttribute("id", this.Id);
                node.AddAttribute("type", (int)this.DataType);
                node.AddAttribute("allowNull", this.AllowNull, _def_allowNull);
                node.AddAttribute("obsolete", this.Obsolete, _def_obsolete);

                if (RelationshipRef != null)
                {
                    var relationshipRefNode = oDoc.CreateElement("relationshipRef");
                    RelationshipRef.XmlAppend(relationshipRefNode);
                    node.AppendChild(relationshipRefNode);
                }

                var parentTableRefNode = oDoc.CreateElement("pt");
                ParentTableRef.XmlAppend(parentTableRefNode);
                node.AppendChild(parentTableRefNode);
            }
            catch (Exception ex)
            {
                throw;
            }
        }
Пример #3
0
        public override void XmlAppend(XmlNode node)
        {
            try
            {
                var oDoc = node.OwnerDocument;

                XmlHelper.AddAttribute(node, "key", this.Key);

                if (this.Generated != _def_generated)
                {
                    XmlHelper.AddAttribute((XmlElement)node, "generated", this.Generated);
                }

                XmlHelper.AddAttribute(node, "name", this.Name);

                if (this.CodeFacade != _def_codefacade)
                {
                    XmlHelper.AddAttribute(node, "codeFacade", this.CodeFacade);
                }

                if (this.Description != _def_description)
                {
                    XmlHelper.AddAttribute(node, "description", this.Description);
                }

                if (this.FriendlyName != _def_friendlyName)
                {
                    XmlHelper.AddAttribute(node, "dataFieldFriendlyName", this.FriendlyName);
                }

                if (this.UIVisible != _def_UIVisible)
                {
                    XmlHelper.AddAttribute(node, "dataFieldVisibility", this.UIVisible);
                }

                if (this.SortOrder != _def_sortOrder)
                {
                    XmlHelper.AddAttribute(node, "dataFieldSortOrder", this.SortOrder);
                }

                if (this.Default != _def_default)
                {
                    XmlHelper.AddAttribute(node, "default", this.Default);
                }

                if (this.Length != _def_length)
                {
                    XmlHelper.AddAttribute(node, "length", this.Length);
                }

                XmlHelper.AddAttribute(node, "scale", this.Scale);
                XmlHelper.AddAttribute(node, "id", this.Id);

                if (this.SortOrder != _def_sortOrder)
                {
                    XmlHelper.AddAttribute(node, "sortOrder", this.SortOrder);
                }

                XmlHelper.AddAttribute(node, "type", (int)this.DataType);

                if (this.AllowNull != _def_allowNull)
                {
                    XmlHelper.AddAttribute(node, "allowNull", this.AllowNull);
                }

                if (this.IsBrowsable != _def_isBrowsable)
                {
                    XmlHelper.AddAttribute(node, "isBrowsable", this.IsBrowsable);
                }

                if (RelationshipRef != null)
                {
                    var relationshipRefNode = oDoc.CreateElement("relationshipRef");
                    RelationshipRef.XmlAppend(relationshipRefNode);
                    node.AppendChild(relationshipRefNode);
                }

                var parentRefNode = oDoc.CreateElement("parentTableRef");
                ParentRef.XmlAppend(parentRefNode);
                node.AppendChild(parentRefNode);
            }
            catch (Exception ex)
            {
                throw;
            }
        }