Skip to content
Snippets Groups Projects
Commit 40a555d3 authored by Eilert Tunheim's avatar Eilert Tunheim
Browse files

Merge remote-tracking branch 'origin/Eilerts_branch' into Eilerts_branch

# Conflicts:
#	src/main/java/com/application/GUI/LineChartFunctionality.java
#	target/classes/com/application/DB/DB.class
#	target/classes/com/application/GUI/LineChartFunctionality.class
parents 99fd7310 545ca322
No related branches found
No related tags found
No related merge requests found
...@@ -25,11 +25,14 @@ public final class Constants { ...@@ -25,11 +25,14 @@ public final class Constants {
public static String MOISTURE_GOAL = ""; public static String MOISTURE_GOAL = "";
// Number of wanted drying periods // Number of wanted drying periods
public static int NUMBER_OF_PERIODS = 1; public static int NUMBER_OF_PERIODS = 3;
// Database ID/name // Database ID/name
public static final String PROJECT_ID = "sf-drying-optimization"; public static final String PROJECT_ID = "sf-drying-optimization";
public static final int LOCATION_ID = 124;
public static final String MAN_MOISTURE_TABLE = "int_dk_manMoisture";
// Location Valasen(124) // Location Valasen(124)
// Project settings // Project settings
......
...@@ -585,4 +585,16 @@ public class DB { ...@@ -585,4 +585,16 @@ public class DB {
// Returns a treemap that sorts the dates incrementally // Returns a treemap that sorts the dates incrementally
return new TreeMap<>(sortedFinalResults); return new TreeMap<>(sortedFinalResults);
} }
public static void pushManMoisture(String moisture) throws Exception {
// Sqlstatement
final String sqlStatement =
"INSERT INTO " + PROJECT_ID + "." + LOCATION_ID + "." + MAN_MOISTURE_TABLE + "(moisture) " +
"VALUES("+moisture+") ";
System.out.println(sqlStatement);
HelpingFunctions.createQueryJob(sqlStatement);
}
} }
package com.application.GUI; package com.application.GUI;
import com.application.DB.DB;
import javafx.geometry.Pos; import javafx.geometry.Pos;
import javafx.scene.Scene; import javafx.scene.Scene;
import javafx.scene.control.Button; import javafx.scene.control.Button;
...@@ -38,6 +39,13 @@ public class OutputPopUpWindow { ...@@ -38,6 +39,13 @@ public class OutputPopUpWindow {
Button finishButton = new Button("Finish"); Button finishButton = new Button("Finish");
finishButton.setId("inputButtonStart"); finishButton.setId("inputButtonStart");
finishButton.setAlignment(Pos.BOTTOM_CENTER); finishButton.setAlignment(Pos.BOTTOM_CENTER);
finishButton.setOnAction(e -> {
try {
DB.pushManMoisture(moistureCheckTextField.getCharacters().toString());
} catch (Exception ex) {
ex.printStackTrace();
}
});
VBox layout = new VBox(10); VBox layout = new VBox(10);
......
print("This line will be printed.")
print(locals())
\ No newline at end of file
print("This line will be printed.")
print(locals())
\ No newline at end of file
No preview for this file type
No preview for this file type
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment