Compare commits
No commits in common. "69f89c8783a9d2e64260bf2b430106caca82e9dd" and "0c3c1ec9df33fca9bed26c703a59c9e214a63d48" have entirely different histories.
69f89c8783
...
0c3c1ec9df
1 changed files with 4 additions and 3 deletions
|
@ -77,10 +77,11 @@ public class AllTreatmentController {
|
|||
}
|
||||
|
||||
public void readAllAndShowInTableView() {
|
||||
this.treatments.clear();
|
||||
comboBoxPatientSelection.getSelectionModel().select(0);
|
||||
this.dao = DaoFactory.getDaoFactory().createTreatmentDao();
|
||||
try {
|
||||
this.treatments.setAll(dao.readAll());
|
||||
this.treatments.addAll(dao.readAll());
|
||||
} catch (SQLException exception) {
|
||||
exception.printStackTrace();
|
||||
}
|
||||
|
@ -108,7 +109,7 @@ public class AllTreatmentController {
|
|||
|
||||
if (selectedPatient.equals("alle")) {
|
||||
try {
|
||||
this.treatments.setAll(this.dao.readAll());
|
||||
this.treatments.addAll(this.dao.readAll());
|
||||
} catch (SQLException exception) {
|
||||
exception.printStackTrace();
|
||||
}
|
||||
|
@ -117,7 +118,7 @@ public class AllTreatmentController {
|
|||
Patient patient = searchInList(selectedPatient);
|
||||
if (patient != null) {
|
||||
try {
|
||||
this.treatments.setAll(this.dao.readTreatmentsByPid(patient.getId()));
|
||||
this.treatments.addAll(this.dao.readTreatmentsByPid(patient.getId()));
|
||||
} catch (SQLException exception) {
|
||||
exception.printStackTrace();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue