Beispiel #1
0
 def cancel(self):
     dialog = ConfirmMsgClass.ConfirmYesNo()
     if dialog.ans == True:
         print("Discard")
         self.close()
     else:
         print("Cancel")
Beispiel #2
0
 def cancel(self):
     title = "New Patient is canceling"
     textInfo = "Your entered information has not been saved."
     dialog = ConfirmMsgClass.ConfirmYesNo(title, textInfo)
     if dialog.ans == True:
         self.close()
     else:
         pass
Beispiel #3
0
 def deleteButtonPressed(self, id):
     title = "Confirm deleting"
     textInfo = "Delete this Employee"
     question = "Do you sure to delete " + str(id)
     dialog = ConfirmMsgClass.ConfirmYesNo(title, textInfo, question)
     if dialog.ans == True:
         users = self.ctrlDatabase.getUserFromDatabase()
         for user in users:
             if user.id == id:
                 users.remove(user)
                 position = self.getPositionByPosition(id[:1])
                 self.ctrlDatabase.updateDatabase(users)
                 self.updateTable(position)
                 return True
         raise KeyError
     else:
         pass
Beispiel #4
0
 def deleteButtonPressed(self, AN):
     title = "Confirm deleting"
     text_info = "Delete this Patient"
     question = "Do you sure to delete " + str(AN)
     dialog = ConfirmMsgClass.ConfirmYesNo(title, text_info, question)
     if dialog.ans:
         patients = self.nurse_app.getPatientFromDatabase()
         appointments = self.nurse_app.getAppointmentFromDatabase()
         for patient in patients:
             if patient.AN == AN:
                 patients.remove(patient)
                 self.nurse_app.updatePatientDatabase(patients)
                 self.tab1.updateTable()
                 break
         for appointment in appointments:
             if appointment.patient.AN == AN:
                 appointments.remove(appointment)
                 self.nurse_app.updateAppointmentDatabase(appointments)
                 break
     else:
         pass