-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathShiftview.java
More file actions
55 lines (44 loc) · 1.33 KB
/
Copy pathShiftview.java
File metadata and controls
55 lines (44 loc) · 1.33 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
package PDBMS;
//Should be loaded when admin clicks shift on the form
import javafx.fxml.FXML;
import javafx.scene.control.Button;
import javafx.scene.control.TextArea;
import javafx.scene.control.TextField;
import javafx.stage.Stage;
import java.sql.ResultSet;
import java.sql.SQLException;
public class Shiftview {
@FXML
private TextField shiftid;
@FXML private TextField strt;
@FXML private TextField end;
@FXML private TextArea shifttdescrp;
@FXML private Button back;
Stage s;
public void initStatus(final Stage l){
s=l;
ResultSet r;
r=LoginManager.sql("select * from shiftview where shift_id= "+ Integer.parseInt(shiftid.getText()));
try {
if(r.next())
{ //ins.setVisible(false);
strt.setText(r.getString("start_time"));
end.setText(r.getString("end_time"));
shifttdescrp.setText(r.getString("shift_descrp"));
}
// else
// ins.setVisible(true);
} catch (SQLException e) {
e.printStackTrace();
}
}
public void getparam(String param)
{
shiftid.setText(param);
shiftid.setEditable(false);
}
@FXML
private void GoBackButton(){
s.close();
}
}