public void Delete(Milestone milestone)
        {
            if (milestone == null)
            {
                throw new ArgumentNullException("milestone");
            }

            ProjectSecurity.DemandDelete(milestone);
            DaoFactory.MilestoneDao.Delete(milestone.ID);

            var users = new HashSet <Guid> {
                milestone.Project.Responsible, milestone.Responsible
            };

            NotifyClient.Instance.SendAboutMilestoneDeleting(users, milestone);
        }
Ejemplo n.º 2
0
        public void Delete(Task task)
        {
            if (task == null)
            {
                throw new ArgumentNullException("task");
            }

            ProjectSecurity.DemandDelete(task);
            task.Links.ForEach(link => taskDao.RemoveLink(link));
            task.SubTasks.ForEach(subTask => subtaskDao.Delete(subTask.ID));
            taskDao.Delete(task.ID);

            var recipients = GetSubscribers(task);

            if (recipients.Count != 0)
            {
                NotifyClient.Instance.SendAboutTaskDeleting(recipients, task);
            }
        }
Ejemplo n.º 3
0
        public void Delete(Task task)
        {
            if (task == null)
            {
                throw new ArgumentNullException("task");
            }

            ProjectSecurity.DemandDelete(task);
            DaoFactory.TaskDao.Delete(task);

            var recipients = GetSubscribers(task);

            if (recipients.Count != 0)
            {
                NotifyClient.Instance.SendAboutTaskDeleting(recipients, task);
            }

            UnSubscribeAll(task);
        }
Ejemplo n.º 4
0
 public void Delete(TimeSpend timeSpend)
 {
     ProjectSecurity.DemandDelete(timeSpend);
     DaoFactory.TimeSpendDao.Delete(timeSpend.ID);
 }