Beispiel #1
0
        /// <summary>
        /// Handles the Delete event of the grdFinancialGivingProfile control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="RowEventArgs"/> instance containing the event data.</param>
        protected void rGridGivingProfile_Delete(object sender, RowEventArgs e)
        {
            var scheduledTransactionService = new FinancialScheduledTransactionService();

            FinancialScheduledTransaction profile = scheduledTransactionService.Get((int)rGridGivingProfile.DataKeys[e.RowIndex]["id"]);

            if (profile != null)
            {
                scheduledTransactionService.Delete(profile, CurrentPersonId);
                scheduledTransactionService.Save(profile, CurrentPersonId);
            }

            BindGrid();
        }