Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Rules for non-entity fields
Message
 
À
17/03/2011 15:47:41
Kathy Schmidt
Michigan Health and Hospital Association
Michigan, États-Unis
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Divers
Thread ID:
01504011
Message ID:
01504409
Vues:
54
>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.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform