Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Business rules Not checking all rows
Message
De
20/12/2006 12:12:05
 
 
À
Tous
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Titre:
Business rules Not checking all rows
Divers
Thread ID:
01179257
Message ID:
01179257
Vues:
48
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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform