VF家政服务管理系统(论文+源程序+答辩PPT) 第6页

VF家政服务管理系统(论文+源程序+答辩PPT) 第6页
“编辑”按钮代码
 this.parent.cmdsave.enabled=.t.
this.parent.cmdcancel.enabled=.t.
this.parent.command4.enabled=.f.
this.parent.command2.enabled=.f.
this.parent.command1.enabled=.f.
this.parent.command3.enabled=.f.
thisform.combo1.value=员工编号
thisform.combo2.value=员工姓名
ls=dtoc(服务日期)
ds=""
lts=""
for i=1 to len(ls)
  if SUBSTR(ls,i,1)="/"
  if len(ds)<2
  ds=REPLCATE("0",2-len(ds))+ds
  endif
  lts=lts+ds
  ds=""
  else
  ds=ds+SUBSTR(ls,i,1)
  endif
endfor

if len(ds)<2
  ds=REPLCATE("0",2-len(ds))+ds
  endif
  lts=lts+ds

thisform.txt服务日期.value=lts

thisform.refresh

“保存”按钮代码
if  len(allt(thisform.combo1.value))>0 .and.len(allt(thisform.combo2.value))>0.and.len(allt(thisform.txt服务日期.value))>=6
 c=thisform.txt服务日期.value
 ld=ctod(subs(c,1,2)+"/"+subs(c,3,2)+"/"+subs(c,5,4))
 if ld>=thisform.txt生效日期.value.and.ld<=thisform.txt终止日期.value
 replace 员工编号 with allt(thisform.combo1.value),员工姓名 with allt(thisform.combo2.value),服务日期 with ld
 replace 客户编号 with allt(custom.客户编号)
 =tableupdate(.t.)
this.enabled=.f.
this.parent.cmdcancel.enabled=.f.
this.parent.command4.enabled=.t.
this.parent.command1.enabled=.t.
this.parent.command2.enabled=.t.
this.parent.command3.enabled=.t.
thisform.refresh
else
 cMessageTitle="系统提示"
 cMessageText="日期无效"
 nDialogType=0+32
 nanswer=MESSAGEBOX(cMessageText,nDialogType,cMessageTitle)
 thisform.txt服务日期.setfocus
endif
else
cMessageTitle="系统提示"
cMessageText="信息输入不完整"
nDialogType=0+32
nanswer=MESSAGEBOX(cMessageText,nDialogType,cMessageTitle)
 thisform.txt服务日期.setfocus
endif
“放弃”按钮代码
=tablerevert(.t.)
this.enabled=.f.
this.parent.cmdsave.enabled=.f.
this.parent.command4.enabled=.t.
this.parent.command1.enabled=.t.
this.parent.command2.enabled=.t.
this.parent.command3.enabled=.t.
 thisform.combo1.value=""
 thisform.combo2.value=""
 thisform.txt服务日期.value=""
thisform.refresh
“新增”按钮代码
append blank
this.parent.cmdsave.enabled=.t.
this.parent.cmdcancel.enabled=.t.
this.parent.command4.enabled=.f.
this.parent.command2.enabled=.f.
this.parent.command1.enabled=.f.
thisform.txt开始服务时间.value=dtoc(date())+" "+time()
thisform.txt结束服务时间.value=dtoc(date())+" "+time()
thisform.refresh
thisform.txt开始服务时间.setfocus
“编辑”按钮代码
this.parent.cmdsave.enabled=.t.
this.parent.cmdcancel.enabled=.t.

上一页  [1] [2] [3] [4] [5] [6] [7] [8] [9] 下一页

Copyright © 2007-2012 www.chuibin.com 六维论文网 版权所有