• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# ISavingsContract类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



ISavingsContract类属于命名空间,在下文中一共展示了ISavingsContract类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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


示例16: SpecialOperationDebit

        public SavingDebitOperationEvent SpecialOperationDebit(ISavingsContract pSaving, DateTime pDate, OCurrency debitAmount,
                string pDescription, User pUser, OSavingsMethods savingsMethod)
        {
            using (SqlConnection conn = _savingManager.GetConnection())
              using (SqlTransaction sqlTransaction = conn.BeginTransaction())
              {
                  try
                  {
                      if (pSaving is SavingBookContract)
                      {
                          decimal vBalance = CheckVirtualBalance((SavingBookContract) pSaving, debitAmount);

                          if (vBalance > 0)
                          {
                              List<string> messages = new List<string>
                                                          {
                                                              ServicesHelper.ConvertDecimalToString(
                                                                  ((SavingBookContract) pSaving).GetBalance().Value),
                                                              ServicesHelper.ConvertDecimalToString(vBalance),
                                                              ((SavingBookContract) pSaving).Loans.Count.ToString(),
                                                              ServicesHelper.ConvertDecimalToString(
                                                                  ((SavingBookContract) pSaving).GetBalance().Value -
                                                                  vBalance)
                                                          };
                              throw new OpenCbsSavingException(
                                  OpenCbsSavingExceptionEnum.BalanceOnCurrentSavingAccountForTransfer, messages);
                          }
                      }

                      //// Create a fake Saving object
                      ISavingsContract savingSimulation = (ISavingsContract) pSaving.Clone();
                      // Do deposit to the fake Saving object
                      savingSimulation.SpecialOperationDebit(debitAmount, pDate, pDescription, pUser);
                      // Check balance simulation
                      if (!IsSavingBalanceCorrect(savingSimulation))
                          throw new OpenCbsSavingException(OpenCbsSavingExceptionEnum.BalanceIsInvalid);

                      SavingDebitOperationEvent events = pSaving.SpecialOperationDebit(debitAmount, pDate, pDescription,
                                                                                        pUser);

                      _ePS.FireEvent(events, pSaving, sqlTransaction);

                      // Change overdraft state
                      if (pSaving is SavingBookContract)
                      {
                          if (pSaving.GetBalance() > 0)
                          {
                              ((SavingBookContract) pSaving).InOverdraft = false;
                              UpdateOverdraftStatus(pSaving.Id, false);
                          }
                      }
                      sqlTransaction.Commit();
                      return events;
                  }
                  catch (Exception)
                  {
                      sqlTransaction.Rollback();
                      throw;
                  }
              }
        }
开发者ID:TalasZh,项目名称:opencbs,代码行数:61,代码来源:SavingServices.cs


示例17: SpecialOperation

        public void SpecialOperation(ISavingsContract saving, DateTime pDate, OCurrency amount,
              string description, User pUser, OSavingsMethods savingsMethod, bool isCredit, Booking booking)
        {
            if (booking == null)
               throw new OpenCbsBookingException(OpenCbsBookingExceptionsEnum.BookingIsEmpty);

               booking.Amount = amount;
               booking.Description = description;
               booking.ExchangeRate = 1;
               booking.Date = TimeProvider.Now;
               booking.Currency = saving.Product.Currency;
               booking.User = User.CurrentUser;

               SavingEvent e;

               if (isCredit)
               {
               e = SpecialOperationCredit(saving, pDate, amount, description,
                                   User.CurrentUser, savingsMethod);
               }
               else
               {
               e = SpecialOperationDebit(saving, pDate, amount, description,
                                   User.CurrentUser, savingsMethod);
               }

               booking.EventId = e.Id;
               ServicesProvider.GetInstance().GetAccountingServices().BookManualEntry(booking, User.CurrentUser);
        }
开发者ID:TalasZh,项目名称:opencbs,代码行数:29,代码来源:SavingServices.cs


