Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/EmployManagementSystem.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,14 @@ public static void main(String[] args) {

case 3:
System.out.print("\nEnter Employee ID to remove: ");
viewerData.listUserdataFiles();
String removeId = sc.nextLine();
new Employee_Remove().removeFile(removeId);
break;

case 4:
System.out.print("\nEnter Employee ID to update: ");
viewerData.listUserdataFiles();
String updateId = sc.nextLine();
System.out.print("Enter old data to update: ");
String oldData = sc.nextLine();
Expand Down
4 changes: 2 additions & 2 deletions src/EmployeeDataView.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import java.io.File;
public class EmployeeDataView {
public void listUserdataFiles() {
System.out.println("List of Employee IDs EXIST2\n");
System.out.println("\nList of Employee IDs EXIST\n");
File userdataDir = new File("userdata");
if (userdataDir.exists() && userdataDir.isDirectory()) {
String[] fileList = userdataDir.list();
Expand All @@ -12,7 +12,7 @@ public void listUserdataFiles() {
if (startIndex != -1 && endIndex != -1 && startIndex < endIndex) {
StringBuffer buffer = new StringBuffer(fileName);
String extractedWord = buffer.substring(startIndex, endIndex);
System.out.println(extractedWord);
System.out.println(" - " + extractedWord);
}
}
} else {
Expand Down