public virtual CommunityTag Copy(TagItem tag, litePerson person, String ipAddress, String proxyIpAddress, DateTime?createdOn) { CommunityTag clone = new CommunityTag(); clone.Tag = tag; clone.IdCommunity = IdCommunity; clone.CreateMetaInfo(person, ipAddress, proxyIpAddress, createdOn); return(clone); }
public virtual OrganizationAvailability Copy(TagItem tag, litePerson person, String ipAddress, String proxyIpAddress, DateTime?createdOn) { OrganizationAvailability clone = new OrganizationAvailability(); clone.Tag = tag; clone.IdOrganization = IdOrganization; clone.IsDefault = IsDefault; clone.CreateMetaInfo(person, ipAddress, proxyIpAddress, createdOn); return(clone); }
public virtual TagItem BaseClone() { TagItem tag = new TagItem(); tag.IdModule = IdModule; tag.ModuleCode = ModuleCode; tag.Type = Type; tag.IsDefault = false; tag.IsSystem = false; tag.Status = lm.Comol.Core.Dashboard.Domain.AvailableStatus.Draft; tag.DefaultTranslation = (lm.Comol.Core.DomainModel.Languages.TitleDescriptionObjectTranslation)DefaultTranslation.Clone(); return(tag); }
public virtual TagTranslation Copy(TagItem tag, litePerson person, String ipAddress, String ipProxyAddress, String titlePrefix = "", DateTime?createdOn = null) { TagTranslation t = new TagTranslation(); t.CreateMetaInfo(person, ipAddress, ipProxyAddress, createdOn); t.Tag = tag; t.IdLanguage = IdLanguage; t.LanguageCode = LanguageCode; t.Translation = Translation.Copy(); if (!String.IsNullOrEmpty(titlePrefix)) { t.Translation.Title = titlePrefix + t.Translation.Title; } return(t); }
//public object Clone() //{ // TagItem tag = BaseClone(); // if (Translations != null) // tag.Translations = Translations.Where(t => t.Deleted == BaseStatusDeleted.None).Select(t => (lm.Comol.Core.DomainModel.Languages.)t.Clone()).ToList(); // if (CommunityAssignments!=null) // tag.CommunityAssignments = CommunityAssignments.Where(c => c.Deleted == BaseStatusDeleted.None).Select(c => (CommunityTag)c.Clone()).ToList(); // if (tag.MyTile != null) // tag.MyTile = (lm.Comol.Core.Dashboard.Domain.Tile)MyTile.Clone(); // return tag; //} public virtual TagItem Copy(litePerson person, String ipAddress, String proxyIpAddress, String titlePrefix = "") { TagItem clone = BaseClone(); clone.CreateMetaInfo(person, ipAddress, proxyIpAddress); if (Translations != null) { clone.Translations = Translations.Where(t => t.Deleted == BaseStatusDeleted.None).Select(t => t.Copy(clone, person, ipAddress, proxyIpAddress, titlePrefix, clone.CreatedOn)).ToList(); } if (CommunityAssignments != null) { clone.CommunityAssignments = CommunityAssignments.Where(c => c.Deleted == BaseStatusDeleted.None).Select(c => c.Copy(clone, person, ipAddress, proxyIpAddress, clone.CreatedOn)).ToList(); } if (Organizations != null) { clone.Organizations = Organizations.Where(c => c.Deleted == BaseStatusDeleted.None).Select(c => c.Copy(clone, person, ipAddress, proxyIpAddress, clone.CreatedOn)).ToList(); } if (MyTile != null) { clone.MyTile = MyTile.Copy(clone, person, ipAddress, proxyIpAddress, titlePrefix, clone.CreatedOn); } return(clone); }