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);
        }
Esempio 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);
            }
        }
Esempio 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);
        }
Esempio n. 4
0
 public void Delete(TimeSpend timeSpend)
 {
     ProjectSecurity.DemandDelete(timeSpend);
     DaoFactory.TimeSpendDao.Delete(timeSpend.ID);
 }