当前位置: 首页>>代码示例>>C#>>正文


C# Shared.OCurrency类代码示例

本文整理汇总了C#中OpenCBS.Shared.OCurrency的典型用法代码示例。如果您正苦于以下问题:C# OCurrency类的具体用法?C# OCurrency怎么用?C# OCurrency使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


OCurrency类属于OpenCBS.Shared命名空间,在下文中一共展示了OCurrency类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: RepayCommission

 public void RepayCommission(Installment pInstallment, ref OCurrency pAmountPaid, ref OCurrency pCommisionEvent)
 {
     if (!_pCCO.CancelFees)
         AutomaticRepayMethod(pInstallment, ref pAmountPaid, ref pCommisionEvent);
     else
         ManualRepayMethod(pInstallment, ref pAmountPaid, ref pCommisionEvent);
 }
开发者ID:aelhadi,项目名称:opencbs,代码行数:7,代码来源:RepayCommisionStrategy.cs

示例2: Repay

 public void Repay(Installment pInstallment, ref OCurrency pAmountPaid, ref OCurrency pFeesEvent)
 {
     //Nothing to modify
     pInstallment.PaidFees += pFeesEvent;
     pAmountPaid -= pFeesEvent;
     pFeesEvent = 0;
 }
开发者ID:aelhadi,项目名称:opencbs,代码行数:7,代码来源:ManualMethod.cs

示例3: FixedInstallmentStrategy

 public FixedInstallmentStrategy(Loan pContract, OCurrency pStartAmount, int pNumberOfInstalments, ApplicationSettings pGeneralSettings)
 {
     _contract = pContract;
     _startAmount = pStartAmount;
     _numberOfInstallmentsToPay = pNumberOfInstalments;
     _roundingPoint = pContract.UseCents ? 2 : 0;
     _generalSettings = pGeneralSettings;
 }
开发者ID:aelhadi,项目名称:opencbs,代码行数:8,代码来源:FixedInstallmentStrategy.cs

示例4: ManualRepayMethod

 private static void ManualRepayMethod(Installment pInstallment, ref OCurrency pAmountPaid, ref OCurrency pCommisionEvent)
 {
     pInstallment.PaidCommissions = pCommisionEvent;
     pInstallment.CommissionsUnpaid = 0;
     pAmountPaid -= pCommisionEvent;
     pCommisionEvent = 0;
     //Nothing to modify
 }
开发者ID:aelhadi,项目名称:opencbs,代码行数:8,代码来源:RepayCommisionStrategy.cs

示例5: FlatStrategy

        public FlatStrategy(Loan pContract, ApplicationSettings pGeneralSettings, OCurrency pInitialOlbOfContractBeforeRescheduling)
        {
            _roundingPoint = pContract.UseCents ? 2 : 0;

            _initialOlbOfContractBeforeRescheduling = pInitialOlbOfContractBeforeRescheduling;
            _contract = pContract;
            _generalSettings = pGeneralSettings;
        }
开发者ID:aelhadi,项目名称:opencbs,代码行数:8,代码来源:FlatStrategy.cs

示例6: LoanAmountCycle

 public LoanAmountCycle(int id, int loanCycle,  OCurrency min, OCurrency max, int cycleObjectId, int cycleId)
 {
     Id = id;
     LoanCycle = loanCycle;
     Min = min;
     Max = max;
     CycleObjectId = cycleObjectId;
     CycleId = cycleId;
 }
开发者ID:aelhadi,项目名称:opencbs,代码行数:9,代码来源:LoanAmountCycle.cs

示例7: BookingToView

 public BookingToView(OBookingDirections pDirection, OCurrency pAmount, DateTime pDate, double? pExchangeRate, string pContractCode, string pEventCode)
 {
 	Direction = pDirection;
 	_amount = pAmount;
 	Date = pDate;
 	_exchangeRate = pExchangeRate;
 	ContractCode = pContractCode;
 	EventCode = pEventCode;
 }
开发者ID:aelhadi,项目名称:opencbs,代码行数:9,代码来源:BookingToView.cs

示例8: Booking

        public Booking(int pNumber, Account pCreditaccount, OCurrency pAmount, Account pDebitaccount, OAccountingLabels pLabel, DateTime pDate, Branch branch)
		{
            Number = pNumber;
            CreditAccount = pCreditaccount;
            DebitAccount = pDebitaccount;
            _amount = pAmount;
		    Label = pLabel;
            Date = pDate;
            Branch = branch;
		}
开发者ID:aelhadi,项目名称:opencbs,代码行数:10,代码来源:Booking.cs

示例9: Account

        public Account(string accountNumber, string label, OCurrency   balance, string typeCode, bool debitPlus, OAccountCategories category, int pCurrencyId)
		{
			_number = accountNumber;
			_label = label;
			_balance = balance;
			TypeCode = typeCode;
			_debitPlus = debitPlus;
			AccountCategory = category;
            CurrencyId = pCurrencyId;
		}
