Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Business Rules and Default Values don't work!?
Message
 
À
24/05/2005 00:49:04
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:
01017064
Vues:
25
>>you guessed right this.DefaultValues is an undefined value. Is that the same as null?
Where would I assign a value to this.DefaultValues OR am I testing the wrong thing?

Yes, undefined value is the same thing as null. I haven't used default values like that, you may want to check out if there's an example in the help. When I've set default values, it's something like this:
		protected override void HookSetDefaultValues(DataRow dataRow)
		{
			dataRow["Active"] = 1;
			dataRow["Information"] = string.Empty;
			dataRow["Sort"] = string.Empty;
			dataRow["LateMinutes"] = 0;
			dataRow["AlwaysActive"] = 0;
			dataRow["OutOfService"] = 0;
			dataRow["ModifyBy"] = (int) mmAppBase.UserMgr.UserPK;
			dataRow["CreateBy"] = (int) mmAppBase.UserMgr.UserPK;
		}
>>Yes the CheckForDuplicateICDACode code gets executed...
So your rule is getting checked, but it's not "being reported", right?

>>what is the line of code in the Jump Start that saves the business object?

This is what you need to investigate. Totally guessing, but if your rule is getting checked, and you're not getting your broken rules "reported", your probably using something like businessObject.Save(). Note that the save will return a mmSaveDataResult object. Inspect this and see if it's "RulesBroken", "RulesPassed" etc. The mmSaveDataResult enumeration is documented, I think, if not, check out the MM code.

If you want to be shown broken rules automatically, use the mmBusinessForm.Save() method - again check out the help for the difference.

HTH,
Mike
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform