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


C# ISavingsContract类代码示例

本文整理汇总了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);
     }
 }
开发者ID:Ramazanov,项目名称:FomsNet,代码行数:25,代码来源:CalculateInterestsStrategy.cs

示例2: SavingsOperationForm

 public SavingsOperationForm(ISavingsContract pSaving, OSavingsOperation pDirections)
 {
     InitializeComponent();
     _bookingDirection = pDirections;
     _saving = pSaving;
     SwitchBookingDirection();
     Initialize();
 }
开发者ID:TalasZh,项目名称:opencbs,代码行数:8,代码来源:SavingsOperationForm.cs

示例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;
        }
开发者ID:aelhadi,项目名称:opencbs,代码行数:11,代码来源:SavingsOperationForm.cs

示例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);
        }
开发者ID:aelhadi,项目名称:opencbs,代码行数:11,代码来源:ContractChartOfAccounts.cs

示例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);
 }
开发者ID:aelhadi,项目名称:opencbs,代码行数:13,代码来源:PostingInterestsStrategy.cs

示例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);
     }
 }
开发者ID:aelhadi,项目名称:opencbs,代码行数:15,代码来源:CalculateInterestsStrategy.cs

示例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);
     }
 }
开发者ID:Ramazanov,项目名称:FomsNet,代码行数:18,代码来源:PostingInterestsStrategy.cs

示例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;
 }
开发者ID:TalasZh,项目名称:opencbs,代码行数:12,代码来源:SavingsContract.cs

示例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;
        }
开发者ID:TalasZh,项目名称:opencbs,代码行数:19,代码来源:SavingsContract.cs

示例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;
        }
开发者ID:TalasZh,项目名称:opencbs,代码行数:18,代码来源:SavingsContract.cs

示例11: FireEvent

 public void FireEvent(SavingEvent e, ISavingsContract pSaving, SqlTransaction sqlTransac)
 {
     e.IsFired = true;
     SavingEventOrigination(e, pSaving, sqlTransac);
 }
开发者ID:aelhadi,项目名称:opencbs,代码行数:5,代码来源:EventProcessorServices.cs

示例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;
        }
开发者ID:TalasZh,项目名称:opencbs,代码行数:7,代码来源:SavingServices.cs

示例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);
        }
开发者ID:BillTheBest,项目名称:opencbs,代码行数:69,代码来源:ClientForm.cs

示例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;
        }
开发者ID:TalasZh,项目名称:opencbs,代码行数:48,代码来源:SavingServices.cs

示例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;
        }
开发者ID:TalasZh,项目名称:opencbs,代码行数:9,代码来源:SavingServices.cs


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