-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathEmployee_Show.java
More file actions
39 lines (34 loc) · 1.08 KB
/
Employee_Show.java
File metadata and controls
39 lines (34 loc) · 1.08 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
import java.awt.*;
import java.io.File;
import java.io.IOException;
class Employee_Show implements FileFunctions {
@Override
public void createFileBaseHTML() throws IOException {
// Not implemented
}
@Override
public void listUserdataFiles() throws IOException {
// Not implemented
}
@Override
public void removeFile(String id) throws IOException {
// Not implemented
}
public void viewFile(String id) {
File file = new File(FileFunctions.USER_DATA_DIR+"employee" + id + ".html");
if (file.exists()) {
try {
Desktop.getDesktop().open(file);
System.out.printf("Employee with ID: %s shown successfully%n", id);
} catch (IOException e) {
System.out.println("Error opening file: " + e.getMessage());
}
} else {
System.out.println("Employee record not found.");
}
}
@Override
public void updateFile(String id, String oldData, String newData) throws IOException {
// Not implemented
}
}