/// <summary> /// Call from ShowDetailsManual after ACurrentDetailRow is known to be non-NULL /// </summary> public static void FinishShowDetailsManual(GiftBatchTDSAGiftDetailRow ACurrentDetailRow, TCmbAutoPopulated ACmbMotivationDetailCode, TtxtAutoPopulatedButtonLabel ATxtDetailRecipientKey, TtxtAutoPopulatedButtonLabel AtxtDetailRecipientLedgerNumber, TextBox ATxtDetailCostCentreCode, TextBox ATxtDetailAccountCode, Ict.Common.Controls.TCmbAutoComplete ACmbDetailCommentOneType, Ict.Common.Controls.TCmbAutoComplete ACmbDetailCommentTwoType, Ict.Common.Controls.TCmbAutoComplete ACmbDetailCommentThreeType, ref string AMotivationGroup, ref string AMotivationDetail, out bool ? AEnableRecipientGiftDestination) { AEnableRecipientGiftDestination = null; //Record current values for motivation AMotivationGroup = ACurrentDetailRow.MotivationGroupCode; AMotivationDetail = ACurrentDetailRow.MotivationDetailCode; if (ACurrentDetailRow.IsCostCentreCodeNull()) { ATxtDetailCostCentreCode.Text = string.Empty; } else { ATxtDetailCostCentreCode.Text = ACurrentDetailRow.CostCentreCode; } if (ACurrentDetailRow.IsAccountCodeNull()) { ATxtDetailAccountCode.Text = string.Empty; } else { ATxtDetailAccountCode.Text = ACurrentDetailRow.AccountCode; } if (ACurrentDetailRow.IsRecipientKeyNull()) { ATxtDetailRecipientKey.Text = String.Format("{0:0000000000}", 0); UpdateRecipientKeyText(0, ACurrentDetailRow, AMotivationGroup, AMotivationDetail); } else { ATxtDetailRecipientKey.Text = String.Format("{0:0000000000}", ACurrentDetailRow.RecipientKey); UpdateRecipientKeyText(ACurrentDetailRow.RecipientKey, ACurrentDetailRow, AMotivationGroup, AMotivationDetail); } if (Convert.ToInt64(ATxtDetailRecipientKey.Text) == 0) { OnRecipientPartnerClassChanged(null, ATxtDetailRecipientKey, AtxtDetailRecipientLedgerNumber, out AEnableRecipientGiftDestination); } if (Convert.ToInt64(AtxtDetailRecipientLedgerNumber.Text) == 0) { OnRecipientPartnerClassChanged(ATxtDetailRecipientKey.CurrentPartnerClass, ATxtDetailRecipientKey, AtxtDetailRecipientLedgerNumber, out AEnableRecipientGiftDestination); } if (ACurrentDetailRow.IsCommentOneTypeNull()) { ACmbDetailCommentOneType.SetSelectedString("Both"); } if (ACurrentDetailRow.IsCommentTwoTypeNull()) { ACmbDetailCommentTwoType.SetSelectedString("Both"); } if (ACurrentDetailRow.IsCommentThreeTypeNull()) { ACmbDetailCommentThreeType.SetSelectedString("Both"); } }