public void DoEdit() { var tbl = new TableAppObject(); tbl.AssignDbObjectFields(this); tbl.ConnPack = ConnPack; tbl.DoEdit(); }
public Table_SourceTreeNode(ITableSource conn, ITreeNode parent, NameWithSchema tblname) : base(conn, parent, tblname.ToString("F")) { m_conn = conn; m_tblname = tblname; var appobj = new TableAppObject(); appobj.FillFromTable(conn); SetAppObject(appobj); }
public override void GetObjectList(List <AppObject> objs, AppObject appobj, ConnectionPack connpack) { ObjectPath objpath = appobj.GetObjectPath(); IDatabaseSource conn = appobj.FindDatabaseConnection(connpack); if (conn != null && conn.Connection.IsOpened) { var dbmem = new DatabaseStructureMembers(); dbmem.IgnoreSystemObjects = true; if (_Type.ObjectType == "table") { dbmem.TableList = true; } else { var smem = new SpecificObjectMembers { ObjectList = true }; dbmem.SpecificObjectOverride[_Type.ObjectType] = smem; } var dbs = conn.InvokeLoadStructure(dbmem, null); if (_Type.ObjectType == "table") { foreach (var tbl in dbs.Tables) { var o = new TableAppObject(); o.FillFromDatabase(conn); o.DbObjectName = tbl.FullName; objs.Add(o); } } else { if (dbs.SpecificObjects.ContainsKey(_Type.ObjectType)) { foreach (var spec in dbs.SpecificObjects[_Type.ObjectType]) { var o = new SpecificObjectAppObject(); o.FillFromDatabase(conn); o.DbObjectName = spec.ObjectName; o.DbObjectType = _Type.ObjectType; objs.Add(o); } } } } objs.SortByKey(o => o.ToString()); }
public void DoEdit() { var tbl = new TableAppObject(); tbl.AssignDbObjectFields(this); tbl.ConnPack = ConnPack; if (Constraint is IPrimaryKey || Constraint is IIndex || Constraint is IUnique) { tbl.DoEdit(AlterTableEditorPars.Tab.IndexesKeys); } if (Constraint is IForeignKey) { tbl.DoEdit(AlterTableEditorPars.Tab.ForeignKeys); } if (Constraint is ICheck) { tbl.DoEdit(AlterTableEditorPars.Tab.Checks); } }