/// <summary> /// Helper method to remove a user from project users list /// </summary> /// <param name="user">The User who will be removed from the project.</param> public void RemoveUser(User user) { try { var associatedUser = Mapper.Map <ProjectUser>(user); ProjectUsers.Remove(associatedUser); } catch (Exception e) { Console.WriteLine(e); } }
private async System.Threading.Tasks.Task RemoveUserFromProject() { try { await adminService.RemoveUserFromProjectAsync(ProjectSelectedUser, SelectedProject); AllCompanyUsers.Add(ProjectSelectedUser); ProjectUsers.Remove(ProjectSelectedUser); } catch (TimeoutException timeoutEx) { _eventAggregator.GetEvent <TimeoutErrorEvent>().Publish(timeoutEx); } }