示例18: DisplaySaving

        private void DisplaySaving(ISavingsContract saving)
        {
            saving = SavingServices.GetSaving(saving.Id);

            ((SavingBookContract)saving).Loans = SavingServices.SelectLoansBySavingsId(saving.Id);

            if (!tabControlPerson.TabPages.Contains(tabPageContracts))
            {
                tabControlPerson.TabPages.Add(tabPageContracts);
                panelLoansContracts.Controls.Add(pnlLoans);
            }

            tabControlPerson.TabPages.Remove(tabPageSavingDetails);
            tabControlPerson.TabPages.Add(tabPageSavingDetails);

            _saving = (SavingBookContract)saving;
            DisplaySavingProduct(_saving.Product);
            InitializeTabPageTermDeposit();
            nudDownInterestRate.Enabled = false;
            nudDownInitialAmount.Enabled = false;
            nudWithdrawFees.Enabled = false;
            nudEntryFees.Enabled = false;
            nudTransferFees.Enabled = false;
            nudIbtFee.Enabled = false;
            nudDepositFees.Enabled = false;
            nudChequeDepositFees.Enabled = false;
            nudCloseFees.Enabled = false;
            nudManagementFees.Enabled = false;
            nudOverdraftFees.Enabled = false;
            nudAgioFees.Enabled = false;
            nudReopenFees.Enabled = false;
            btSavingsUpdate.Visible = false;
            nudNumberOfPeriods.Enabled = false;
            btSearchContract2.Enabled = false;
            cmbRollover2.Enabled = false;
            cmbSavingsOfficer.Enabled = false;
            cmbSavingsOfficer.Items.Add(User.CurrentUser);
            foreach (User subordinate in User.CurrentUser.Subordinates)
            {
                cmbSavingsOfficer.Items.Add(subordinate);
            }
            int index = -1;
            for (int i = 0; i < cmbSavingsOfficer.Items.Count; i++)
            {
                User u = (User)cmbSavingsOfficer.Items[i];
                if (u.Id != saving.SavingsOfficer.Id) continue;

                index = i;
                break;
            }
            cmbSavingsOfficer.SelectedIndex = index;
            tabControlPerson.SelectedTab = tabPageSavingDetails;
            Text = string.Format("{0} - {1}", _title, _saving.Code);

            groupBoxSaving.Name += string.Format(" {0}", _saving.Product.Name);
            groupBoxSaving.Text = string.Format("{0} : {1}",
                MultiLanguageStrings.GetString(Ressource.ClientForm,
                _saving is SavingBookContract ? "SavingsBook.Text" : "CompulsorySavings.Text"),
                MultiLanguageStrings.GetString(Ressource.ClientForm, "Savings" + _saving.Status + ".Text"));

            switch (_saving.Status)
            {
                case OSavingsStatus.Pending:
                    {
                        groupBoxSaving.ForeColor = Color.FromArgb(246, 137, 56);
                        pnlSavingsButtons.Enabled = false;
                        buttonFirstDeposit.Visible = true;
                        buttonCloseSaving.Visible = false;
                        buttonReopenSaving.Visible = false;
                        break;
                    }
                case OSavingsStatus.Active:
                    {
                        groupBoxSaving.ForeColor = Color.FromArgb(61, 153, 57);
                        pnlSavingsButtons.Enabled = true;
                        buttonFirstDeposit.Visible = false;
                        buttonCloseSaving.Visible = true;
                        buttonReopenSaving.Visible = false;
                        break;
                    }
                case OSavingsStatus.Closed:
                    {
                        groupBoxSaving.ForeColor = Color.Red;
                        pnlSavingsButtons.Enabled = true;
                        buttonSavingsOperations.Enabled = false;
                        buttonFirstDeposit.Visible = false;
                        buttonCloseSaving.Visible = false;
                        buttonReopenSaving.Visible = true;
                        break;
                    }
            }

            tBSavingCode.Text = _saving.Code;

            DisplaySavingEvent(_saving);
            DisplaySavingLoans(_saving);

            buttonSaveSaving.Visible = false;

            InitSavingsBookPrintButton();
//.........这里部分代码省略.........
开发者ID:BillTheBest,项目名称:opencbs,代码行数:101,代码来源:ClientForm.cs


示例19: DisplaySavingEvent

        private void DisplaySavingEvent(ISavingsContract pSaving)
        {
            btCancelLastSavingEvent.Enabled = false;

            if (pSaving.Id != 0)
            {
                nudDownInterestRate.Value = nudDownInterestRate.Minimum = nudDownInterestRate.Maximum = (decimal)pSaving.InterestRate * 100;
                nudDownInitialAmount.Value = nudDownInitialAmount.Minimum = nudDownInitialAmount.Maximum = pSaving.InitialAmount.Value;

                SavingBookContract s = (SavingBookContract)pSaving;
                nudEntryFees.Value = nudEntryFees.Minimum = nudEntryFees.Maximum = s.EntryFees.Value;

                nudWithdrawFees.Value = nudWithdrawFees.Minimum = nudWithdrawFees.Maximum = s.FlatWithdrawFees.HasValue ?
                    s.FlatWithdrawFees.Value : (decimal)s.RateWithdrawFees.Value * 100;

                nudTransferFees.Value = nudTransferFees.Minimum = nudTransferFees.Maximum = s.FlatTransferFees.HasValue ?
                    s.FlatTransferFees.Value : (decimal)s.RateTransferFees.Value * 100;

                nudIbtFee.Value = s.FlatInterBranchTransferFee.HasValue ? s.FlatInterBranchTransferFee.Value
                    : Convert.ToDecimal(s.RateInterBranchTransferFee.Value);
                nudIbtFee.Minimum = nudIbtFee.Maximum = nudIbtFee.Value;

                nudDepositFees.Value = nudDepositFees.Minimum = nudDepositFees.Maximum = ((SavingBookContract)pSaving).DepositFees.Value;
                nudChequeDepositFees.Value = nudChequeDepositFees.Minimum = nudChequeDepositFees.Maximum = ((SavingBookContract)pSaving).ChequeDepositFees.Value;
                nudCloseFees.Value = nudCloseFees.Minimum = nudCloseFees.Maximum = ((SavingBookContract)pSaving).CloseFees.Value;
                nudManagementFees.Value = nudManagementFees.Minimum = nudManagementFees.Maximum = ((SavingBookContract)pSaving).ManagementFees.Value;
                nudOverdraftFees.Value = nudOverdraftFees.Minimum = nudOverdraftFees.Maximum = ((SavingBookContract)pSaving).OverdraftFees.Value;
                nudAgioFees.Value = nudAgioFees.Minimum = nudAgioFees.Maximum = (decimal)((SavingBookContract)pSaving).AgioFees.Value * 100;
                nudReopenFees.Value = nudReopenFees.Minimum = nudReopenFees.Maximum = ((SavingBookContract)pSaving).ReopenFees.Value;

            }

            lbSavingBalanceValue.Text = pSaving.GetFmtBalance(true);
            lbSavingAvBalanceValue.Text = pSaving.GetFmtAvailBalance(true);
            btCancelLastSavingEvent.Enabled = _saving.HasCancelableEvents();

            lvSavingEvent.Items.Clear();
            IEnumerable<SavingEvent> events = pSaving.Events.OrderBy(item => item.Date.Date);

            bool useCents = pSaving.Product.Currency.UseCents;
            foreach (SavingEvent e in events)
            {
                ListViewItem item = new ListViewItem(e.Date.ToString("dd/MM/yyyy HH:mm:ss"));
                item.SubItems.Add(e.Fee.GetFormatedValue(useCents));
                string amt = e.Amount.GetFormatedValue(useCents);
                item.SubItems.Add(e.IsDebit ? amt : string.Empty);
                item.SubItems.Add(e.IsDebit ? string.Empty : amt);
                item.SubItems.Add(e.ExtraInfo);
                item.SubItems.Add(e.Code);
                item.SubItems.Add(e.SavingsMethod.HasValue ? GetString("SavingsOperationForm", e.SavingsMethod + ".Text") : "-");
                item.SubItems.Add(e.User.Name);
                item.SubItems.Add(e.Description);
                item.SubItems.Add(e.CancelDate.HasValue ? e.CancelDate.Value.ToString("dd/MM/yyyy HH:mm:ss") : string.Empty);

                if (e.IsPending)
                {
                    item.BackColor = Color.Orange;
                    item.ForeColor = Color.White;
                }

                if (e.Deleted)
                {
                    item.BackColor = Color.FromArgb(188, 209, 199);
                    item.ForeColor = Color.White;
                }

                item.Tag = e;
                lvSavingEvent.Items.Add(item);
            }
        }
开发者ID:BillTheBest,项目名称:opencbs,代码行数:70,代码来源:ClientForm.cs


示例20: CloseAndTransfer

 private void CloseAndTransfer(ISavingsContract from, ISavingsContract to, DateTime date, User pUser,
     OCurrency amount, bool pIsDesactivateFees, Teller teller)
 {
     from.Transfer(to, amount, 0, date, "Closing transfer");
     from.Close(date, pUser, "Close savings contract", pIsDesactivateFees, teller, true);
 }
开发者ID:aelhadi,项目名称:opencbs,代码行数:6,代码来源:SavingBookContract.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# IScanFilter类代码示例发布时间:2022-05-24
下一篇:
C# ISandbox类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap