本文整理汇总了C#中OpenCBS.Shared.OCurrency.GetFormatedValue方法的典型用法代码示例。如果您正苦于以下问题:C# OCurrency.GetFormatedValue方法的具体用法?C# OCurrency.GetFormatedValue怎么用?C# OCurrency.GetFormatedValue使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类OpenCBS.Shared.OCurrency
的用法示例。
在下文中一共展示了OCurrency.GetFormatedValue方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CloseSavingsForm
public CloseSavingsForm(OCurrency pBalance)
{
InitializeComponent();
lbTotalAmountValue.Text = pBalance.GetFormatedValue(UseCents);
gbCloseFees.Enabled = false;
_amount = pBalance;
_closeFees = 0;
Initialize();
}
示例2: DisplayGuarantors
private void DisplayGuarantors(IEnumerable<Guarantor> pGuarantors, OCurrency pAmount)
{
_totalGuarantorAmount = 0;
OCurrency totalGuarantorAmountPercent = 0;
listViewGuarantors.Items.Clear();
foreach (Guarantor selectedGuarantor in pGuarantors)
{
ListViewItem listViewItem = new ListViewItem(((Person)selectedGuarantor.Tiers).Name) { Tag = selectedGuarantor };
listViewItem.SubItems.Add(selectedGuarantor.Amount.GetFormatedValue(_credit.UseCents));
if (pAmount.HasValue)
listViewItem.SubItems.Add((selectedGuarantor.Amount / pAmount * (double)100).ToString());
else
listViewItem.SubItems.Add("-");
listViewItem.SubItems.Add(selectedGuarantor.Description);
_totalGuarantorAmount += selectedGuarantor.Amount;
totalGuarantorAmountPercent += selectedGuarantor.Amount / pAmount * (double)100;
listViewGuarantors.Items.Add(listViewItem);
}
var totalItem = new ListViewItem("");
totalItem.Font = listViewGuarantors.Font;
totalItem.Font = new Font(totalItem.Font, FontStyle.Bold);
totalItem.SubItems.Add(_totalGuarantorAmount.GetFormatedValue(_credit.UseCents));
totalItem.SubItems.Add(totalGuarantorAmountPercent.GetFormatedValue(true));
listViewGuarantors.Items.Add(totalItem);
}
示例3: DisplayCollateral
private void DisplayCollateral()
{
_totalCollateralAmount = 0;
OCurrency totalCollateralAmountPercent = 0;
listViewCollaterals.Items.Clear();
foreach (ContractCollateral selectedCollateral in _collaterals)
{
CollateralProduct collateralProduct =
ServicesProvider.GetInstance().GetCollateralProductServices().SelectCollateralProductByPropertyId(selectedCollateral.PropertyValues[0].Property.Id);
OCurrency selectedCollateralAmount = 0;
foreach (CollateralPropertyValue propertyValue in selectedCollateral.PropertyValues)
if (propertyValue.Property.Name.Equals(GetString("FrmAddCollateralProduct", "propertyAmount")) ||
propertyValue.Property.Name.Equals("Montant") || propertyValue.Property.Name.Equals("Сумма") || propertyValue.Property.Name.Equals("Amount"))
selectedCollateralAmount = new OCurrency(Converter.CustomFieldValueToDecimal(propertyValue.Value));
string selectedCollateralDescription = string.Empty;
foreach (CollateralPropertyValue propertyValue in selectedCollateral.PropertyValues)
if (propertyValue.Property.Name.Equals(GetString("FrmAddCollateralProduct", "propertyDescription")) ||
propertyValue.Property.Name.Equals("Description") || propertyValue.Property.Name.Equals("Описание"))
selectedCollateralDescription = propertyValue.Value;
var listViewItem = new ListViewItem(collateralProduct.Name) { Tag = selectedCollateral };
listViewItem.SubItems.Add(selectedCollateralAmount.GetFormatedValue(_credit.UseCents));
if (_credit.Amount.HasValue)
listViewItem.SubItems.Add((selectedCollateralAmount / _credit.Amount * (double)100).ToString());
else
listViewItem.SubItems.Add("-");
listViewItem.SubItems.Add(selectedCollateralDescription);
_totalCollateralAmount += selectedCollateralAmount;
totalCollateralAmountPercent += selectedCollateralAmount / _credit.Amount * (double)100;
listViewCollaterals.Items.Add(listViewItem);
}
var totalItem = new ListViewItem("");
totalItem.Font = listViewCollaterals.Font;
totalItem.Font = new Font(totalItem.Font, FontStyle.Bold);
totalItem.SubItems.Add(_totalCollateralAmount.GetFormatedValue(_credit.UseCents));
totalItem.SubItems.Add(totalCollateralAmountPercent.GetFormatedValue(true));
listViewCollaterals.Items.Add(totalItem);
}
示例4: DisplayAmountLabel
private void DisplayAmountLabel()
{
_lbICName.Text = _loan.Product.Currency.Name;
_maximumAmount = _loan.CalculateMaximumAmountAuthorizedToRepay(_instalmentNumber, _date.Date, _disableFees, _manualPenalties, _manualCommission,
_disableInterests, _manualInterests, _keepExpectedInstallment);
_regradingAmount = _loan.CalculateMaximumAmountToRegradingLoan(_instalmentNumber, _date.Date, _disableFees, _manualPenalties, _manualCommission,
_disableInterests, _manualInterests, _keepExpectedInstallment);
_lbICAmountMinMax.Text = string.Format("{0}0\r\n{1}{2}",
MultiLanguageStrings.GetString(Ressource.CreditContractRepayForm, "min.Text"),
MultiLanguageStrings.GetString(Ressource.CreditContractRepayForm, "max.Text"), _maximumAmount.GetFormatedValue(_loan.UseCents));
nudICAmount.Maximum = _maximumAmount.Value;
if (checkBoxTotalAmount.Checked && _disableFees)
{
nudICAmount.Value = _maximumAmount.Value;
}
if (_disableFees && ServicesHelper.ConvertStringToDecimal(nudICAmount.Text, 0, _loan.UseCents) > _maximumAmount)
{
nudICAmount.Text = _maximumAmount.GetFormatedValue(_loan.UseCents);
}
lblAmountToGoBackNormal.Text = string.Format("{0} {1}",
MultiLanguageStrings.GetString(Ressource.CreditContractRepayForm, "amountToGoNormal.Text"),_regradingAmount.GetFormatedValue(_loan.UseCents));
if (_loan.Product.LoanType == OLoanTypes.DecliningFixedPrincipalWithRealInterest)
nudICAmount.Value = _regradingAmount.Value;
if (_exchangeRate != null && ServicesProvider.GetInstance().GetCurrencyServices().FindAllCurrencies().Count != 1)
{
_lbECName.Text = ServicesProvider.GetInstance().GetCurrencyServices().GetPivot().Name;
_lbECAmountMinMax.Text = string.Format("{0}0\r\n{1}{2}",
MultiLanguageStrings.GetString(Ressource.CreditContractRepayForm, "min.Text"),
MultiLanguageStrings.GetString(Ressource.CreditContractRepayForm, "max.Text"),
(_maximumAmount / _exchangeRate.Rate).GetFormatedValue(_loan.UseCents));
nudECAmount.Maximum = (_maximumAmount / _exchangeRate.Rate).Value;
_lbECAmountToGoBackNormal.Text = string.Format("{0} {1}",
MultiLanguageStrings.GetString(Ressource.CreditContractRepayForm, "amountToGoNormal.Text"),
(_regradingAmount / _exchangeRate.Rate).GetFormatedValue(_loan.UseCents));
}
}
示例5: ConvertNullableDecimalToString
//convert OCurrency to string
public static string ConvertNullableDecimalToString(OCurrency number)
{
if (number.HasValue)
{
try
{
return number.GetFormatedValue(true);
}
catch
{
return String.Empty;
}
}
return String.Empty;
}