Exemplo n.º 1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Project" /> class.
 /// </summary>
 /// <param name="id">The project identifier.</param>
 /// <param name="name">The name of the project.</param>
 /// <param name="description">The description of the project.</param>
 /// <param name="projectOrdered">The project ordered of the project.</param>
 /// <param name="receivingOrganization">The receiving organization of the project.</param>
 /// <param name="mandatory">if set to <c>true</c> project is mandatory.</param>
 /// <param name="startDate">The start date of the project.</param>
 /// <param name="endDate">The end date of the project.</param>
 /// <param name="department">The department of the project.</param>
 /// <param name="classification">The classification of the project.</param>
 /// <param name="tasks">The tasks of the project.</param>
 /// <param name="risks">The risks of the project.</param>
 /// <param name="owner">The owner of the project.</param>
 /// <param name="manager">The manager of the project.</param>
 /// <param name="teamMember">The team members of the project.</param>
 /// <param name="isDeleted">if set to <c>true</c> project is deleted, otherwise <c>false</c>.</param>
 public Project(ProjectId id, string name, string description, string projectOrdered, string receivingOrganization, bool mandatory,
                DateTime startDate, DateTime endDate, Department department, PpsClassification classification, IEnumerable <Task> tasks,
                IEnumerable <Risk> risks, UserId owner, UserId manager, IList <TeamMember> teamMember, bool isDeleted)
 {
     this._id                   = id;
     this.Name                  = name;
     this.Description           = description;
     this.ProjectOrderer        = projectOrdered;
     this.RecievingOrganization = receivingOrganization;
     this.Mandatory             = mandatory;
     this.StartDate             = startDate;
     this.EndDate               = endDate;
     this.Department            = department;
     this.Classification        = classification;
     this.Tasks                 = tasks;
     this.Risks                 = risks;
     this.Owner                 = owner;
     this.Manager               = manager;
     this.TeamMembers           = teamMember;
     this.IsDeleted             = isDeleted;
 }
Exemplo n.º 2
0
        /// <summary>
        /// Changes the information for the project.
        /// </summary>
        /// <param name="name">The name of the project.</param>
        /// <param name="description">The description of the project.</param>
        /// <param name="projectOrdered">The project ordered.</param>
        /// <param name="receivingOrganization">The receiving organization of the project.</param>
        /// <param name="mandatory">if set to <c>true</c> project is mandatory.</param>
        /// <param name="startDate">The start date of the project.</param>
        /// <param name="endDate">The end date of the project.</param>
        /// <param name="department">The department of the project.</param>
        /// <param name="classification">The classification of the project.</param>
        /// <param name="owner">The owner of the project.</param>
        /// <param name="manager">The manager of the project.</param>
        public void ChangeInformation(string name, string description, string projectOrdered, string receivingOrganization, bool mandatory,
                                      DateTime startDate, DateTime endDate, Department department, PpsClassification classification, UserId owner, UserId manager)
        {
            this.Name                  = name;
            this.Description           = description;
            this.ProjectOrderer        = projectOrdered;
            this.RecievingOrganization = receivingOrganization;
            this.Mandatory             = mandatory;
            this.StartDate             = startDate;
            this.EndDate               = endDate;
            this.Department            = department;
            this.Classification        = classification;
            this.Owner                 = owner;
            this.Manager               = manager;
            this.IsNew                 = false;

            var @event = new ProjectInformationChanged(this.Id, this.Name, this.Description, this.ProjectOrderer,
                                                       this.RecievingOrganization, this.Mandatory, this.StartDate, this.EndDate, this.Department.Id,
                                                       this.Classification.Id, this.Owner, this.Manager);

            this.ApplyChange(@event);
        }
Exemplo n.º 3
0
        /// <summary>
        /// Creates the project.
        /// </summary>
        /// <param name="name">The name of the project.</param>
        /// <param name="description">The description of the project.</param>
        /// <param name="projectOrdered">The project ordered.</param>
        /// <param name="receivingOrganization">The receiving organization of the project.</param>
        /// <param name="mandatory">if set to <c>true</c> project is mandatory.</param>
        /// <param name="startDate">The start date of the project.</param>
        /// <param name="endDate">The end date of the project.</param>
        /// <param name="department">The department of the project.</param>
        /// <param name="classification">The classification of the project.</param>
        /// <param name="owner">The owner of the project.</param>
        /// <param name="manager">The manager of the project.</param>
        public void CreateProject(string name, string description, string projectOrdered, string receivingOrganization, bool mandatory,
                                  DateTime startDate, DateTime endDate, Department department, PpsClassification classification, UserId owner, UserId manager)
        {
            this.Name                  = name;
            this.Description           = description;
            this.ProjectOrderer        = projectOrdered;
            this.RecievingOrganization = receivingOrganization;
            this.Mandatory             = mandatory;
            this.StartDate             = startDate;
            this.EndDate               = endDate;
            this.Department            = department;
            this.Classification        = classification;
            this.Owner                 = owner;
            this.Manager               = manager;
            this.IsNew                 = true;
            this.IsDeleted             = false;
            this.TeamMembers           = new List <TeamMember>();

            var @event = new ProjectCreated(this.Id);

            this.ApplyChange(@event);
        }