-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathInventoryCount.java
More file actions
71 lines (55 loc) · 2.25 KB
/
Copy pathInventoryCount.java
File metadata and controls
71 lines (55 loc) · 2.25 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
package jfx;
import java.io.IOException;
import javafx.event.ActionEvent;
import javafx.fxml.FXML;
import javafx.scene.control.Button;
import javafx.scene.control.TextField;
public class InventoryCount extends btp400.a1.InventoryManager {
@FXML
private Button back;
@FXML
private Button clear;
@FXML
private Button check;
@FXML
private TextField materialname;
@FXML
private TextField displayArea;
@FXML
void backClicked(ActionEvent event) throws IOException {
Main m = new Main();
m.changeScene("MainPage.fxml");
}
@FXML
void checkClicked(ActionEvent event) {
if(materialname.getText().toString().toUpperCase().equals("BOLT"))
displayArea.setText(getInvCountOf("BOLT"));
else if (materialname.getText().toString().toUpperCase().equals("SCREWS"))
displayArea.setText(getInvCountOf("SCREWS"));
else if (materialname.getText().toString().toUpperCase().equals("AXELS"))
displayArea.setText(getInvCountOf("AXELS"));
else if (materialname.getText().toString().toUpperCase().equals("DOORS"))
displayArea.setText(getInvCountOf("DOORS"));
else if (materialname.getText().toString().toUpperCase().equals("BRAKES"))
displayArea.setText(getInvCountOf("BRAKES"));
else if (materialname.getText().toString().toUpperCase().equals("WINDSHIELDS"))
displayArea.setText(getInvCountOf("WINDSHIELDS"));
else if (materialname.getText().toString().toUpperCase().equals("GEARBOX"))
displayArea.setText(getInvCountOf("GEARBOX"));
else if (materialname.getText().toString().toUpperCase().equals("SENSORS"))
displayArea.setText(getInvCountOf("SENSORS"));
else if (materialname.getText().toString().toUpperCase().equals("PAINT"))
displayArea.setText(getInvCountOf("PAINT"));
else if (materialname.getText().toString().toUpperCase().equals("TRANSMISSION"))
displayArea.setText(getInvCountOf("TRANSMISSION"));
else if (materialname.getText().isEmpty())
displayArea.setText("ENTER MATERIAL NAME!!");
else
displayArea.setText("WRONG MATERIAL NAME!!");
}
@FXML
void clearClicked(ActionEvent event) {
displayArea.setText("");
materialname.setText("");
}
}