예제 #1
0
    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)
예제 #2
0
 def update_reference_columns(self):
     self.ReferenceColumn.clear()
     self.ReferenceColumn.addItems(
         db.get_column_names(self.ReferenceTable.currentText()))
예제 #3
0
 def call_edit_insert(self, insertar):
     InsertarEditar(self,
                    insertar=insertar,
                    table=self.TablecomboBox.currentText(),
                    columns=db.get_column_names(
                        self.TablecomboBox.currentText())).show()
예제 #4
0
 def edit_find(self):
     Edit(self, self.TablecomboBox.currentText(),
          db.get_column_names(self.TablecomboBox.currentText())).show()
예제 #5
0
 def call_find(self):
     buscar(self, self.TablecomboBox.currentText(),
            db.get_column_names(self.TablecomboBox.currentText())).show()