Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Business rules Not checking all rows
Message
From
20/12/2006 12:12:05
 
 
To
All
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Title:
Business rules Not checking all rows
Miscellaneous
Thread ID:
01179257
Message ID:
01179257
Views:
47
I’m filling a bo (oExportDetail) with records for several sources then I’m trying to get it to run the business rules on the records by firing its save action. I expected it to run the rules on all the records but it appears to stop at the first record to break a rule.
Is there a way to have it check all the rows?

The basic idea here was to
1. fill the table
2. check that all the rows pass the rules
3. message the user with all broken rules


Populate oExport_Detail with 800 records (4 of which have broken rules)
  Me.oExport_Detail.SaveDataSet()
If Me.oExport_Detail.Rules.HasBrokenRules = True Then
                ds = oExport_Detail.GetCurrentDataSet()
                ' strDLN = Me.oExport_Detail.Rules.GetAllBrokenRules()
    For IndexBrokenRule = 0 To _ Me.oExport_Detail.Rules.ErrorProviderBrokenRuleCount - 1
                    orule=Me.oExport_Detail.Rules.GetErrorProviderRule(IndexBrokenRule)
                    strDLN = ds.Tables(0).Rows(orule.Row).Item("DLN")
                    strDLN = strDLN.Substring(6)
                    myBrokenRules.Add(New ExportBrokenRulesEventArgs(strDLN, orule.ErrorText))
                Next
Next
Reply
Map
View

Click here to load this message in the networking platform