Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Business Rules and Default Values don't work!?
Message
De
25/05/2005 01:25:41
Dave Porter
Medical Systematics, Inc.
Merced, Californie, États-Unis
 
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Divers
Thread ID:
01016948
Message ID:
01017376
Vues:
16
>>>What I need is a 'before save' check, because now I'm getting an
>Application Exception Occured!
>Column 'ICDACode' is constrained to be unique. Value '8888' is already present.
>
>There is a HookPreSave method you can override, but you may just want to make it a >rule.

I'm trying to make it a rule...

>The reason I asked *how* are you calling the save is because if you call this.Save on >a mmBusinessForm, the broken rules dialog (or the error providers, if you choose that >method) will be shown to you automatically. If you're saving like myBizObj.Save(), >then the rules are not automatically reported to you, but the mmSaveDataResult will >be "RulesBroken".
As far as I can tell, the mmButtonSave 'Save' button is what I'm using to save the record, because I am not explicitly calling a save. So perhaps I should not use that (because it does not check for broken rules?) and make my own button or do the HookPreSave method.
>you should check the result of the save operation and take appropriate action.
The result of the save operation is "Application Exception Occured!" ;-)
There is probably a way to catch this Application Exception and recover from the error.

Thanks again Dave
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform