本文整理汇总了C#中GiftBatchTDS.RejectChanges方法的典型用法代码示例。如果您正苦于以下问题:C# GiftBatchTDS.RejectChanges方法的具体用法?C# GiftBatchTDS.RejectChanges怎么用?C# GiftBatchTDS.RejectChanges使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类GiftBatchTDS
的用法示例。
在下文中一共展示了GiftBatchTDS.RejectChanges方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: SubmitRecurringGiftBatch
//.........这里部分代码省略.........
GMainDS.AGift.Rows.Add(gift);
//TODO (not here, but in the client or while posting) Check for Ex-OM Partner
//TODO (not here, but in the client or while posting) Check for expired key ministry (while Posting)
foreach (ARecurringGiftDetailRow recGiftDetail in RMainDS.ARecurringGiftDetail.Rows)
{
//decimal amtIntl = 0M;
decimal amtBase = 0M;
decimal amtTrans = 0M;
if ((recGiftDetail.GiftTransactionNumber == recGift.GiftTransactionNumber)
&& (recGiftDetail.BatchNumber == ABatchNumber) && (recGiftDetail.LedgerNumber == ALedgerNumber)
&& ((recGiftDetail.StartDonations == null) || (recGiftDetail.StartDonations <= AEffectiveDate))
&& ((recGiftDetail.EndDonations == null) || (recGiftDetail.EndDonations >= AEffectiveDate))
)
{
AGiftDetailRow detail = GMainDS.AGiftDetail.NewRowTyped();
detail.LedgerNumber = gift.LedgerNumber;
detail.BatchNumber = gift.BatchNumber;
detail.GiftTransactionNumber = gift.GiftTransactionNumber;
detail.DetailNumber = ++gift.LastDetailNumber;
amtTrans = recGiftDetail.GiftAmount;
detail.GiftTransactionAmount = amtTrans;
batchTotal += amtTrans;
amtBase = GLRoutines.Divide((decimal)amtTrans, AExchangeRateToBase);
detail.GiftAmount = amtBase;
if (!TransactionInIntlCurrency)
{
detail.GiftAmountIntl = GLRoutines.Divide((decimal)amtBase, AExchangeRateIntlToBase);
}
else
{
detail.GiftAmountIntl = amtTrans;
}
detail.RecipientKey = recGiftDetail.RecipientKey;
detail.RecipientLedgerNumber = recGiftDetail.RecipientLedgerNumber;
detail.ChargeFlag = recGiftDetail.ChargeFlag;
detail.ConfidentialGiftFlag = recGiftDetail.ConfidentialGiftFlag;
detail.TaxDeductible = recGiftDetail.TaxDeductible;
detail.MailingCode = recGiftDetail.MailingCode;
if (detail.MailingCode.Length == 0)
{
detail.SetMailingCodeNull();
}
detail.MotivationGroupCode = recGiftDetail.MotivationGroupCode;
detail.MotivationDetailCode = recGiftDetail.MotivationDetailCode;
detail.GiftCommentOne = recGiftDetail.GiftCommentOne;
detail.CommentOneType = recGiftDetail.CommentOneType;
detail.GiftCommentTwo = recGiftDetail.GiftCommentTwo;
detail.CommentTwoType = recGiftDetail.CommentTwoType;
detail.GiftCommentThree = recGiftDetail.GiftCommentThree;
detail.CommentThreeType = recGiftDetail.CommentThreeType;
if (TaxDeductiblePercentageEnabled)
{
// Sets TaxDeductiblePct and uses it to calculate the tax deductibility amounts for a Gift Detail
TGift.SetDefaultTaxDeductibilityData(ref detail, gift.DateEntered, Transaction);
}
GMainDS.AGiftDetail.Rows.Add(detail);
}
}
batch.BatchTotal = batchTotal;
}
}
}
}
AGiftBatchAccess.SubmitChanges(GMainDS.AGiftBatch, Transaction);
ALedgerAccess.SubmitChanges(LedgerTable, Transaction);
AGiftAccess.SubmitChanges(GMainDS.AGift, Transaction);
AGiftDetailAccess.SubmitChanges(GMainDS.AGiftDetail, Transaction);
DBAccess.GDBAccessObj.CommitTransaction();
GMainDS.AcceptChanges();
}
catch (Exception Exc)
{
TLogging.Log("An Exception occured during the submission of a Recurring Gift Batch:" + Environment.NewLine + Exc.ToString());
DBAccess.GDBAccessObj.RollbackTransaction();
GMainDS.RejectChanges();
throw;
}
}