Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
CheckRules in 3.5
Message
From
03/06/2008 15:17:40
 
 
To
02/06/2008 14:33:47
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Miscellaneous
Thread ID:
01321026
Message ID:
01321393
Views:
19
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform