/// <summary> /// Returns a business entity capable of updating system programs. /// </summary> /// <param name="user">The user making the change.</param> /// <returns>The EcaProgram business entity.</returns> public EcaProgram ToEcaProgram(Business.Service.User user) { Contract.Assert(this.RowVersion != null, "The row version must not be null."); var ecaProgram = new EcaProgram( updatedBy: user, id: this.Id, name: this.Name, description: this.Description, startDate: this.StartDate, endDate: this.EndDate, ownerOrganizationId: this.OwnerOrganizationId, parentProgramId: this.ParentProgramId, programStatusId: this.ProgramStatusId, programRowVersion: Convert.FromBase64String(this.RowVersion), goalIds: this.Goals, pointOfContactIds: this.Contacts, themeIds: this.Themes, regionIds: this.Regions, categoryIds: this.Categories, objectiveIds: this.Objectives, websites: GetWebsites() ); return(ecaProgram); }
/// <summary> /// Returns a business layer entity to create or update social medias. /// </summary> /// <param name="user">The user performing the operation.</param> /// <returns>The social media presence.</returns> public override SocialMediaPresence <Organization> ToSocialMediaPresence(Business.Service.User user) { return(new OrganizationSocialMediaPresence(user, this.SocialMediaTypeId, this.Value, this.SocialableId)); }
/// <summary> /// Returns a business layer entity to create or update phone numbers. /// </summary> /// <param name="user">The user performing the operation.</param> /// <returns>The phone numbers.</returns> public override NewPhoneNumber <ECA.Data.Person> ToPhoneNumber(Business.Service.User user) { return(new NewPersonPhoneNumber(user, this.PhoneNumberTypeId, this.Number, this.Extension, this.PhoneNumberableId, this.IsPrimary)); }
/// <summary> /// Returns a business layer entity to create or update email addreses. /// </summary> /// <param name="user">The user performing the operation.</param> /// <returns>The email address.</returns> public override NewEmailAddress <ECA.Data.Contact> ToEmailAddress(Business.Service.User user) { return(new NewContactEmailAddress(user, this.EmailAddressTypeId, this.Address, this.IsPrimary, this.EMailAddressableId)); }
/// <summary> /// Returns a business layer entity to create or update social medias. /// </summary> /// <param name="user">The user performing the operation.</param> /// <returns>The social media presence.</returns> public override SocialMediaPresence <ECA.Data.Person> ToSocialMediaPresence(Business.Service.User user) { Contract.Requires(user != null, "The user must not be null."); return(new PersonSocialMediaPresence(user, this.SocialMediaTypeId, this.Value, this.SocialableId)); }