Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
CheckRules in 3.5
Message
De
03/06/2008 15:17:40
 
 
À
02/06/2008 14:33:47
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Divers
Thread ID:
01321026
Message ID:
01321393
Vues:
20
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform