void emptyReference_MouseClick(object sender, MouseEventArgs e)
        {
            List <ITable> unavailableEntities = new List <ITable>();

            foreach (Relationship relationship in Table.Relationships)
            {
                if (relationship.PrimaryTable == Table)
                {
                    unavailableEntities.Add(relationship.ForeignTable);
                }
                else if (relationship.ForeignTable == Table)
                {
                    unavailableEntities.Add(relationship.PrimaryTable);
                }
            }
            UserControls.FormSelectTable form = new UserControls.FormSelectTable(Table, unavailableEntities, null, "Select parent entity");
            form.ShowDialog();

            if (form.SelectedTable != null)
            {
                Table.AddRelationship(new RelationshipImpl()
                {
                    PrimaryTable = Table,
                    ForeignTable = form.SelectedTable
                });
                Populate();
            }
        }
        private void emptyTable_MouseClick(object sender, MouseEventArgs e)
        {
            BusyPopulating = true;

            try
            {
                List<ITable> unavailableTables = new List<ITable>();
                unavailableTables.AddRange(TheEntity.MappedTables());

                UserControls.FormSelectTable form = new UserControls.FormSelectTable(TheEntity, unavailableTables, null, "Select table to map");
                form.ShowDialog();

                if (form.SelectedTable != null && TableAdded != null)
                    TableAdded(form.SelectedTable);
            }
            finally
            {
                BusyPopulating = false;
                Populate();
            }
        }
        void emptyReference_MouseClick(object sender, MouseEventArgs e)
        {
            List<ITable> unavailableEntities = new List<ITable>();

            foreach (Relationship relationship in Table.Relationships)
            {
                if (relationship.PrimaryTable == Table)
                    unavailableEntities.Add(relationship.ForeignTable);
                else if (relationship.ForeignTable == Table)
                    unavailableEntities.Add(relationship.PrimaryTable);
            }
            UserControls.FormSelectTable form = new UserControls.FormSelectTable(Table, unavailableEntities, null, "Select parent entity");
            form.ShowDialog();

            if (form.SelectedTable != null)
            {
                Table.AddRelationship(new RelationshipImpl()
                {
                    PrimaryTable = Table,
                    ForeignTable = form.SelectedTable
                });
                Populate();
            }
        }