/// <summary>
 /// Copies the properties from another FinancialTransactionImage object to this FinancialTransactionImage object
 /// </summary>
 /// <param name="target">The target.</param>
 /// <param name="source">The source.</param>
 public static void CopyPropertiesFrom(this FinancialTransactionImage target, FinancialTransactionImage source)
 {
     target.TransactionId = source.TransactionId;
     target.BinaryFileId  = source.BinaryFileId;
     target.TransactionImageTypeValueId = source.TransactionImageTypeValueId;
     target.Id   = source.Id;
     target.Guid = source.Guid;
 }
 /// <summary>
 /// Clones this FinancialTransactionImage object to a new FinancialTransactionImage 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 FinancialTransactionImage Clone(this FinancialTransactionImage source, bool deepCopy)
 {
     if (deepCopy)
     {
         return(source.Clone() as FinancialTransactionImage);
     }
     else
     {
         var target = new FinancialTransactionImage();
         target.CopyPropertiesFrom(source);
         return(target);
     }
 }
Exemplo n.º 3
0
        /// <summary>
        /// Saves the specified item.
        /// </summary>
        /// <param name="item">The item.</param>
        /// <param name="personId">The person identifier.</param>
        /// <returns></returns>
        public override bool Save(FinancialTransactionImage item, int?personId)
        {
            // ensure that the BinaryFile.IsTemporary flag is set to false for any BinaryFiles that are associated with this record
            BinaryFileService binaryFileService = new BinaryFileService(this.RockContext);
            var binaryFile = binaryFileService.Get(item.BinaryFileId);

            if (binaryFile != null && binaryFile.IsTemporary)
            {
                binaryFile.IsTemporary = false;
            }

            return(base.Save(item, personId));
        }
Exemplo n.º 4
0
 /// <summary>
 /// Copies the properties from another FinancialTransactionImage object to this FinancialTransactionImage object
 /// </summary>
 /// <param name="target">The target.</param>
 /// <param name="source">The source.</param>
 public static void CopyPropertiesFrom(this FinancialTransactionImage target, FinancialTransactionImage source)
 {
     target.Id                      = source.Id;
     target.BinaryFileId            = source.BinaryFileId;
     target.Order                   = source.Order;
     target.TransactionId           = source.TransactionId;
     target.CreatedDateTime         = source.CreatedDateTime;
     target.ModifiedDateTime        = source.ModifiedDateTime;
     target.CreatedByPersonAliasId  = source.CreatedByPersonAliasId;
     target.ModifiedByPersonAliasId = source.ModifiedByPersonAliasId;
     target.Guid                    = source.Guid;
     target.ForeignId               = source.ForeignId;
 }