Пример #1
0
        private void ReassignProjectManager(Guid fromUserId, Guid toUserId)
        {
            var filter = new TaskFilter {
                UserId = fromUserId, ProjectStatuses = new List <ProjectStatus> {
                    ProjectStatus.Open, ProjectStatus.Paused
                }
            };
            var projects = ProjectEngine.GetByFilter(filter);

            foreach (var project in projects)
            {
                project.Responsible = toUserId;
                ProjectEngine.SaveOrUpdate(project, false);
            }
        }