Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
CheckRules in 3.5
Message
From
02/06/2008 13:30:46
Timothy Bryan
Sharpline Consultants
Conroe, Texas, United States
 
 
To
02/06/2008 11:50:11
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Miscellaneous
Thread ID:
01321026
Message ID:
01321072
Views:
20
Hi Al,

>
>It used to check my business rules in 2.4 by using the following:
>
>mmSaveDataResult rulesResult = this.oOddDaysRequest.Rules.CheckRules(oOddDaysRequest.DataSet, oOddDaysRequest.TableName, true);
>
>For some reason this no longer works in 3.5. The method exists and I don’t get a compile error, but it appears the CheckRulesHook has changed from
>
>public override bool CheckRulesHook(DataSet ds, string tableName)
>
>to
>
>public override bool CheckRulesHook(mmBindingList entityList)
>
>I’m not that familiar with the entity type parameters, but I got this to work by using the following:
>
>oOddDaysRequest.CreateEntityList();
>
>mmSaveDataResult rulesResult = this.oOddDaysRequest.Rules.CheckRules(oOddDaysRequest.EntityList);
>
>Is this the correct syntax?
>
>Is the DataSet appraoch supposed to still work?
>
>Is this a move away from DataSets and towards entities?
>
>Thanks,
>
I don't have an answer to your specific question as I havn't looked specifically at that code change. However the developers guide section "Saving DataSets using Business Objects" under Data Access with MM.NET indicates the same method would be called when you use method SaveDataSet. That would lead me to believe it is still supposed to work. Have you stepped through this code to see if he is also creating the EntityList first?
Tim
Timothy Bryan
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform