public void EditTaskOwner(int id, int teamMemberId) { ProjectTask task = TryGet(id); task.Owner = TeamMemberController.GetTeamMember(id); _repository.Edit(task); }
public void MakeReports() { Console.WriteLine("Making reports!!"); foreach (var item in TeamMemberController.GetAll()) { MakeReport(item.Id); } }
public List <Report> GetAllReports(int teamMemberId) { var teamMember = TeamMemberController.GetTeamMember(teamMemberId); var ids = new HashSet <int>(); ids.Add(teamMemberId); foreach (var item in teamMember.Team) { ids.Add(item.Key); } var reports = GetAllReports(); for (int i = 0; i < reports.Count; i++) { if (ids.Contains(reports[i].OwnerId)) { reports.Add(reports[i]); } } return(reports); }