Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Business Rules
Message
 
À
17/03/2004 16:19:36
Jason Mesches
Ocean Systems Engineering Corporation
Carlsbad, Californie, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
The Mere Mortals Framework
Titre:
Divers
Thread ID:
00887232
Message ID:
00887460
Vues:
14
Thanks Jason. Look what I did in the Click method of the "OK" button.
LOCAL	loBizRules, llRetVal, lnRetVal

loBizRules = ThisForm.oBizObj.oBizRules

llRetVal = loBizRules.CheckRules()

IF .NOT. llRetVal

	This.Parent.txlProjectName.TextBox.SetFocus()

ENDIF

lnRetVal = DODEFAULT()

RETURN (lnRetVal)
>Jose,
>
>There's nothing customized that will do this for you. You can call directly to the rules oject from the control's Valid() method and display messages if they've left something empty. This way they don't have to wait until they save to find out they've missed something.
>
>
>*This is in your control's Valid()
>LOCAL loRule, llRetVal
>
>loRule = YourBizObj.oBizRules
>llRetVal = loRule.IsFieldPopulated()
>IF !llRetVal
>   MESSAGEBOX(loRule.GetBrokenRule(1))
>   llRetVal = .F.
>ENDIF
>
>RETURN llRetVal
>
>
>Hope that helps,
>---J
>
>>Hi, I was using framework version 4.1 and now I´m starting to learn version 7.1. In 4.1 if I wanted a field to be a "Must Key" I needed to set lMustKey Property. Now I need to use Business Rules. The problem is that in 4.1 when the user left the field empty the Focus was automatically set to the empty filed. Is there any way to have the same behaviour in 7.1?
>>
>>P.S.: I´m sorry for my English.
>>
>>Regards,
José Augusto Cavalcanti
Global Connection
jose.cavalcanti@globalconnection.com.br
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform