Esempio n. 1
0
        private void ShowHierarchyEditor()
        {
            List <ArchAngel.Providers.EntityModel.Model.DatabaseLayer.ITable> mappedTables = Entity.MappedTables().ToList();

            if (mappedTables.Count == 0)
            {
                MessageBox.Show(this, "No tables are mapped to this entity. 'Table per Hierarchy' inheritance requires exactly one mapped table.", "No mapped table", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                return;
            }
            else if (mappedTables.Count > 1)
            {
                MessageBox.Show(this, "Multiple tables are mapped to this entity. 'Table per Hierarchy' inheritance requires exactly one mapped table.", "Too many mapped tables", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                return;
            }
            UserControls.FormInheritanceHierarchy form = new UserControls.FormInheritanceHierarchy(mappedTables[0]);
            form.ShowDialog(this);
            Populate();
        }
 private void mnuCreateTPHInheritance_Click(object sender, EventArgs e)
 {
     UserControls.FormInheritanceHierarchy form = new UserControls.FormInheritanceHierarchy(Table);
     form.ShowDialog(this);
 }
        private void ShowHierarchyEditor()
        {
            List<ArchAngel.Providers.EntityModel.Model.DatabaseLayer.ITable> mappedTables = Entity.MappedTables().ToList();

            if (mappedTables.Count == 0)
            {
                MessageBox.Show(this, "No tables are mapped to this entity. 'Table per Hierarchy' inheritance requires exactly one mapped table.", "No mapped table", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                return;
            }
            else if (mappedTables.Count > 1)
            {
                MessageBox.Show(this, "Multiple tables are mapped to this entity. 'Table per Hierarchy' inheritance requires exactly one mapped table.", "Too many mapped tables", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                return;
            }
            UserControls.FormInheritanceHierarchy form = new UserControls.FormInheritanceHierarchy(mappedTables[0]);
            form.ShowDialog(this);
            Populate();
        }
Esempio n. 4
0
 private void mnuCreateTPHInheritance_Click(object sender, EventArgs e)
 {
     UserControls.FormInheritanceHierarchy form = new UserControls.FormInheritanceHierarchy(Table);
     form.ShowDialog(this);
 }