BusinessMgr 3.0.1.5
This commit is contained in:
@@ -48,7 +48,7 @@ namespace Sarand.Net.Standard.Base.ReferenceData
|
|||||||
public String Symbol { get; set; } = "";
|
public String Symbol { get; set; } = "";
|
||||||
public bool SuffixSymbol { get; set; } = false;
|
public bool SuffixSymbol { get; set; } = false;
|
||||||
public bool IncludeSpace { get; set; } = false;
|
public bool IncludeSpace { get; set; } = false;
|
||||||
public short Decimals { get; set; } = 0;
|
public ushort Decimals { get; set; } = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
//-------------------------------------------------------------------
|
//-------------------------------------------------------------------
|
||||||
@@ -103,7 +103,7 @@ namespace Sarand.Net.Standard.Base.ReferenceData
|
|||||||
get { return data.IncludeSpace; }
|
get { return data.IncludeSpace; }
|
||||||
set { CheckChanged(data.IncludeSpace, value); data.IncludeSpace = value; }
|
set { CheckChanged(data.IncludeSpace, value); data.IncludeSpace = value; }
|
||||||
}
|
}
|
||||||
public short Decimals
|
public ushort Decimals
|
||||||
{
|
{
|
||||||
get { return data.Decimals; }
|
get { return data.Decimals; }
|
||||||
set { CheckChanged(data.Decimals, value); data.Decimals = value; }
|
set { CheckChanged(data.Decimals, value); data.Decimals = value; }
|
||||||
@@ -172,9 +172,9 @@ namespace Sarand.Net.Standard.Base.ReferenceData
|
|||||||
{
|
{
|
||||||
return FormatAmount(Symbol, SuffixSymbol, IncludeSpace, amount, Decimals);
|
return FormatAmount(Symbol, SuffixSymbol, IncludeSpace, amount, Decimals);
|
||||||
}
|
}
|
||||||
public static String FormatAmount (String symbol, bool suffix, bool includeSpace, decimal amount, short decimals)
|
public static String FormatAmount (String symbol, bool suffix, bool includeSpace, decimal amount, ushort decimals)
|
||||||
{
|
{
|
||||||
String format = "N" + Math.Max(0, Math.Min(10, (int)decimals));
|
String format = "N" + Math.Max(0, Math.Min(4, (int)decimals));
|
||||||
String amountFmt = amount.ToString(format);
|
String amountFmt = amount.ToString(format);
|
||||||
if (suffix) amountFmt += (includeSpace ? " " : "") + symbol;
|
if (suffix) amountFmt += (includeSpace ? " " : "") + symbol;
|
||||||
else amountFmt = symbol + (includeSpace ? " " : "") + amountFmt;
|
else amountFmt = symbol + (includeSpace ? " " : "") + amountFmt;
|
||||||
@@ -235,7 +235,7 @@ namespace Sarand.Net.Standard.Base.ReferenceData
|
|||||||
get { return data.IncludeSpace; }
|
get { return data.IncludeSpace; }
|
||||||
set { data.IncludeSpace = value; }
|
set { data.IncludeSpace = value; }
|
||||||
}
|
}
|
||||||
public short Decimals
|
public ushort Decimals
|
||||||
{
|
{
|
||||||
get { return data.Decimals; }
|
get { return data.Decimals; }
|
||||||
set { data.Decimals = value; }
|
set { data.Decimals = value; }
|
||||||
|
|||||||
@@ -214,7 +214,7 @@ namespace Sarand.Net.Standard.Dbas.ReferenceData
|
|||||||
dbCurrency._Symbol = currency.Symbol;
|
dbCurrency._Symbol = currency.Symbol;
|
||||||
dbCurrency._Suffix = currency.SuffixSymbol;
|
dbCurrency._Suffix = currency.SuffixSymbol;
|
||||||
dbCurrency._IncSpace = currency.IncludeSpace;
|
dbCurrency._IncSpace = currency.IncludeSpace;
|
||||||
dbCurrency._Decimals = currency.Decimals;
|
dbCurrency._Decimals = (short)currency.Decimals;
|
||||||
// Common properties.
|
// Common properties.
|
||||||
/*
|
/*
|
||||||
dbCurrency._Notes = currency.Notes;
|
dbCurrency._Notes = currency.Notes;
|
||||||
@@ -242,7 +242,7 @@ namespace Sarand.Net.Standard.Dbas.ReferenceData
|
|||||||
currency.Symbol = dbCurrency._Symbol;
|
currency.Symbol = dbCurrency._Symbol;
|
||||||
currency.SuffixSymbol = dbCurrency._Suffix;
|
currency.SuffixSymbol = dbCurrency._Suffix;
|
||||||
currency.IncludeSpace = dbCurrency._IncSpace;
|
currency.IncludeSpace = dbCurrency._IncSpace;
|
||||||
currency.Decimals = dbCurrency._Decimals;
|
currency.Decimals = (ushort)dbCurrency._Decimals;
|
||||||
// Common properties.
|
// Common properties.
|
||||||
/*
|
/*
|
||||||
currency.Notes = dbCurrency._Notes;
|
currency.Notes = dbCurrency._Notes;
|
||||||
|
|||||||
Reference in New Issue
Block a user