Hi There,
Does anybody know if there is an easier way of avoiding errors of errorprovider on CreateObject on a windowsform than the one Rocky suggested 07-16-2007 (see article), I want to keep the call to CheckRules() in create of the BO. Im posting this because it's some time ago and there might be an easier way of doing this(due to an update of csla ed).
http://forums.lhotka.net/forums/thread/16132.aspx
Thanks in advance.
Best Regards,
Laurens van der Donk
Yes, I recently posted about this on another thread. You can use the short-circuiting feature of the business rules subsystem in CSLA to do this. The basic steps are:
This will suppress all rules from running until the property in step 1 says they should run.
Then in your Save() method override, you'll to change the property in step 1, call ValidationRules.CheckRules() to check all the rules, and throw a ValidationException if the object isn't valid to prevent the user from creating an object with invalid data.
Hi Rocky,
This will help. Thanks a lot for your reply.
Laurens
Copyright (c) Marimer LLC