Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
N-Tier Design Question
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00753308
Message ID:
00753690
Vues:
26
Kevin,

A couple of flaws I see in your design. Why is the form storing a dataset when that is the business object's job? Let the form hold a reference to the business object.

Secondly, why does the textbox have any idea how the business object is holding its data? The business object should expose an interface that the textbox uses to get to data. That interface can be protected by the business object even when the business object changes its data source.
* Form's Load
This.oBiz = Createobject("BizCustomer")
* Textbox Init
This.Value = Thisform.oBiz.GetField("Name")
* Textbox Valid
IF NOT Thisform.oBiz.PutField("Name",This.Value)
   Wait window Thisform.oBiz.GetLastError()
   RETURN 0
ENDIF
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform