Пример #1
0
 /// <summary>
 /// Clones this EventItemOccurrence object to a new EventItemOccurrence object
 /// </summary>
 /// <param name="source">The source.</param>
 /// <param name="deepCopy">if set to <c>true</c> a deep copy is made. If false, only the basic entity properties are copied.</param>
 /// <returns></returns>
 public static EventItemOccurrence Clone(this EventItemOccurrence source, bool deepCopy)
 {
     if (deepCopy)
     {
         return(source.Clone() as EventItemOccurrence);
     }
     else
     {
         var target = new EventItemOccurrence();
         target.CopyPropertiesFrom(source);
         return(target);
     }
 }
Пример #2
0
 /// <summary>
 /// Copies the properties from another EventItemOccurrence object to this EventItemOccurrence object
 /// </summary>
 /// <param name="target">The target.</param>
 /// <param name="source">The source.</param>
 public static void CopyPropertiesFrom(this EventItemOccurrence target, EventItemOccurrence source)
 {
     target.Id                      = source.Id;
     target.CampusId                = source.CampusId;
     target.ContactEmail            = source.ContactEmail;
     target.ContactPersonAliasId    = source.ContactPersonAliasId;
     target.ContactPhone            = source.ContactPhone;
     target.EventItemId             = source.EventItemId;
     target.ForeignGuid             = source.ForeignGuid;
     target.ForeignKey              = source.ForeignKey;
     target.Location                = source.Location;
     target.Note                    = source.Note;
     target.ScheduleId              = source.ScheduleId;
     target.CreatedDateTime         = source.CreatedDateTime;
     target.ModifiedDateTime        = source.ModifiedDateTime;
     target.CreatedByPersonAliasId  = source.CreatedByPersonAliasId;
     target.ModifiedByPersonAliasId = source.ModifiedByPersonAliasId;
     target.Guid                    = source.Guid;
     target.ForeignId               = source.ForeignId;
 }
Пример #3
0
        /// <summary>
        /// Returns a <see cref="System.String"/> that represents this instance.
        /// </summary>
        /// <param name="includeEventItem">if set to <c>true</c> [include event item].</param>
        /// <param name="includeRegistrationInstance">if set to <c>true</c> [include registration instance].</param>
        /// <param name="includeGroup">if set to <c>true</c> [include group].</param>
        /// <returns>
        /// A <see cref="System.String"/> that represents this instance.
        /// </returns>
        public string ToString(bool includeEventItem, bool includeRegistrationInstance, bool includeGroup)
        {
            var parts = new List <string>();

            if (includeEventItem && EventItemOccurrence != null)
            {
                parts.Add(EventItemOccurrence.ToString());
            }

            if (includeRegistrationInstance && RegistrationInstance != null)
            {
                parts.Add(RegistrationInstance.ToString());
            }

            if (includeGroup && Group != null)
            {
                parts.Add(Group.ToString());
            }

            return(parts.AsDelimited(" - "));
        }