Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
3-tier programming, Codebook, and business classes
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00083772
Message ID:
00085085
Vues:
40
>> I guess this is where I get a little confused. How exactly is the data passed from the business object to the controls? A cursor reference to the data you retrieved through the business object?
>
>Paul,
>
>The business object ahs a getfielddata method that accepts a field name and returns the field's value. The RefreshData method fo the form or container or whatever does;
>
> THIS.Text1.Value = THIS.oBuzObj.GetFieldData("Customer.Name")
> THIS.Text2.Value = THIS.oBusObj.GetFieldData("Customer.CreditLimit")
>
>The writeData method of the form et al;
>
> THIS.oBusObj.WriteFieldData("Customer.Name",THIS.Text1.Value)
> THIS.oBusObj.WriteFieldData("Customer.CreditLimit",THIS.Text2.Value)
>
>The the save method of the form does;
>
> IF NOT THIS.oBusObj.SaveData()
> Messagebox("Sorry the update failed",0,"Update Failure")
> ENDIF
>
>The form has no tables or views open, mainly because I can't depend that any frontend might be capable of using tables or views, but they can all call a method of the busobj and get the return value back.

This particular approach seems like it would be a lot of work. You actually hardcode the mappings between your controls and your business object in your RefreshData method?

Michael G. Emmons
memmons@nc.rr.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform