示例#1
0
文件: Project.cs 项目: arrumanov/PMIS
        public void RemoveDepartment(ProjectDepartment projectDepartment)
        {
            projectDepartment.Validate();

            if (!ProjectDepartments.Any(i => i.Id == projectDepartment.Id))
            {
                throw new ValidationException("PROJDEPARTMENT-02");
            }

            ProjectDepartments.Update(projectDepartment);
        }
示例#2
0
文件: Project.cs 项目: arrumanov/PMIS
        //public DictionaryValue Probability { get; private set; }
        //public DictionaryValue Statement { get; private set; }


        //public ICollection<User> Users { get; private set; }
        //public ICollection<Task> Tasks { get; private set; }
        //public DomainState State { get; private set; }

        public void AddDepartment(ProjectDepartment projectDepartment)
        {
            projectDepartment.Validate();

            if (ProjectDepartments.Any(i => i.Id == projectDepartment.Id))
            {
                throw new ValidationException("PROJDEPARTMENT-01");
            }

            ProjectDepartments.Add(projectDepartment);
        }