“编辑”按钮
public ccode
if (.not.eof()).and.(.not.bof())
ccode=custom.客户编号
do form frm_custom
endif
“删除”按钮
delete
ccode=""
thisform.refresh
“客户服务”按钮
local bExist
bExist=.f.
thisform.hide
for i=1 to _screen.formcount
if _screen.forms[i].caption="客户服务"
_screen.forms[i].show
bExist=.t.
endif
endfor
if .not. bExist
do form frm_amcustom
endif
“保存”按钮代码:
=tableupdate(.t.)
this.enabled=.f.
this.parent.cmdcancel.enabled=.f.
this.parent.command4.enabled=.t.
thisform.refresh
“放弃”按钮代码
=tablerevert(.t.)
this.enabled=.f.
this.parent.cmdsave.enabled=.f.
this.parent.command4.enabled=.t.
thisform.refresh
“表单”初始化代码
set multilocks on
=cursorsetprop("buffering",5)
“表单”激活代码
if len(ccode)=0
append blank
else
locat for allt(客户编号)=allt(ccode)
endif
this.cmdsave.enabled=.f.
this.cmdcancel.enabled=.f.
this.cmdsave.enabled=.t.
this.cmdcancel.enabled=.t.
this.command4.enabled=.f.
thisform.refresh
3.客户服务模块设计
主要代码如下:
“设定提醒时间”代码
public pcode
if (.not.eof()).and.(.not.bof())
pcode=custom.合同编号
if len(pcode)>0
do form frm_setalarm
endif
endif
“编辑服务记录”代码
public sccode
if (.not.eof()).and.(.not.bof())
sccode=custom.客户编号
if len(sccode)>0
do form frm_setservice
endif
endif
“客户管理”代码
local bExist
bExist=.f.
thisform.hide
for i=1 to _screen.formcount
if _screen.forms[i].caption="客户管理"
_screen.forms[i].show
bExist=.t.
endif
endfor
if .not. bExist
do form frm_mcustom
上一页 [1] [2] [3] [4] [5] [6] [7] [8] [9] 下一页