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