Mensaje
De
05/06/2008 08:09:14
Timothy Bryan
Sharpline Consultants
Conroe, Texas, United States
 
 
General information
Foro:
ASP.NET
Category:
The Mere Mortals .NET Framework
Título:
Miscellaneous
ID de la conversación:
01321026
ID del mensaje:
01321819
Views:
24
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
Responder
Mapa
Ver