public void UpdateEmployee(Employee employee) { employeeService.UpdateEmployee(employee); AllEmployees[AllEmployees.IndexOf(AllEmployees.FirstOrDefault(m => m.ID == employee.ID))] = employee; Filter(); Search(); mainWindow.DisplayEmployeesList(); }