Пример #1
0
        public void EditTaskOwner(int id, int teamMemberId)
        {
            ProjectTask task = TryGet(id);

            task.Owner = TeamMemberController.GetTeamMember(id);
            _repository.Edit(task);
        }
Пример #2
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);
        }