开发者ID:aelhadi,项目名称:opencbs,代码行数:10,代码来源:Account.cs

示例10: CloseSavingsForm

        public CloseSavingsForm(OCurrency pBalance)
        {
            InitializeComponent();

            lbTotalAmountValue.Text = pBalance.GetFormatedValue(UseCents);
            gbCloseFees.Enabled = false;
            _amount = pBalance;
            _closeFees = 0;

            Initialize();
        }
开发者ID:himmelreich-it,项目名称:opencbs,代码行数:11,代码来源:CloseSavingsForm.cs

示例11: RepayNextInstallments

        public void RepayNextInstallments(ref OCurrency amountPaid, ref OCurrency interestEvent, ref OCurrency interestPrepayment, ref OCurrency principalEvent, ref OCurrency feesEvent, ref OCurrency commissionsEvent)
        {
            if (amountPaid == 0) return;
            for(int i = 0 ; i < _contract.NbOfInstallments ; i++)
            {
                Installment installment = _contract.GetInstallment(i);
                if (!installment.IsRepaid && amountPaid > 0)
                {
                    //commission
                    _methodToRepayCommission.RepayCommission(installment, ref amountPaid, ref commissionsEvent);
                    if (amountPaid == 0) break;

                    //penalty
                    _methodToRepayFees.RepayFees(installment, ref amountPaid, ref feesEvent);
                    if (amountPaid == 0) break;

                    //Interests
                    if (amountPaid == 0) return;
                    _methodToRepayInterest.RepayInterest(installment, ref amountPaid, ref interestEvent,ref interestPrepayment);

                    //principal
                    if (amountPaid == 0)
                    {
                        _paidInstallments.Add(installment);
                        return;
                    }

                    OCurrency principalHasToPay = installment.CapitalRepayment - installment.PaidCapital;

                    if (AmountComparer.Compare(amountPaid, principalHasToPay) < 0)
                    {
                        installment.PaidCapital += amountPaid;
                        installment.PaidCapital = Math.Round(installment.PaidCapital.Value, 2);
                        principalEvent += amountPaid;
                        amountPaid = 0;
                    }
                    else if (AmountComparer.Compare(amountPaid, principalHasToPay) > 0)
                    {
                        installment.PaidCapital = installment.CapitalRepayment;
                        amountPaid -= principalHasToPay;
                        principalEvent += principalHasToPay;
                    }
                    else
                    {
                        installment.PaidCapital += amountPaid;
                        installment.PaidCapital = Math.Round(installment.PaidCapital.Value, 2);
                        principalEvent += amountPaid;
                        amountPaid = 0;
                    }

                    _paidInstallments.Add(installment);
                }
            }
        }
开发者ID:aelhadi,项目名称:opencbs,代码行数:54,代码来源:FlateKeepExpectedInstallments.cs

示例12: RepayNextInstallments

        /// <summary>
        /// This method recalculates installments for a declining rate exotic loan in case of over payment.
        /// </summary>
        public void RepayNextInstallments(ref OCurrency amountPaid, ref OCurrency interestEvent, ref OCurrency interestPrepayment, ref OCurrency principalEvent, ref OCurrency feesEvent, ref OCurrency commissionsEvent)
        {
            OCurrency totalAmount = 0;
            bool firstInstallmentToRepay = false;
            double baseTocalculatePrincipalCoeff = 0;

            if(amountPaid > 0)
            {
                for (int i = 0; i < _contract.NbOfInstallments; i++)
                {
                    Installment installment = _contract.GetInstallment(i);
                    if (installment.IsRepaid &&  installment.Number > _contract.GracePeriod)
                        baseTocalculatePrincipalCoeff += _contract.Product.ExoticProduct.GetExoticInstallment(i - _contract.GracePeriod.Value).PrincipalCoeff;
                }

                baseTocalculatePrincipalCoeff = 1 - baseTocalculatePrincipalCoeff;

                for(int i = 0;i < _contract.NbOfInstallments;i++)
                {
                    Installment installment = _contract.GetInstallment(i);
                    if(!installment.IsRepaid && installment.Number <= _contract.GracePeriod)  //during Grace Period
                    {
                        installment.OLB -= amountPaid;
                        installment.CapitalRepayment = 0;
                        installment.InterestsRepayment = Math.Round(installment.OLB.Value * Convert.ToDecimal(_contract.InterestRate),2);
                    }
                    else if(!installment.IsRepaid && !firstInstallmentToRepay)
                    {
                        ExoticInstallment exoticInstallment = _contract.Product.ExoticProduct.GetExoticInstallment(i - _contract.GracePeriod.Value);
                        firstInstallmentToRepay = true;
                        installment.OLB -= amountPaid;
                        totalAmount = installment.OLB;

                        installment.CapitalRepayment = Math.Round(totalAmount.Value * Convert.ToDecimal(exoticInstallment.PrincipalCoeff / baseTocalculatePrincipalCoeff),2);
                        installment.InterestsRepayment = Math.Round(installment.OLB.Value * Convert.ToDecimal(_contract.InterestRate),2);
                    }
                    else if(!installment.IsRepaid)
                    {
                        ExoticInstallment exoticInstallment = _contract.Product.ExoticProduct.GetExoticInstallment(i - _contract.GracePeriod.Value);
                        Installment _installment = _contract.GetInstallment(i - 1);
                        installment.OLB  = _installment.OLB - _installment.CapitalRepayment;

                        installment.CapitalRepayment = Math.Round(totalAmount.Value * Convert.ToDecimal(exoticInstallment.PrincipalCoeff / baseTocalculatePrincipalCoeff),2);
                        installment.InterestsRepayment = Math.Round(installment.OLB.Value * Convert.ToDecimal(_contract.InterestRate),2); 
                    }

                    _paidInstallments.Add(installment);
                }

                principalEvent += amountPaid;
                amountPaid = 0;
            }
        }
