/// <summary> /// Returns a DraftProject instance to be used by the ProjectService. /// </summary> ///<param name="user">The user making the change.</param> public DraftProject ToDraftProject(ECA.Business.Service.User user) { return(new DraftProject(user, this.Name, this.Description, this.ProgramId)); }
/// <summary> /// Returns a DraftProgram business entity from this binding model. /// </summary> /// <param name="user">The user making the change.</param> /// <returns>The draft program.</returns> public DraftProgram ToDraftProgram(ECA.Business.Service.User user) { return(new DraftProgram( createdBy: user, name: this.Name, description: this.Description, startDate: this.StartDate, endDate: this.EndDate, ownerOrganizationId: this.OwnerOrganizationId, parentProgramId: this.ParentProgramId, goalIds: this.Goals, pointOfContactIds: this.Contacts, themeIds: this.Themes, regionIds: this.Regions, categoryIds: this.Categories, objectiveIds: this.Objectives, websites: GetWebsites() )); }
/// <summary> /// Convert to a updated office business object /// </summary> /// <param name="user">The user updating the office</param> /// <returns>The updated office</returns> public UpdatedOffice ToUpdatedOffice(ECA.Business.Service.User user) { Contract.Requires(user != null, "The user must not be null."); return(new UpdatedOffice(user, OfficeId, Name, OfficeSymbol, Description, ParentOfficeId, PointsOfContactIds)); }