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