當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。