private void GetDetailDataFromControlsManual(GiftBatchTDSARecurringGiftDetailRow ARow) { if (ARow == null) { return; } //Handle gift table fields for first detail only if (ARow.DetailNumber == 1) { ARecurringGiftRow giftRow = GetRecurringGiftRow(ARow.GiftTransactionNumber); giftRow.DonorKey = Convert.ToInt64(txtDetailDonorKey.Text); if (cmbDetailMethodOfGivingCode.SelectedIndex == -1) { giftRow.SetMethodOfGivingCodeNull(); } else { giftRow.MethodOfGivingCode = cmbDetailMethodOfGivingCode.GetSelectedString(); } if (cmbDetailMethodOfPaymentCode.SelectedIndex == -1) { giftRow.SetMethodOfPaymentCodeNull(); } else { giftRow.MethodOfPaymentCode = cmbDetailMethodOfPaymentCode.GetSelectedString(); } if (txtDetailReference.Text.Length == 0) { giftRow.SetReferenceNull(); } else { giftRow.Reference = txtDetailReference.Text; } if (cmbDetailReceiptLetterCode.SelectedIndex == -1) { giftRow.SetReceiptLetterCodeNull(); } else { giftRow.ReceiptLetterCode = cmbDetailReceiptLetterCode.GetSelectedString(); } } if (txtDetailCostCentreCode.Text.Length == 0) { ARow.SetCostCentreCodeNull(); } else { ARow.CostCentreCode = txtDetailCostCentreCode.Text; } if (txtDetailAccountCode.Text.Length == 0) { ARow.SetAccountCodeNull(); } else { ARow.AccountCode = txtDetailAccountCode.Text; } if (ARow.IsRecipientKeyNull()) { ARow.SetRecipientDescriptionNull(); } else { UpdateRecipientKeyText(ARow.RecipientKey); } if (txtDetailRecipientLedgerNumber.Text.Length == 0) { ARow.SetRecipientFieldNull(); ARow.SetRecipientLedgerNumberNull(); } else { ARow.RecipientField = Convert.ToInt64(txtDetailRecipientLedgerNumber.Text); ARow.RecipientLedgerNumber = ARow.RecipientField; } }
private void ShowDetailsManual(GiftBatchTDSARecurringGiftDetailRow ARow) { if (!txtDetailRecipientKeyMinistry.Visible) { SetTextBoxOverlayOnKeyMinistryCombo(true); } else if (!FTransactionsLoaded) { SetTextBoxOverlayOnKeyMinistryCombo(); } if (ARow == null) { return; } try { this.Cursor = Cursors.WaitCursor; FShowingDetails = true; //Record current values for motivation FMotivationGroup = ARow.MotivationGroupCode; FMotivationDetail = ARow.MotivationDetailCode; //Show gift table values ARecurringGiftRow giftRow = GetRecurringGiftRow(ARow.GiftTransactionNumber); ShowDetailsForGift(giftRow); if (ARow.IsCostCentreCodeNull()) { txtDetailCostCentreCode.Text = string.Empty; } else { txtDetailCostCentreCode.Text = ARow.CostCentreCode; } if (ARow.IsAccountCodeNull()) { txtDetailAccountCode.Text = string.Empty; } else { txtDetailAccountCode.Text = ARow.AccountCode; } if (ARow.IsRecipientKeyNull()) { txtDetailRecipientKey.Text = String.Format("{0:0000000000}", 0); UpdateRecipientKeyText(0); } else { txtDetailRecipientKey.Text = String.Format("{0:0000000000}", ARow.RecipientKey); UpdateRecipientKeyText(ARow.RecipientKey); } if (Convert.ToInt64(txtDetailRecipientKey.Text) == 0) { RecipientPartnerClassChanged(null); } if (Convert.ToInt64(txtDetailRecipientLedgerNumber.Text) == 0) { RecipientPartnerClassChanged(null); } ShowDonorInfo(Convert.ToInt64(txtDetailDonorKey.Text)); UpdateControlsProtection(ARow); } finally { FShowingDetails = false; this.Cursor = Cursors.Default; } }