开发者ID:aelhadi,项目名称:opencbs,代码行数:56,代码来源:DecliningExoticKeepNotExpectedInstallmentsWithCents.cs

示例13: Installment

 public Installment(DateTime expectedDate,OCurrency interestRepayment,OCurrency capitalRepayment,
                    OCurrency paidCapital, OCurrency paidInterests, OCurrency paidFees, DateTime? paidDate, int number)
 {
     ExpectedDate = expectedDate;
     _interestsRepayment = interestRepayment;
     _capitalRepayment = capitalRepayment;
     _paidCapital = paidCapital;
     _paidInterests = paidInterests;
     _paidFees = paidFees;
     PaidDate = paidDate;
     Number = number;
     CalculatedPenalty = 0m;
     IsLastToRepay = false;
 }
开发者ID:evgeniyabdukarimov,项目名称:opencbs,代码行数:14,代码来源:Installment.cs

示例14: CreditContractOptions

 public CreditContractOptions(OLoanTypes pLoanType, bool pKeepExpectedInstallments,
     bool pCancelFees, OCurrency pManualFeesAmount, OCurrency pManualCommissionAmount,
     bool pCancelInterests, OCurrency pManualInterestsAmount,
     OAnticipatedRepaymentPenaltiesBases pAnticipatedTotalRepaymentPenaltiesBase)
 {
     _loanType = pLoanType;
     _keepExpectedInstallments = pKeepExpectedInstallments;
     _cancelFees = pCancelFees;
     _manualFeesAmount = pManualFeesAmount;
     _manualCommissionAmount = pManualCommissionAmount;
     _cancelInterests = pCancelInterests;
     _manualInterestsAmount = pManualInterestsAmount;
     _anticipatedTotalRepaymentPenaltiesBase = pAnticipatedTotalRepaymentPenaltiesBase;
 }
开发者ID:aelhadi,项目名称:opencbs,代码行数:14,代码来源:CreditContractOptions.cs

示例15: Repay

        public void Repay(ref OCurrency pAmountPaid, ref OCurrency pFeesEvent, ref OCurrency pCommissionsEvent, ref OCurrency pInterestEvent)
        {
            if (_cco.CancelFees && (_cco.ManualFeesAmount + _cco.ManualCommissionAmount) >= 0)
            {
                pCommissionsEvent = _cco.ManualCommissionAmount;
                pFeesEvent = _cco.ManualFeesAmount;

                if (AmountComparer.Compare(pAmountPaid, _cco.ManualFeesAmount + _cco.ManualCommissionAmount) > 0)
                {
                    //pAmountPaid -= _cco.ManualFeesAmount + _cco.ManualCommissionAmount;
                }
                else
                    pAmountPaid = 0;
            }

            if (_cco.KeepExpectedInstallments)
            {
                if (_cco.CancelInterests && _cco.ManualInterestsAmount >= 0)
                {
                    OCurrency manualInterestAmount = _cco.ManualInterestsAmount;
                    for(int i = 0;i<_contract.NbOfInstallments;i++)
                    {
                        Installment installment = _contract.GetInstallment(i);
                        if(!installment.IsRepaid && pAmountPaid > 0 && manualInterestAmount > 0)
                        {
                            OCurrency interestHasToPay = installment.InterestsRepayment - installment.PaidInterests;
                            if (AmountComparer.Compare(manualInterestAmount,interestHasToPay) > 0)
                            {
                                pInterestEvent += interestHasToPay;
                                installment.PaidInterests = installment.InterestsRepayment;
                                pAmountPaid -= interestHasToPay;
                                manualInterestAmount -= interestHasToPay;
                            }
                            else
                            {
                                pInterestEvent += manualInterestAmount;
                                installment.PaidInterests += manualInterestAmount;
                                pAmountPaid -= manualInterestAmount;
                                manualInterestAmount = 0;
                            }

                            PaidIstallments.Add(installment);
                        }
                    }
                }
            }
        }
开发者ID:aelhadi,项目名称:opencbs,代码行数:47,代码来源:RepaymentMethod.cs


注:本文中的OpenCBS.Shared.OCurrency类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。