Esempio n. 1
0
        public override void Save(XmlElement parentXml)
        {
            XmlElement xml = XmlTool.AddChild(parentXml, "Check");

            //xml.SetAttribute("expr", Expression);
            SaveCommon(xml);
        }
Esempio n. 2
0
 public void Save(XmlElement xml)
 {
     if (Dialect != null)
     {
         xml.SetAttribute("dialect", XmlTool.ValueToString(typeof(ISqlDialect), Dialect));
     }
     if (ForceSingleSchema)
     {
         xml.SetAttribute("singleschema", "1");
     }
     SaveBase(xml);
     foreach (TableStructure table in Tables)
     {
         XmlElement tx = XmlTool.AddChild(xml, "Table");
         table.Save(tx);
     }
     foreach (string objtype in SpecificObjects.Keys)
     {
         ISpecificRepresentation repr = SpecificRepresentationAddonType.Instance.FindRepresentation(objtype);
         foreach (SpecificObjectStructure obj in SpecificObjects[objtype])
         {
             XmlElement tx = XmlTool.AddChild(xml, repr.XmlElementName ?? "Specific");
             if (repr.XmlElementName == null)
             {
                 tx.SetAttribute("objtype", objtype);
             }
             obj.Save(tx);
         }
     }
     foreach (DomainStructure dom in Domains)
     {
         XmlElement dx = XmlTool.AddChild(xml, "Domain");
         dom.Save(dx);
     }
 }
Esempio n. 3
0
        public override void Save(XmlElement parentXml)
        {
            XmlElement xml = XmlTool.AddChild(parentXml, "Unique");

            SaveColumns(xml);
            SaveCommon(xml);
        }
Esempio n. 4
0
        public override void Save(XmlElement parentXml)
        {
            XmlElement xml = XmlTool.AddChild(parentXml, "ForeignKey");

            SaveColumns(xml);
            SaveFkData(xml);
            SaveCommon(xml);
        }
Esempio n. 5
0
 public override void SaveToXml(XmlElement xml)
 {
     base.SaveToXml(xml);
     foreach (var cmd in m_commands)
     {
         cmd.SaveToXml(XmlTool.AddChild(xml, "Command"));
     }
 }
Esempio n. 6
0
 private static void SaveProperty <T>(PropertyInfo prop, object target, object diffBase, XmlElement xml, Func <T, string> getvalue)
 {
     if (!prop.CallGet(target).Equals(prop.CallGet(diffBase)))
     {
         object     value = prop.CallGet(target);
         XmlElement fld   = XmlTool.AddChild(xml, "Property");
         fld.SetAttribute("name", prop.Name);
         fld.SetAttribute("value", getvalue((T)value));
     }
 }
Esempio n. 7
0
 public override void SaveToXml(XmlElement xml)
 {
     base.SaveToXml(xml);
     xml.SetAttribute("type", "bulkcopy");
     m_source.SaveToXml(XmlTool.AddChild(xml, "Source"));
     m_target.SaveToXml(XmlTool.AddChild(xml, "Target"));
     if (m_transform == null)
     {
         xml.AppendChild(xml.OwnerDocument.ImportNode(m_transformXml, true));
     }
     else
     {
         m_transform.SaveToXml(XmlTool.AddChild(xml, "Transform"));
     }
     m_copyOptions.SaveToXml(xml.AddChild("CopyOptions"));
 }
Esempio n. 8
0
 private void SaveToXml(XmlElement xml, bool oldStyle)
 {
     SaveBase(xml);
     if (FullName != null)
     {
         FullName.SaveToXml(xml);
     }
     foreach (ColumnStructure col in Columns)
     {
         XmlElement cx = XmlTool.AddChild(xml, "Column");
         col.Save(cx);
     }
     if (oldStyle)
     {
         foreach (DatAdmin.Constraint cnt in Constraints)
         {
             cnt.Save(xml);
         }
     }
     else
     {
         foreach (DatAdmin.Constraint cnt in Constraints)
         {
             XmlElement cx = XmlTool.AddChild(xml, "Constraint");
             cnt.SaveToXml(cx);
         }
     }
     XmlTool.SaveParameters(xml, SpecificData);
     if (!String.IsNullOrEmpty(Comment))
     {
         xml.AddChild("Comment").InnerText = Comment;
     }
     if (FixedData != null)
     {
         FixedData.SaveToXml(xml.AddChild("FixedData"));
     }
 }