Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
CheckRules Not reporting failed rules
Message
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Miscellaneous
Thread ID:
01443788
Message ID:
01444021
Views:
42
Kevin,
No it still doesnt make sense. The problem doesnt appear to be in my checkrules code. If you go through the MM code I sent you will find
that the checkrules hook is returning a boolean value ( thats the return value added by the BO gen. ). Now look at the MM checkrules code I sent. Its storing that returned boolean in Result. Result is a mmSaveDataResult. so when a rule fails the mmcheckrules code gets a 0 back
In mmSaveDataResult rules broken is 1 not 0. Nothing in checkrules ever checks the actual error provider or the broken rule count.
It checks the return result from the checkrules hook

Now if i remark out the generated code "Return Me.ErrorProviderBrokenRuleCount = 0"
in CheckRules(ByVal ds As System.Data.DataSet, ByVal tableName As String, ByVal useErrorProvider As Boolean) and add something like this
If Me.HasBrokenRules Then
      Return mmSaveDataResult.RulesBroken
 Else
      Return mmSaveDataResult.RulesPassed
End If
and change the return type to mmsavedataresult

then when the rule is broken checkrules sees that its broken and passes this on to mmbusinessform
I can make this change to all the business rules but I dont know if its going to cause any other problems.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform