本文整理汇总了C#中OpenCBS.CoreDomain.Contracts.Loans.Loan.CalculateAlignDisbursementDate方法的典型用法代码示例。如果您正苦于以下问题:C# Loan.CalculateAlignDisbursementDate方法的具体用法?C# Loan.CalculateAlignDisbursementDate怎么用?C# Loan.CalculateAlignDisbursementDate使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类OpenCBS.CoreDomain.Contracts.Loans.Loan
的用法示例。
在下文中一共展示了Loan.CalculateAlignDisbursementDate方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CreateLoan
private Loan CreateLoan()
{
var credit = new Loan(_product,
ServicesHelper.ConvertStringToDecimal(nudLoanAmount.Text, _product.UseCents),
nudInterestRate.Value / 100m,
Convert.ToInt32(nudLoanNbOfInstallments.Value),
Convert.ToInt32(numericUpDownLoanGracePeriod.Value),
dateLoanStart.Value,
dtpDateOfFirstInstallment.Value,
User.CurrentUser,
ServicesProvider.GetInstance().GetGeneralSettings(),
ServicesProvider.GetInstance().GetNonWorkingDate(),
CoreDomainProvider.GetInstance().GetProvisioningTable(),
CoreDomainProvider.GetInstance().GetChartOfAccounts())
{
Guarantors = _listGuarantors,
Collaterals = _collaterals,
LoanShares = _loanShares
};
credit.InstallmentList = ServicesProvider.GetInstance().GetContractServices().SimulateScheduleCreation(credit);
if (!string.IsNullOrEmpty(tbLocAmount.Text))
credit.AmountUnderLoc = decimal.Parse(tbLocAmount.Text);
if (textBoxLoanContractCode.Text != "") credit.Code = textBoxLoanContractCode.Text;
_toChangeAlignDate = false;
credit.FirstInstallmentDate = dtpDateOfFirstInstallment.Value;
_toChangeAlignDate = true;
credit.InstallmentType =
ServicesProvider.GetInstance().GetProductServices().FindInstallmentType(
(int)comboBoxLoanInstallmentType.Tag);
_firstInstallmentDate = dtpDateOfFirstInstallment.Value;
credit.AlignDisbursementDate = credit.CalculateAlignDisbursementDate(_firstInstallmentDate);
credit.AnticipatedTotalRepaymentPenalties = ServicesHelper.ConvertStringToNullableDouble(textBoxLoanAnticipatedTotalFees.Text, true, -1).Value;
credit.AnticipatedPartialRepaymentPenalties = ServicesHelper.ConvertStringToNullableDouble(tbLoanAnticipatedPartialFees.Text, true, -1).Value;
credit.NonRepaymentPenalties.InitialAmount = ServicesHelper.ConvertStringToNullableDouble(textBoxLoanLateFeesOnAmount.Text, true, -1).Value;
credit.NonRepaymentPenalties.OLB = ServicesHelper.ConvertStringToNullableDouble(textBoxLoanLateFeesOnOLB.Text, true, -1).Value;
credit.NonRepaymentPenalties.OverDueInterest = ServicesHelper.ConvertStringToNullableDouble(textBoxLoanLateFeesOnOverdueInterest.Text, true, -1).Value;
credit.NonRepaymentPenalties.OverDuePrincipal = ServicesHelper.ConvertStringToNullableDouble(textBoxLoanLateFeesOnOverduePrincipal.Text, true, -1).Value;
credit.GracePeriod = Convert.ToInt32(numericUpDownLoanGracePeriod.Value);
credit.GracePeriodOfLateFees = Convert.ToInt32(_gracePeriodOfLateFees);
credit.FundingLine = comboBoxLoanFundingLine.Tag != null ? (FundingLine)comboBoxLoanFundingLine.Tag : null;
credit.LoanOfficer = (User)cmbLoanOfficer.SelectedItem;
credit.LoanPurpose = textBoxLoanPurpose.Text;
credit.Comments = textBoxComments.Text;
credit.CompulsorySavings = GetSelectedSavingProduct();
credit.CompulsorySavingsPercentage = (int)numCompulsoryAmountPercent.Value;
credit.LoanEntryFeesList = new List<LoanEntryFee>();
foreach (ListViewItem item in lvEntryFees.Items)
{
if (item.Tag is LoanEntryFee)
{
((LoanEntryFee)item.Tag).FeeValue = decimal.Parse(item.SubItems[1].Text);
credit.LoanEntryFeesList.Add((LoanEntryFee)item.Tag);
}
}
if (credit.Product.CycleId != null)
{
credit.AmountMin = _product.AmountMin;
credit.AmountMax = _product.AmountMax;
credit.InterestRateMin = _product.InterestRateMin;
credit.InterestRateMax = _product.InterestRateMax;
credit.NmbOfInstallmentsMin = _product.NbOfInstallmentsMin;
credit.NmbOfInstallmentsMax = _product.NbOfInstallmentsMax;
credit.LoanCycle = _client.LoanCycle;
}
credit.Insurance = decimal.Parse(tbInsurance.Text);
if (_credit != null && _credit.ScheduleChangedManually)
{
credit.ScheduleChangedManually = _credit.ScheduleChangedManually;
//credit.InstallmentList = _credit.InstallmentList;
}
credit.EconomicActivity = eacLoan.Activity;
return credit;
}