Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
CBizObjNoListMAintForm... Long question...
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
The Mere Mortals Framework
Divers
Thread ID:
00128181
Message ID:
00128263
Vues:
16
BOb,

1. If all you really need from the v_eePerson view is the unique ID and the name, you could add code to your Find Form's cmdSelect.Click() method, and save the name in a property of the calling form. If you take this approach--and if I understand your scenario correctly--you don't really need a bizPerson object on the form.

CFindForm saves the unique value of the selected record in the calling form's cFindUniqueID property and is automatically saved in the view parameter you have specified in the calling form's cPrimaryViewParameter property.

2. Regarding changing the form caption based on the current Person, you probably want to display the person's name AND the current hrEducation record. You can accomplish this by placing code something like this in your primary business object's GetBizObjDesc() method:

RETURN ALLTR(ThisForm.cEmployeeName + ' - ' + DODEFAULT())

3. By default, CBizObjNoListMaintForm creates a new record if there are no records in the primary business object's InitialSelectedAlias. I posted some code for a fellow MM developer a few week backs that allows you to modify this default behavior. Here's the change:

CBizObjNoListMaintForm
Make the following changes to this form to make the “automatic new record” feature optional under the following conditions:
* When the form is first activated
* After the Cancel button is selected
* After the Save button is selected

a. CBizObjNoListMaintForm.lAutoNewRecord()
Added this new property (Default = .T.)

b. CBizObjNoListMaintForm.cmdSave.Click()
Changed…
ThisForm.New()
To…
IF ThisForm.lAutoNewRecord
ThisForm.New()
ENDIF

c. CBizObjNoListMaintform.cmdCancel.Click()
Changed…
IF ThisForm.lAutoNewRecord
ThisForm.New()
ENDIF
To…
IF ThisForm.lAutoNewRecord
ThisForm.New()
ENDIF

Obviously, you'll need to set the lAutoNewRecord flag to FALSE in this case. In addition, I believe you'll also want to set the PageFrame's lAutoNewRecordOnPage1 and lUIEnablerNewRecord properties to FALSE.

I'm making similar changes that will be compatible with this in the next version of the Framework, so you won't lose *your* changes!

Regards,
Kevin McNeish
Eight-Time .NET MVP
VFP and iOS Author, Speaker & Trainer
Oak Leaf Enterprises, Inc.
Chief Architect, MM Framework
http://www.oakleafsd.com
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform