Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to pass value of parameters from UI to BIZ to DA
Message
De
19/01/2008 14:02:16
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 9 SP1
Divers
Thread ID:
01283283
Message ID:
01283299
Vues:
19
>>>I am working on a 3-tier framework. UI (VFP form), BIZ, and DA will have bunch of properties of the same name. E.g. TABLE_NAME.
>>>
>>>The value of a property will be set in the UI tier (property of VFP) form. E.g. property TABLE_NAME will have value "MYTABLE".
>>>
>>>When UI form is instantiated I need to make sure that BIZ and DA properties of the same name get the same values.
>>>
>>>The way I instantiate tiers is as following:
>>>
>>>INIT method of UI form instantiates BIZ class (and references to a property of UI form).
>>>INIT method of BIZ class instantiates DA class (and references to a property of a BIZ class).
>>>
>>>I can set properties of BIZ class in the INIT of the UI form. But if I set properties of DA class in the INIT of BIZ class it will be too late.
>>>
>>>I am looking for suggestions, please.
>>>
>>>Thank you.
>>
>>Dmitry,
>>Not sure I understood completely but check form.BindControls property anyway.
>>Cetin
>
>Cetin,
>
>I know about the .BindControls property but this has nothing to do with it. Let me explain my problem differently.
>
>The only way I see passing the values of from UI to BIZ to DA is by passing them as parameters when instantiating BIZ class and respectively DA class. But the number of this properties/parameters would be too many and kludgy. So I am looking for a better way.
>
>Thank you for your suggestion.

You don't need to pass anything. When it's instantiating it could simply check if UI has properties with the same names as its properties and set them. As I undertstand from your first message:
UI.Table_Name would be BIZ.Table_Name and/or da.Table_name.

IOW all you need is a amembers() loop.

Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform