Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Apply Business Rules to imported file records
Message
De
09/01/2012 15:00:40
Timothy Bryan
Sharpline Consultants
Conroe, Texas, États-Unis
 
 
À
09/01/2012 14:51:11
Kathy Schmidt
Michigan Health and Hospital Association
Michigan, États-Unis
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Versions des environnements
Environment:
C# 3.0
OS:
Windows 7
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01532556
Message ID:
01532557
Vues:
50
>To supplement our current web based manual data collection form, I am generating a process within our website that will allow my client to import their records instead of hand entering each record. I have the core process mostly done. I can access the import file, read the records and save them. But, I need to be able to validate the records. I want to check the business rules for each record without having to save the record (as I will save all of the records at the end if all of the records process without error). How do I trigger the rules without a save? Then, how do I access the errors that are generated. I am using MM .NET Classic Entity objects. My experience is limited having worked mostly maintaining currently existing processes.
>
>Any examples would be greatly appreciated as that is the way that I learn the best.

You can access the Rules object via a property on the specific businss object. Then call the CheckRulesHook method passing in the BindingList of entities you want to check. You can access the broken rules by calling a method on the Rules object also I think it was something like GetAllBrokenRules(). This will return any broken rules.
Timothy Bryan
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform