BusinessMgr 3.0.1.5

This commit is contained in:
Andy Howard
2025-03-03 18:21:12 +00:00
parent f5e1c842d9
commit f4f50fc258
2 changed files with 7 additions and 7 deletions
@@ -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; }