當前位置: 首頁>>代碼示例>>C#>>正文


C# Loan.CalculateAlignDisbursementDate方法代碼示例

本文整理匯總了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;
        }
開發者ID:BillTheBest,項目名稱:opencbs,代碼行數:85,代碼來源:ClientForm.cs


注:本文中的OpenCBS.CoreDomain.Contracts.Loans.Loan.CalculateAlignDisbursementDate方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。