GetProperty question #4682
Unanswered
Chicagoan2016
asked this question in
Questions
Replies: 1 comment 2 replies
-
If you need the business object to keep the value with extra decimals, and only need to round for the report, I would do the rounding in the report code. If you want the business object to only have the value with two decimals, I would use a business rule to enforce that. It is common for our business objects to have a DecimalPlaces rule (a custom rule we created). If you need both values, you could have two properties and apply a rule similar to DecimalPlaces on the extra property. You would need to be careful that you are using the appropriate property in each usage context. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
In our reports, we show decimal values to two decimal places. Our Csla objects have decimal properties that return decimal values to four places. We just use something like Math.Round() but I was wondering if we could use a variation of GetProperty?
Regards
Beta Was this translation helpful? Give feedback.
All reactions