/// <summary>
        /// Handles the SaveClick event of the mdDetails control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="EventArgs"/> instance containing the event data.</param>
        private void mdDetails_SaveClick( object sender, EventArgs e )
        {
            var rockContext = new RockContext();
            if ( !string.IsNullOrWhiteSpace( tbTransactionAmount.Text ) )
            {
                var ftdService = new FinancialTransactionDetailService( rockContext );
                FinancialTransactionDetail ftd = null;
                var transactionDetailId = int.Parse( hfIdValue.Value );
                if ( transactionDetailId > 0 )
                {
                    ftd = ftdService.Get( transactionDetailId );
                }
                else
                {
                    ftd = new FinancialTransactionDetail { Id = 0 };
                }

                ftd.TransactionId = hfIdTransValue.ValueAsInt();
                ftd.AccountId = int.Parse( ddlTransactionAccount.SelectedValue );
                ftd.Amount = decimal.Parse( tbTransactionAmount.Text );
                ftd.Summary = tbTransactionSummary.Text;

                if ( transactionDetailId == 0 )
                {
                    ftdService.Add( ftd );
                }

                rockContext.SaveChanges();
            }

            mdDetails.Hide();
            FinancialTransaction transaction = new FinancialTransaction();
            transaction = new FinancialTransactionService( rockContext ).Get( hfIdTransValue.ValueAsInt() );
            BindTransactionDetailGrid( transaction );
            LoadRelatedImages( transaction.Id );
        }
        /// <summary>
        /// Handles the Delete event of the gTransactionDetails control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="Rock.Web.UI.Controls.RowEventArgs"/> instance containing the event data.</param>
        protected void gTransactionDetails_Delete( object sender, Rock.Web.UI.Controls.RowEventArgs e )
        {
            var rockContext = new RockContext();
            var ftdService = new FinancialTransactionDetailService( rockContext );
            var ftd = ftdService.Get( e.RowKeyId );
            if ( ftd != null )
            {
                string errorMessage;
                if ( !ftdService.CanDelete( ftd, out errorMessage ) )
                {
                    maGridWarning.Show( errorMessage, Rock.Web.UI.Controls.ModalAlertType.Information );
                    return;
                }

                ftdService.Delete( ftd );
                rockContext.SaveChanges();
            }

            FinancialTransaction transaction = new FinancialTransaction();
            transaction = new FinancialTransactionService( rockContext ).Get( hfIdTransValue.ValueAsInt() );
            BindTransactionDetailGrid( transaction );
        }