O
OctavioOlguin
Guest
(newbie at oo) I created a class to manage chores of handling a Master-Detail relationship for an invoice(s) document. So, created include file with dataset that is "equal" to real data-table on db to handle data creation inside class. Then used that same include on .w with browse,and fields for getting data from user, accesory tables and then validating etc. the usual stuff as I can imagine... So I finished with "ttMaster" and "ttDetail" on window side, just about to send to object, which in turn has methods to accept data to create ttMaster and ttDetail inside and the flush to db. That didn't seemed too natural for me at this point, as I have the same tables that the class will be creating by means of methods exposed on that class. In fact, on user side, data was filled on that tt's as the class will be used by a "proxy" procedure on app server. So will be sending dataset to create_invoice.p on hServer (the proxy), wich in turn will instantiate that class just to call methods to create ttMaster and ttDetail, doing something like: oMaster:CREATE_NEW(ttMaster.Datex, ttMaster.Customer, .etc.) // same for detail... and method will receive paramters, just to: CREATE (another)ttMaster. ASSIGN Datex = paramDatex Customer = paramCustomer .etc. after all that... SAVE_Method(): CREATE database.Master. ASSIGN Master.Datex = (another)ttMaster.Datex..... I really hope I had explained correctly so I can transmit my confussion.. (jajaja) What is the correct way of doing this?
Continue reading...
Continue reading...