Added Redirection to SUmmary pages after Import.

This commit is contained in:
YaFedImYaEatIm
2016-09-18 13:59:33 +12:00
parent 8a4134ae4c
commit a857cfb7af
3 changed files with 18 additions and 1 deletions
@@ -30,26 +30,38 @@ public class Importer{
if (scene == SceneCode.AIRLINE_RAW_DATA) {
try {
showSuccessAlert(parent.getCurrentDataset().importAirline(file.getPath()));
parent.getMenuController().replaceSceneContent(SceneCode.AIRLINE_SUMMARY);
} catch (DataException e) {
e.printStackTrace();
} catch (Exception e) {
e.printStackTrace();
}
} else if (scene == SceneCode.AIRPORT_RAW_DATA) {
try {
showSuccessAlert(parent.getCurrentDataset().importAirport(file.getPath()));
parent.getMenuController().replaceSceneContent(SceneCode.AIRPORT_SUMMARY);
} catch (DataException e) {
e.printStackTrace();
} catch (Exception e) {
e.printStackTrace();
}
} else if (scene == SceneCode.ROUTE_RAW_DATA) {
try {
showSuccessAlert(parent.getCurrentDataset().importRoute(file.getPath()));
parent.getMenuController().replaceSceneContent(SceneCode.ROUTE_SUMMARY);
} catch (DataException e) {
e.printStackTrace();
} catch (Exception e) {
e.printStackTrace();
}
} else if (scene == SceneCode.FLIGHT_RAW_DATA) {
try {
showSuccessAlert(parent.getCurrentDataset().importFlight(file.getPath()));
parent.getMenuController().replaceSceneContent(SceneCode.FLIGHT_SUMMARY);
} catch (DataException e) {
e.printStackTrace();
} catch (Exception e) {
e.printStackTrace();
}
}
}