本文整理汇总了C#中ISavingsContract类的典型用法代码示例。如果您正苦于以下问题:C# ISavingsContract类的具体用法?C# ISavingsContract怎么用?C# ISavingsContract使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ISavingsContract类属于命名空间,在下文中一共展示了ISavingsContract类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CalculateInterestsStrategy
public CalculateInterestsStrategy(ISavingsContract pSaving, User pUser, int pWeekEndDay2)
{
if (pSaving is Saving)
{
if (((Saving)pSaving).Product.InterestBase == OSavingInterestBase.Daily)
_ici = new Accrual.Daily(pSaving, pUser);
else if (((Saving)pSaving).Product.InterestBase == OSavingInterestBase.Monthly)
{
if (((Saving)pSaving).Product.CalculAmountBase == OSavingCalculAmountBase.MinimalAmount)
_ici = new Accrual.MinimalAmount.Monthly((Saving)pSaving, pUser);
}
else if (((Saving)pSaving).Product.InterestBase == OSavingInterestBase.Weekly)
{
if (((Saving)pSaving).Product.CalculAmountBase == OSavingCalculAmountBase.MinimalAmount)
_ici = new Accrual.MinimalAmount.Weekly((Saving)pSaving, pUser, pWeekEndDay2);
}
}
else if (pSaving is SavingDeposit)
{
if (((SavingDeposit)pSaving).Product.InterestFrequency == OTermDepositInterestFrequency.Daily)
_ici = new Accrual.Daily(pSaving, pUser);
else if (((SavingDeposit)pSaving).Product.InterestFrequency == OTermDepositInterestFrequency.Maturity)
_ici = new Accrual.Maturity((SavingDeposit)pSaving, pUser);
}
}
示例2: SavingsOperationForm
public SavingsOperationForm(ISavingsContract pSaving, OSavingsOperation pDirections)
{
InitializeComponent();
_bookingDirection = pDirections;
_saving = pSaving;
SwitchBookingDirection();
Initialize();
}
示例3: SavingsOperationForm
public SavingsOperationForm(ISavingsContract pSaving, OSavingsOperation pDirections)
{
InitializeComponent();
_bookingDirection = pDirections;
_saving = pSaving;
SwitchBookingDirection();
Initialize();
dtpDate.Format = DateTimePickerFormat.Custom;
dtpDate.CustomFormat = ApplicationSettings.GetInstance("").SHORT_DATE_FORMAT;
}
示例4: GetAccountByNumber
public Account GetAccountByNumber(string pNumber, int pCurrencyId, ISavingsContract pSavingsContract, OBookingDirections pBookingDirection)
{
if (_accountingRules != null)
{
var specificAccount = _accountingRules.GetSpecificAccount(pNumber, pSavingsContract, pBookingDirection);
if (specificAccount != null)
pNumber = specificAccount.Number;
}
return _getAccountByNumber(pNumber, pCurrencyId);
}
示例5: PostingInterestsStrategy
public PostingInterestsStrategy(ISavingsContract pSaving, User pUser, int pWeekEndDay2)
{
if (((SavingBookContract)pSaving).Product.InterestFrequency == OSavingInterestFrequency.EndOfYear)
_ipi = new Posting.EndOfYear(pSaving, pUser);
else if (((SavingBookContract)pSaving).Product.InterestFrequency == OSavingInterestFrequency.EndOfMonth)
_ipi = new Posting.EndOfMonth((SavingBookContract)pSaving, pUser);
else if (((SavingBookContract)pSaving).Product.InterestFrequency == OSavingInterestFrequency.EndOfWeek)
_ipi = new Posting.EndOfWeek((SavingBookContract)pSaving, pUser, pWeekEndDay2);
else if (((SavingBookContract)pSaving).Product.InterestFrequency == OSavingInterestFrequency.EndOfDay ||
((SavingBookContract)pSaving).UseTermDeposit
)
_ipi = new Posting.PostingMethods((SavingBookContract)pSaving, pUser);
}
示例6: CalculateInterestsStrategy
public CalculateInterestsStrategy(ISavingsContract pSaving, User pUser, int pWeekEndDay2)
{
if (((SavingBookContract)pSaving).Product.InterestBase == OSavingInterestBase.Daily)
_ici = new Accrual.Daily(pSaving, pUser);
else if (((SavingBookContract)pSaving).Product.InterestBase == OSavingInterestBase.Monthly)
{
if (((SavingBookContract)pSaving).Product.CalculAmountBase == OSavingCalculAmountBase.MinimalAmount)
_ici = new Accrual.MinimalAmount.Monthly((SavingBookContract)pSaving, pUser);
}
else if (((SavingBookContract)pSaving).Product.InterestBase == OSavingInterestBase.Weekly)
{
if (((SavingBookContract)pSaving).Product.CalculAmountBase == OSavingCalculAmountBase.MinimalAmount)
_ici = new Accrual.MinimalAmount.Weekly((SavingBookContract)pSaving, pUser, pWeekEndDay2);
}
}
示例7: PostingInterestsStrategy
public PostingInterestsStrategy(ISavingsContract pSaving, User pUser, int pWeekEndDay2)
{
if (pSaving is Saving)
{
if (((Saving)pSaving).Product.InterestFrequency == OSavingInterestFrequency.EndOfYear)
_ipi = new Posting.EndOfYear(pSaving, pUser);
else if (((Saving)pSaving).Product.InterestFrequency == OSavingInterestFrequency.EndOfMonth)
_ipi = new Posting.EndOfMonth((Saving)pSaving, pUser);
else if (((Saving)pSaving).Product.InterestFrequency == OSavingInterestFrequency.EndOfWeek)
_ipi = new Posting.EndOfWeek((Saving)pSaving, pUser, pWeekEndDay2);
else if (((Saving)pSaving).Product.InterestFrequency == OSavingInterestFrequency.EndOfDay)
_ipi = new Posting.EndOfDay((Saving)pSaving, pUser);
}
else if (pSaving is SavingDeposit)
{
_ipi = new Posting.Maturity((SavingDeposit)pSaving, pUser);
}
}
示例8: Transfer
public virtual List<SavingEvent> Transfer(ISavingsContract to, OCurrency amount, OCurrency fee, DateTime date, string description)
{
List<SavingEvent> events = new List<SavingEvent>(3);
events.Add(DebitTransfer(to, amount, fee, date, description));
events.Add(to.CreditTransfer(this, amount, date, description));
if (GetBalance() < 0)
{
SavingOverdraftFeeEvent e = ChargeOverdraftFee(date, User.CurrentUser);
events.Add(e);
}
return events;
}
示例9: DebitTransfer
public virtual List<SavingEvent> DebitTransfer(OCurrency pAmount, ISavingsContract pCreditAccount, DateTime pDate, string pDescription, User pUser, bool pIsDesactivateFees)
{
List<SavingEvent> events = new List<SavingEvent>();
SavingDebitTransferEvent transferEvent = new SavingDebitTransferEvent
{
Amount = pAmount,
Date = pDate,
Description = pDescription,
User = pUser,
Cancelable = false,
RelatedContractCode = pCreditAccount.Code,
ProductType = Product.GetType(),
ContracId = Id
};
events.Add(transferEvent);
Events.Add(transferEvent);
return events;
}
示例10: CreditTransfer
public SavingCreditTransferEvent CreditTransfer(OCurrency pAmount, ISavingsContract pDebitAccount, DateTime pDate, string pDescription, User pUser)
{
SavingCreditTransferEvent transferEvent = new SavingCreditTransferEvent
{
Amount = pAmount,
Date = pDate,
Description = pDescription,
User = pUser,
Fee = 0,
Cancelable = false,
RelatedContractCode = pDebitAccount.Code,
ProductType = Product.GetType(),
ContracId = Id
};
Events.Add(transferEvent);
return transferEvent;
}
示例11: FireEvent
public void FireEvent(SavingEvent e, ISavingsContract pSaving, SqlTransaction sqlTransac)
{
e.IsFired = true;
SavingEventOrigination(e, pSaving, sqlTransac);
}
示例12: SimulateCloseAccount
public ISavingsContract SimulateCloseAccount(ISavingsContract saving, DateTime date, User user, bool isDesactivateFees, Teller teller)
{
ISavingsContract savingSimulation = (ISavingsContract) saving.Clone();
savingSimulation.SimulateClose(date, user, "Close savings contract", isDesactivateFees, teller);
return savingSimulation;
}
示例13: DisplaySavingLoans
private void DisplaySavingLoans(ISavingsContract saving)
{
if (saving is SavingBookContract)
{
if (((SavingBookContract)saving).Loans != null)
{
if (((SavingBookContract)saving).Loans.Count > 0)
{
olvColumnStatus.AspectToStringConverter = delegate(object value)
{
if (value.ToString().Length > 0)
{
string status = GetString(value.ToString() + ".Text");
return status;
}
return null;
};
olvColumnAmount.AspectToStringConverter = delegate(object value)
{
if (value.ToString().Length > 0)
{
OCurrency amount = (OCurrency)value;
return amount.GetFormatedValue(true);
}
return null;
};
olvColumnStratDate.AspectToStringConverter = delegate(object value)
{
if (value.ToString().Length > 0)
{
return
((DateTime)value).
ToShortDateString();
}
return null;
};
olvColumnCreationDate.AspectToStringConverter = delegate(object value)
{
if (value.ToString().Length > 0)
{
return
((DateTime)value).
ToShortDateString();
}
return null;
};
olvColumnCloseDate.AspectToStringConverter = delegate(object value)
{
if (value.ToString().Length > 0)
{
return
((DateTime)value).
ToShortDateString();
}
return null;
};
olvLoans.SetObjects(((SavingBookContract)saving).Loans);
tabControlSavingsDetails.SelectedIndex = 0;
return;
}
}
}
//tabcSavingsDettails.TabPages.Remove(tabPageLoans);
}
示例14: ValidateSavingsContract
public bool ValidateSavingsContract(ISavingsContract saving, Client client)
{
if (!IsProductCorrect(saving))
throw new OpenCbsSavingException(OpenCbsSavingExceptionEnum.ProductIsInvalid);
if (!IsInterestRateCorrect(saving))
throw new OpenCbsSavingException(OpenCbsSavingExceptionEnum.InterestRateIsInvalid);
if (!IsWithdrawFeesCorrect((SavingBookContract)saving))
throw new OpenCbsSavingException(OpenCbsSavingExceptionEnum.WithdrawFeesIsInvalid);
if (!IsTransferFeesCorrect((SavingBookContract)saving))
throw new OpenCbsSavingException(OpenCbsSavingExceptionEnum.TransferFeesIsInvalid);
if (!IsDepositFeesCorrect((SavingBookContract)saving))
throw new OpenCbsSavingException(OpenCbsSavingExceptionEnum.DepositFeesIsInvalid);
if (!IsCloseFeesCorrect((SavingBookContract)saving))
throw new OpenCbsSavingException(OpenCbsSavingExceptionEnum.CloseFeesIsInvalid);
if (!IsManagementFeesCorrect((SavingBookContract)saving))
throw new OpenCbsSavingException(OpenCbsSavingExceptionEnum.ManagementFeesIsInvalid);
if (!IsAgioFeesCorrect((SavingBookContract)saving))
throw new OpenCbsSavingException(OpenCbsSavingExceptionEnum.AgioFeesIsInvalid);
if (((SavingBookContract)saving).Loans != null)
{
//IsLoanValid((Saving)saving, pClient);
//if (!_IsLoanAmountCorrect((Saving)saving, ((Saving)saving).Loan))
// throw new OpenCbsSavingException(OpenCbsSavingExceptionEnum.InitialAmountIsInvalid);
}
else
{
if (!IsInitialAmountCorrect(saving))
throw new OpenCbsSavingException(OpenCbsSavingExceptionEnum.InitialAmountIsInvalid);
}
if (((SavingBookContract)saving).UseTermDeposit)
{
if (((SavingBookContract)saving).Rollover != OSavingsRollover.PrincipalAndInterests)
{
if (((SavingBookContract)saving).TransferAccount == null)
throw new OpenCbsSavingException(OpenCbsSavingExceptionEnum.TransferAccountIsInvalid);
}
}
return true;
}
示例15: Transfer
public List<SavingEvent> Transfer(ISavingsContract from, ISavingsContract to, DateTime date, OCurrency amount, OCurrency fee, string description, User user, bool noFee)
{
CheckTransfer(to, from, amount, fee, date, description);
List<SavingEvent> events = from.Transfer(to, amount, fee, date, description);
foreach (SavingEvent e in events)
_ePS.FireEvent(e);
return events;
}