Finalize Services

This commit is contained in:
2025-07-15 17:33:15 -07:00
parent d8f6d606ae
commit 59944e5a66
5 changed files with 83 additions and 23 deletions
@@ -35,6 +35,16 @@ namespace BoredCareers.Controllers {
}
}
public async Task<bool> isLoggedInUserEmployeeOf(int CompanyID) {
Employee[] employees = await _databaseService.GetEmployees(CompanyID);
foreach (Employee cur in employees) {
if (getLoggedInUserID() == cur.AccountID) {
return true;
}
}
return false;
}
public string Substitue(string message, string subString, string Replacement) {
for (int i = 0; i < (message.Length - subString.Length); i++) {
if (message.Substring(i, subString.Length) == subString) {