private string BuildRoundingExpression(FormatNumberTO formatNumberTO)
// ReSharper restore InconsistentNaming
{
string expression;
enRoundingType roundingType = formatNumberTO.GetRoundingTypeEnum();
if(roundingType == enRoundingType.Normal)
{
expression = "round({0}, {1})";
}
else if(roundingType == enRoundingType.Up)
{
expression = "roundup({0}, {1})";
}
else if(roundingType == enRoundingType.Down)
{
expression = "rounddown({0}, {1})";
}
else
{
expression = "{0}";
}
expression = string.Format(expression, formatNumberTO.Number, formatNumberTO.RoundingDecimalPlaces);
return expression;
}