// carry out the field adjustment private void FieldChangeAdjustment(System.Object sender, EventArgs e) { if (!ValidateControls()) { return; } GiftBatchTDS GiftBatchDS = new GiftBatchTDS(); // get all the data needed for this Field Adjustment if (!GetAllDataNeeded(ref GiftBatchDS)) { return; } // show the list of gifts to be adjusted and ask the user for confirmation TFrmGiftFieldAdjustmentConfirmation ConfirmationForm = new TFrmGiftFieldAdjustmentConfirmation(this); ConfirmationForm.MainDS = GiftBatchDS; if (ConfirmationForm.ShowDialog() == System.Windows.Forms.DialogResult.Cancel) { return; } // Carry out the gift adjustment GiftAdjustment(GiftBatchDS, null, chkNoReceipt.Checked, this); // refresh batches this.Cursor = Cursors.WaitCursor; ((TFrmGiftBatch)FPetraUtilsObject.GetCallerForm()).RefreshAll(); this.Cursor = Cursors.Default; this.Close(); }
// carry out the adjustment /// <summary> /// Carry out a Tax Deductible Pct adjustment. /// </summary> /// <param name="ARecipientKey"></param> /// <param name="ANewPct"></param> /// <param name="AValidFrom"></param> /// <param name="ANoReceipt"></param> /// <param name="AParentForm"></param> public static void TaxDeductiblePctAdjustment(Int64 ARecipientKey, decimal ANewPct, DateTime AValidFrom, bool ANoReceipt, Form AParentForm) { GiftBatchTDS GiftBatchDS = new GiftBatchTDS(); // get all the data needed for this Field Adjustment if (!GetAllDataNeeded(ref GiftBatchDS, ARecipientKey, ANewPct, AValidFrom, AParentForm)) { return; } // show the list of gifts to be adjusted and ask the user for confirmation TFrmGiftFieldAdjustmentConfirmation ConfirmationForm = new TFrmGiftFieldAdjustmentConfirmation(AParentForm); ConfirmationForm.MainDS = GiftBatchDS; ConfirmationForm.Text = Catalog.GetString("Confirm Tax Deductible Percentage Adjustment"); if (ConfirmationForm.ShowDialog() == System.Windows.Forms.DialogResult.Cancel) { return; } // Carry out the gift adjustment TFrmGiftFieldAdjustment.GiftAdjustment(GiftBatchDS, ANewPct, ANoReceipt, AParentForm); // refresh gift batch screen TFormsMessage broadcastMessage = new TFormsMessage(TFormsMessageClassEnum.mcRefreshGiftBatches, AParentForm.ToString()); TFormsList.GFormsList.BroadcastFormMessage(broadcastMessage); }