Beispiel #1
0
 def database_discount(self):
     self.Main.hide()
     self.Edit_doctors.hide()
     self.Edit_patients.hide()
     self.Edit_medicines.hide()
     self.Patients.hide()
     self.Doctors.hide()
     self.Medicines.hide()
     self.Discount.show()
     self.pushButton_dis_show.clicked.connect(self.load_discount)
     self.pushButton_dis_add.clicked.connect(self.add_discount)
     self.pushButton_dis_edit.clicked.connect(self.edit_discount)
     self.pushButton_dis_del.clicked.connect(self.delete_discount)
     self.pushButton_dis_search.clicked.connect(self.search_discount)
     self.pushButton_dis_menu.clicked.connect(self.creation)
     self.pushButton_27.clicked.connect(self.sort_id_discount)
     self.pushButton_28.clicked.connect(self.sort_id_alpha)
     self.pushButton_30.clicked.connect(self.sort_interest1_dis)
     self.pushButton_29.clicked.connect(self.sort_interest2_dis)
     self.pushButton_31.clicked.connect(self.database_patients)
     self.pushButton_32.clicked.connect(self.database_doctors)
     self.pushButton_33.clicked.connect(self.database_visits)
     self.pushButton_34.clicked.connect(self.database_medicines)
     self.tableWidget_discount.setRowCount(0)
     for row_number, row_data in enumerate(
             Database_module.read_from_db_dis()):
         self.tableWidget_discount.insertRow(row_number)
         for column_number, data in enumerate(row_data):
             self.tableWidget_discount.setItem(
                 row_number, column_number,
                 QtWidgets.QTableWidgetItem(str(data)))
Beispiel #2
0
 def load_discount(self):
     self.tableWidget_discount.setRowCount(0)
     for row_number, row_data in enumerate(
             Database_module.read_from_db_dis()):
         self.tableWidget_discount.insertRow(row_number)
         for column_number, data in enumerate(row_data):
             self.tableWidget_discount.setItem(
                 row_number, column_number,
                 QtWidgets.QTableWidgetItem(str(data)))