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


C# ISavingsContract.GetFmtAvailBalance方法代码示例

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


在下文中一共展示了ISavingsContract.GetFmtAvailBalance方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: 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


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