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 bool SuffixSymbol { 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; }
|
||||
set { CheckChanged(data.IncludeSpace, value); data.IncludeSpace = value; }
|
||||
}
|
||||
public short Decimals
|
||||
public ushort Decimals
|
||||
{
|
||||
get { return data.Decimals; }
|
||||
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);
|
||||
}
|
||||
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);
|
||||
if (suffix) amountFmt += (includeSpace ? " " : "") + symbol;
|
||||
else amountFmt = symbol + (includeSpace ? " " : "") + amountFmt;
|
||||
@@ -235,7 +235,7 @@ namespace Sarand.Net.Standard.Base.ReferenceData
|
||||
get { return data.IncludeSpace; }
|
||||
set { data.IncludeSpace = value; }
|
||||
}
|
||||
public short Decimals
|
||||
public ushort Decimals
|
||||
{
|
||||
get { return data.Decimals; }
|
||||
set { data.Decimals = value; }
|
||||
|
||||
Reference in New Issue
Block a user