Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Rules for non-entity fields
Message
 
To
17/03/2011 15:47:41
Kathy Schmidt
Michigan Health and Hospital Association
Michigan, United States
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Miscellaneous
Thread ID:
01504011
Message ID:
01504409
Views:
55
>I need to perform validation for a field in an entity (DBFieldMinutes) but I need to have the error message associated with a different field on the ASP form (ASPFieldDateTime). I do not want a record saved if the rule is broken. Is there a way to do this? (please note, I am a novice using mere mortals).
>
>
>MereMortals version 3.5
If the other field on the ASP form is bound to a data object and I understand the question, when you run the validation in your Rules business object, when you add the broken rule, specify the column with which you want the error associated. It would look something like this:
if (DBFieldMinutes == someValue)
{
        Msg = "Rule was broken.";
        AddErrorProviderBrokenRule(DBFieldDateTime, Msg);
}
If the field on the ASP form is not data bound, you will probably have to use the validation for the control bound to DBFieldMinutes and show a message box.
Linda Harmes
HiBit Technologies, Inc.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform