Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Apply Business Rules to imported file records
Message
From
09/01/2012 15:00:40
Timothy Bryan
Sharpline Consultants
Conroe, Texas, United States
 
 
To
09/01/2012 14:51:11
Kathy Schmidt
Michigan Health and Hospital Association
Michigan, United States
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Environment versions
Environment:
C# 3.0
OS:
Windows 7
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01532556
Message ID:
01532557
Views:
49
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform