def show_main(self): self.setupUi(self) self.setWindowTitle("DDB9") self.DatabaseComboBox.addItems(db.get_databases()) self.load_tables(self.DatabaseComboBox.currentText()) # print([self.TablecomboBox.itemText(i) for i in range(self.TablecomboBox.count())]) self.LoadTables.clicked.connect( lambda: self.load_tables(self.DatabaseComboBox.currentText())) self.LoadValues.clicked.connect(lambda: self.select_all( db.get_column_names(self.TablecomboBox.currentText()))) self.ListAll.clicked.connect(lambda: self.select_all( db.get_column_names(self.TablecomboBox.currentText()), all=True)) self.actionBuscar.triggered.connect(self.call_find) self.actionEditar_Registro.triggered.connect(self.edit_find) self.actionNuevo_Registro.triggered.connect( lambda: self.call_edit_insert(insertar=True)) self.actionNueva_Tabla.triggered.connect(self.call_new_table)
def update_reference_columns(self): self.ReferenceColumn.clear() self.ReferenceColumn.addItems( db.get_column_names(self.ReferenceTable.currentText()))
def call_edit_insert(self, insertar): InsertarEditar(self, insertar=insertar, table=self.TablecomboBox.currentText(), columns=db.get_column_names( self.TablecomboBox.currentText())).show()
def edit_find(self): Edit(self, self.TablecomboBox.currentText(), db.get_column_names(self.TablecomboBox.currentText())).show()
def call_find(self): buscar(self, self.TablecomboBox.currentText(), db.get_column_names(self.TablecomboBox.currentText())).show()