Compare commits

..

No commits in common. "4b13bf6fe351337d5d7fb7f4862b8870da5214a5" and "be45122138c6f56165615bbace43bbd040e08f27" have entirely different histories.

View file

@ -77,10 +77,11 @@ public class AllTreatmentController {
} }
public void readAllAndShowInTableView() { public void readAllAndShowInTableView() {
this.treatments.clear();
comboBoxPatientSelection.getSelectionModel().select(0); comboBoxPatientSelection.getSelectionModel().select(0);
this.dao = DaoFactory.getDaoFactory().createTreatmentDao(); this.dao = DaoFactory.getDaoFactory().createTreatmentDao();
try { try {
this.treatments.setAll(dao.readAll()); this.treatments.addAll(dao.readAll());
} catch (SQLException exception) { } catch (SQLException exception) {
exception.printStackTrace(); exception.printStackTrace();
} }
@ -108,7 +109,7 @@ public class AllTreatmentController {
if (selectedPatient.equals("alle")) { if (selectedPatient.equals("alle")) {
try { try {
this.treatments.setAll(this.dao.readAll()); this.treatments.addAll(this.dao.readAll());
} catch (SQLException exception) { } catch (SQLException exception) {
exception.printStackTrace(); exception.printStackTrace();
} }
@ -117,7 +118,7 @@ public class AllTreatmentController {
Patient patient = searchInList(selectedPatient); Patient patient = searchInList(selectedPatient);
if (patient != null) { if (patient != null) {
try { try {
this.treatments.setAll(this.dao.readTreatmentsByPid(patient.getId())); this.treatments.addAll(this.dao.readTreatmentsByPid(patient.getId()));
} catch (SQLException exception) { } catch (SQLException exception) {
exception.printStackTrace(); exception.printStackTrace();
} }