Example #1
0
        public void EditTaskOwner(int id, int teamMemberId)
        {
            ProjectTask task = TryGet(id);

            task.Owner = TeamMemberController.GetTeamMember(id);
            _repository.Edit(task);
        }
Example #2
0
 public void MakeReports()
 {
     Console.WriteLine("Making reports!!");
     foreach (var item in TeamMemberController.GetAll())
     {
         MakeReport(item.Id);
     }
 }
Example #3
0
        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);
        }