Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
CheckRules in 3.5
Message
From
05/06/2008 08:09:14
Timothy Bryan
Sharpline Consultants
Conroe, Texas, United States
 
 
To
03/06/2008 15:17:40
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Miscellaneous
Thread ID:
01321026
Message ID:
01321819
Views:
22
Hi Brian,

>I ran into the same thing.
>The Business Object Generator no longer adds the
>Public Overrides Function CheckRules(ByVal ds As System.Data.DataSet, ByVal tableName As String, ByVal useErrorProvider As Boolean) As OakLeaf.MM.Main.Business.mmSaveDataResult
>
>code instead it adds the entity centric version you mentioned.
>
>If you want to check the Rules via datasets just add the following
>
> Public Overrides Function CheckRules(ByVal ds As System.Data.DataSet, ByVal tableName As String, ByVal useErrorProvider As Boolean) As OakLeaf.MM.Main.Business.mmSaveDataResult
>
> If ds.Tables(tableName).Rows.Count > 0 Then
>
>            Me.CurrentRow = 0
>            For Each Row As DataRow In ds.Tables(tableName).Rows
>                If Row.RowState <> DataRowState.Unchanged And Row.RowState <> DataRowState.Deleted Then
>                    Dim Entity As New (YOUR ENTITY HERE)
>                    Entity.SetDataRow(ds.Tables(tableName).Rows(Me.CurrentRow))
>
>(Paste the valid code from the bo generater here example line follows )
> Me.ValidateDRQ_TaxpayerID(Entity.DRQ_TaxpayerID)
>
>                End If
>
>                Me.CurrentRow += 1
>            Next
>
>        End If
>        Return Me.ErrorProviderBrokenRuleCount = 0
>end function
>
I noticed the EntityCentric property but it looked like any code that might use it was commented out. Can you shed some light on what EntityCentric means? We have been able to use entities or dataSets without skipping the rule checking prior to 3.5.
Tim
Timothy Bryan
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform