|
|
|
@@ -1,5 +1,8 @@ |
|
|
|
package de.uniluebeck.mi.projmi6.controller; |
|
|
|
|
|
|
|
import de.uniluebeck.mi.projmi6.model.Fall; |
|
|
|
import de.uniluebeck.mi.projmi6.model.StationsHistorie; |
|
|
|
import de.uniluebeck.mi.projmi6.model.Untersuchung; |
|
|
|
import de.uniluebeck.mi.projmi6.view.DateTimePicker; |
|
|
|
import javafx.fxml.FXML; |
|
|
|
import javafx.scene.control.Button; |
|
|
|
@@ -11,6 +14,12 @@ import javafx.scene.control.TableView; |
|
|
|
* Created by 631806 on 12.11.15. |
|
|
|
*/ |
|
|
|
public class StationsHistorieController { |
|
|
|
|
|
|
|
/** |
|
|
|
* The station history that is shown in the edit window, or null if a new station history should be created. |
|
|
|
*/ |
|
|
|
private StationsHistorie stationsHistorie = null; |
|
|
|
|
|
|
|
private MainController mainController; |
|
|
|
|
|
|
|
@FXML |
|
|
|
@@ -47,5 +56,57 @@ public class StationsHistorieController { |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
public void setStationsHistorie(StationsHistorie stationsHistorie){ |
|
|
|
this.stationsHistorie = stationsHistorie; |
|
|
|
if(stationsHistorie==null){ |
|
|
|
clearFields(); |
|
|
|
}else { |
|
|
|
copyStationsHistorieDataIntoFields(); |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
private void copyStationsHistorieDataIntoFields(){ |
|
|
|
// colStatHistAbteilung.setText(stationsHistorie.get()); |
|
|
|
// colStatHistStation.setText(stationsHistorie.getStation()); |
|
|
|
// colStatHistAufnahmeDatum.setDateTime(stationsHistorie.getAufnahmeDatum()); |
|
|
|
// colStatHistEntlassungsDatum.setDateTime(stationsHistorie.getEntlassungsDatum()); |
|
|
|
// dtTmAufnahme=setDateTime(stationsHistorie.getAufnahmeDatum()); |
|
|
|
// dtTmEntlassung=setDateTime(stationsHistorie.getEntlassungsDatum()); |
|
|
|
|
|
|
|
statHistCreator.setText(Integer.toString(stationsHistorie.getErsteller())); |
|
|
|
statHistCreatTime.setText(stationsHistorie.getErstellDatumZeit().toString()); |
|
|
|
statHistEditor.setText(Integer.toString(stationsHistorie.getBearbeiter())); |
|
|
|
statHistEditTime.setText(stationsHistorie.getBearbeitetDatumZeit().toString()); |
|
|
|
} |
|
|
|
|
|
|
|
private void copyFieldDataIntoStationsHistorie(StationsHistorie stationsHistorie){ |
|
|
|
if(stationsHistorie==null){ |
|
|
|
clearFields(); |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
// stationsHistorie.set(colStatHistAbteilung.getText()); |
|
|
|
// stationsHistorie.setStation(colStatHistStation.getText()); |
|
|
|
// stationsHistorie.setAufnahmeDatum(colStatHistAufnahmeDatum.getDateTime()); |
|
|
|
// stationsHistorie.getEntlassungsDatum(colStatHistEntlassungsDatum.getDateTime()); |
|
|
|
stationsHistorie.setAufnahmeDatum(dtTmAufnahme.getDateTime()); |
|
|
|
// stationsHistorie.getEntlassungsDatum(dtTmEntlassung.getDateTime()); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
private void clearFields(){ |
|
|
|
|
|
|
|
//statHistCreateTime.setText("<auto>"); |
|
|
|
//statHistCreator.setText("<auto>"); |
|
|
|
//statHistEditTime.setText("<auto>"); |
|
|
|
// statHistEditor.setText("<auto>"); |
|
|
|
|
|
|
|
colStatHistAbteilung.setText(""); |
|
|
|
colStatHistStation.setText(""); |
|
|
|
// colStatHistAufnahmeDatum.setDateTime(null); |
|
|
|
// colStatHistEntlassungsDatum.setDateTime(null); |
|
|
|
dtTmAufnahme.setDateTime(null); |
|
|
|
dtTmEntlassung.setDateTime(null); |
|
|
|
} |
|
|
|
} |