Selaa lähdekoodia

Update Patient

hapi
Nils Dittberner 10 vuotta sitten
vanhempi
commit
80fb9a9cd7
1 muutettua tiedostoa jossa 9 lisäystä ja 0 poistoa
  1. +9
    -0
      src/main/java/de/uniluebeck/mi/projmi6/controller/PatientEditorController.java

+ 9
- 0
src/main/java/de/uniluebeck/mi/projmi6/controller/PatientEditorController.java Näytä tiedosto

@@ -3,6 +3,8 @@ package de.uniluebeck.mi.projmi6.controller;
/** /**
* Created by 631806 on 12.11.15. * Created by 631806 on 12.11.15.
*/ */

import de.uniluebeck.mi.projmi6.db.DBHandler;
import de.uniluebeck.mi.projmi6.model.Kasse; import de.uniluebeck.mi.projmi6.model.Kasse;
import de.uniluebeck.mi.projmi6.model.Patient; import de.uniluebeck.mi.projmi6.model.Patient;
import javafx.collections.FXCollections; import javafx.collections.FXCollections;
@@ -11,6 +13,8 @@ import javafx.scene.control.*;
import javafx.event.ActionEvent; import javafx.event.ActionEvent;
import javafx.stage.Stage; import javafx.stage.Stage;


import java.sql.SQLException;

public class PatientEditorController { public class PatientEditorController {


/** /**
@@ -191,6 +195,11 @@ public class PatientEditorController {
}else{ }else{
copyFieldDataIntoPatient(patient); copyFieldDataIntoPatient(patient);
//Update db entry... TODO //Update db entry... TODO
try {
DBHandler.updatePatient(patient, 1005); // TODO: MitarbeiterID uebergeben!
} catch (SQLException e) {
e.printStackTrace();
}
} }
((Stage)patNachname.getScene().getWindow()).close(); ((Stage)patNachname.getScene().getWindow()).close();
} }


Ladataan…
Peruuta
Tallenna