Exemplo n.º 1
0
        public void AddToTeam(Project project, Guid participant, bool sendNotification)
        {
            if (project == null)
            {
                throw new ArgumentNullException("project");
            }

            ProjectSecurity.DemandEditTeam(project);
            projectDao.AddToTeam(project.ID, participant);

            if (!factory.DisableNotifications && sendNotification && !project.Responsible.Equals(participant) && participant != SecurityContext.CurrentAccount.ID)
            {
                NotifyClient.Instance.SendInvaiteToProjectTeam(participant, project);
            }
        }
Exemplo n.º 2
0
        public virtual void AddToTeam(Project project, Participant participant, bool sendNotification)
        {
            if (project == null)
            {
                throw new ArgumentNullException("project");
            }
            if (participant == null)
            {
                throw new ArgumentNullException("participant");
            }

            ProjectSecurity.DemandEditTeam(project);
            projectDao.AddToTeam(project.ID, participant.ID);
            TimeLinePublisher.Team(project, participant.UserInfo, EngineResource.ActionText_AddToTeam);

            if (!_factory.DisableNotifications && sendNotification && !project.Responsible.Equals(participant.ID))
            {
                NotifyClient.Instance.SendInvaiteToProjectTeam(participant.ID, project);
            }
        }