示例#1
0
        protected void DropTableReferences(ITableStructure table, DropFlags flags)
        {
            bool refs = (flags & DropFlags.DropReferences) != 0;

            if (refs)
            {
                this.DropConstraints(table.GetReferencedFrom(), flags);
            }
        }
示例#2
0
 public void Save(XmlElement xml)
 {
     this.SavePropertiesCore(xml);
     new TableStructure(m_table).Save(xml.AddChild("Structure"));
     foreach (var fk in m_table.GetReferencedFrom())
     {
         var x = xml.AddChild("Reference");
         fk.Table.FullName.SaveToXml(x);
         new ForeignKey(fk).Save(x);
     }
 }
示例#3
0
        public SelectReferenceForm(ITableStructure table, string activeColumn, List <string> availcols, ISqlDialect dialect)
        {
            InitializeComponent();
            m_table     = table;
            m_dialect   = dialect;
            m_availcols = availcols;

            FillList(lsvDetailReferences, m_table.GetReferencedFrom(), null, AcceptDetail);
            FillList(lsvMasterReferences, m_table.GetConstraints <IForeignKey>(), activeColumn, AcceptMaster);
            tbxBaseTable.Text = table.ToString();
        }