Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Showing recent commited data of other user to me.
Message
De
08/02/2007 11:39:06
Mk Sharma
Shrishti Solutions
Mumbai, Inde
 
 
À
08/02/2007 10:50:02
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP
Network:
Windows XP
Database:
Visual FoxPro
Divers
Thread ID:
01193602
Message ID:
01193680
Vues:
18
this are the details.


i have 2 tables in dataenvironment

1. header
2. detail

header table have 2 fields "h1", "h2"
h1 c(10), h2 c(10)

header table have indexed on h1

detail table have 3 fields "h1", "d1", "d2"
h1 c(10), d1 c(10), d2 c(10)

detail table have indexed on h1

changes in form properties as below
form1.buffermode= 2 - optimistic
form1.datasession= 2 - Private Data Session
in form1.load event (as below)
SET EXACT OFF 
SET TALK OFF
SET MULTILOCKS ON
SET DELETED ON
in form1.active event
thisform.grid1.Refresh()
i make relation between header and detail in grid.
grid1.childorder= tagdetail
grid1.linkmaster= header
grid1.recordsource= detail
grid1.recordsourcetype= 1 - alias
grid1.relationalexpr= h1
i have 7 buttons :
"Add header"  "Add Grid Line "   "Next"    "Previous"   "Save"   "Revert"   "Exit"
in click event of "add header"
select HEADER
append blank
ThisForm.Edit1.Refresh()
ThisForm.Edit1.SetFocus()
in click event of "Add Grid Line "
SELECT DETAIL
APPEND BLANK
REPLACE DETAIL.H1 WITH ThisForm.Edit1.vALUE
thisform.grdDetail.Refresh()
ThisForm.Grid1.REFRESH()
ThisForm.Grid1.SETFOCUS()
ThisForm.Grid1.Column2.Text1.SETFOCUS()
SELECT HEADER
in click event of "Next "
select HEADER
IF NOT EOF()
   skip
ENDIF
ThisForm.Refresh()
in click event of "Previous "
select HEADER
IF NOT BOF()
   skip -1
ENDIF
ThisForm.Refresh()
in click event of "Save "
begin transaction
select HEADER
tableupdate(.t., .t.)
select DETAIL
tableupdate(.t., .t.)
end transaction
THISFORM.Refresh()
in click event of "Revert "
begin transaction
select HEADER
tablerevert(.t.)
select DETAIL
tablerevert(.t.)
end transaction
THISFORM.Refresh()
in click event of "Exit "
RELEASE THISFORM
this above is the complete setting and source of my form

warm regards,
mk.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform