@@ -131,6 +131,23 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
||||
}
|
||||
}
|
||||
|
||||
public static string DecimalNullToString (this decimal? value,int ? digitPlaces)
|
||||
{
|
||||
digitPlaces = digitPlaces ?? 0;
|
||||
if (value==null)
|
||||
{
|
||||
return string.Empty;
|
||||
}
|
||||
if (digitPlaces == -1)
|
||||
{
|
||||
return value.Value.ToString();
|
||||
}
|
||||
else
|
||||
{
|
||||
return decimal.Round(value.Value, digitPlaces.Value, MidpointRounding.AwayFromZero).ToString("F" + digitPlaces.ToString());
|
||||
}
|
||||
}
|
||||
|
||||
public static Dictionary<ReadingCategory, decimal> TaskNumDic = new Dictionary<ReadingCategory, decimal>()
|
||||
{
|
||||
{ReadingCategory.Visit, 0 },
|
||||
|
||||
Reference in New Issue
Block a user