/// <summary> /// Copies the properties from another GroupRequirementType object to this GroupRequirementType object /// </summary> /// <param name="target">The target.</param> /// <param name="source">The source.</param> public static void CopyPropertiesFrom(this GroupRequirementType target, GroupRequirementType source) { target.Id = source.Id; target.CanExpire = source.CanExpire; target.CheckboxLabel = source.CheckboxLabel; target.DataViewId = source.DataViewId; target.Description = source.Description; target.ExpireInDays = source.ExpireInDays; target.ForeignGuid = source.ForeignGuid; target.ForeignKey = source.ForeignKey; target.Name = source.Name; target.NegativeLabel = source.NegativeLabel; target.PositiveLabel = source.PositiveLabel; target.RequirementCheckType = source.RequirementCheckType; target.SqlExpression = source.SqlExpression; target.WarningDataViewId = source.WarningDataViewId; target.WarningLabel = source.WarningLabel; target.WarningSqlExpression = source.WarningSqlExpression; target.CreatedDateTime = source.CreatedDateTime; target.ModifiedDateTime = source.ModifiedDateTime; target.CreatedByPersonAliasId = source.CreatedByPersonAliasId; target.ModifiedByPersonAliasId = source.ModifiedByPersonAliasId; target.Guid = source.Guid; target.ForeignId = source.ForeignId; }
/// <summary> /// Clones this GroupRequirementType object to a new GroupRequirementType 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 GroupRequirementType Clone(this GroupRequirementType source, bool deepCopy) { if (deepCopy) { return(source.Clone() as GroupRequirementType); } else { var target = new GroupRequirementType(); target.CopyPropertiesFrom(source); return(target); } }