Skip to content
Snippets Groups Projects
Commit 27ee9e34 authored by Rafi Zereselasie (raz070)'s avatar Rafi Zereselasie (raz070)
Browse files

Shifts now have a position field, that the schedule classes methods are...

Shifts now have a position field, that the schedule classes methods are updated to take positions and return position data.
parent 61256d2a
No related branches found
No related tags found
No related merge requests found
package com.example.scheduler_server; package com.example.scheduler_server;
import java.sql.*; import java.sql.*;
import java.util.Locale;
/* /*
Name: Staff Name: Staff
...@@ -123,6 +124,19 @@ public class Staff { ...@@ -123,6 +124,19 @@ public class Staff {
return removedPosition; return removedPosition;
} }
protected void removePositionALLEmployee(String position) {
try {
String positionLowerCase = position.toLowerCase(Locale.ROOT);
Statement myStatement = dbConnection.createStatement();
ResultSet myRs = myStatement.executeQuery("select * from Employees");
while (myRs.next()) {
removePosition(Integer.parseInt(myRs.getString("employee_ID")), positionLowerCase);
}
} catch (Exception exception) {
exception.printStackTrace();
}
}
/* /*
Name: printEmployees Name: printEmployees
Parameters: none Parameters: none
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment