public void ModifyTable(ConnectionParams cp, long tableId) { try { _initializing = true; this.ConnectionParams = cp; TableObj = new TableWrapper(tableId); PopulateTableData(); BindTableColumns(); Mode = EditMode.Modify; _primaryKeys.InitializePrimaryKeys(TableKeyEditorMode.SingleTable, true, TableObj); _foreignKeys.InitializeForeignKeys(TableKeyEditorMode.SingleTable, TableObj, false); cmbFileGroup.Enabled = false; } finally { _initializing = false; } }
private void ModifySelectedForeignKey( ) { if (grd.CurrentRow == null) { KeyPanelVisible = false; return; } DataGridViewRow row = grd.CurrentRow; long tableId = (int)row.Cells[1].Value; TableWrapper hostTbl = new TableWrapper(tableId); hostTbl.ConnectionParams = _cp; hostTbl.LoadProperties(); _foreignKeyEdit.InitializeForeignKeys(TableKeyEditorMode.SingleTable, hostTbl, (int)row.Cells[0].Value); UpdateHeaderText(); KeyPanelVisible = true; }