当前位置: 代码迷 >> VFP >> 求大神啊小弟我在COMMAND中CLICK写入后提示不能嵌套
  详细解决方案

求大神啊小弟我在COMMAND中CLICK写入后提示不能嵌套

热度:3174   发布时间:2013-02-26 00:00:00.0
求大神啊,我在COMMAND中CLICK写入后提示不能嵌套
IMPORT FROM &cGetFileName XLS
copy to 123.dbf


SET TALK OFF
close all
CLEAR
SELE 1
use gsbx
SELE 2
USE 123.dbf
ALTER TABLE 123.dbf ALTER shbzh c(20) ALTER xm c(8) ALTER sssj c(10) &&ALTER sfzh c(20)
ALTER TABLE 123.dbf add column jf_nd c(10) add column tb_sj c(10) add column hf_sj c(10) add column hf_sj07 c(10) add column tb_sj07 c(10) add column hf_sj08 c(10) add column tb_sj08 c(10) add column hf_sj09 c(10) add column tb_sj09 c(10)
ALTER TABLE 123.dbf add column BZ c(16)add column zjm c(4)add column dw_dm c(9) add column sfzh c(20)
ALTER TABLE 123.dbf add column base04 N(6,0)add column base05 N(6,0)add column base06 N(6,0)add column base07 N(6,0)add column base08 N(6,0)add column base09 N(6,0)add column gzjs c(10)

repl zjm with UPPER(GetPYL(allt(xm)))all&&ZJM返回汉字的拼音首字母

*repl dw_dm with '000001101' all&&ZJM返回汉字的拼音首字母


&&*repl zjm with GetPYL(xm,'') &&ZJM返回汉字的拼音首字母

*Function GetPYL
*Parameters mtext,ms
*Declare Long GetPinYinLeader In "pinyin.dll" String ,String
*ss=Space(200)
*GetPinYinLeader(@ss,mtext)
*Return ss
*Endfunc
SELE 2

*use 123.dbf
*olecontrol1.max=recc()
*olecontrol1.min=1

*scan

*olecontrol1.value=recn()
*endscan

GO 1

DO WHILE !EOF()

*?recno()&&可利用
a=SHBZH
C=zjm

SELE 1
loca for shbzh=a
IF FOUND()
IF zjm=c
E=JF_ND
f=ztbz
g=tb_sj
H=HF_SJ
K=tb_sj07
L=hf_sj07
m=tb_sj08
n=hf_sj08
o=tb_sj09
q=hf_sj09
x1=base04
x2=base05
x3=base06
x4=base07
x5=base08
x6=base09
x7=sfzh
SELE 2
repl jf_nd with e,tb_sj with g,HF_SJ WITH h &&ztbz with f,
repl tb_sj07 with k,hf_sj07 with L,tb_sj08 with m,HF_SJ08 WITH n
repl tb_sj09 with o,hf_sj09 with q ,base04 with x1
repl base05 with x2,base06 with x3,base07 with x4,base08 with x5,base09 with x6
repl sfzh with x7
ELSE
SELE 2
REPLACE BZ WITH '请查证姓名'
ENDIF
ELSE
SELE 2
REPLACE BZ WITH '请查证社保号'
ENDIF

sele 2
IF !empty(jf_nd)

P=val(jf_nd)
R=Val(tb_sj)
s=val(hf_sj)
t=Val(tb_sj07)
u=val(hf_sj07)
v=Val(tb_sj08)
w=val(hf_sj08)
x=Val(tb_sj09)
z=val(hf_sj09)
Y=val(sssj)
if y<p
repl bz with '不合格'
ENDIF
if r<y and y<s
repl bz with '不合格'
ENDIF
if t<y and y<u
repl bz with '不合格'
ENDIF
if v<y and y<w
repl bz with '不合格'
ENDIF
if x<y and y<z
repl bz with '不合格'
ENDIF

if !empty(tb_sj) and r<y and empty(hf_sj)
repl bz with '不合格'
ENDIF

if !empty(tb_sj07) and t<y AND empty(hf_sj07) 
repl bz with '不合格'
ENDIF
if !empty(tb_sj08) and v<y AND empty(hf_sj08) 
repl bz with '不合格'
ENDIF
if !empty(tb_sj09) and x<y AND empty(hf_sj09) 
repl bz with '不合格'
ENDIF

endif

SELE 2
SKIP
ENDDO





SELE 2
*if optiongroup1.option1.value=0

*use 123.dbf
*olecontrol1.max=recc()
*olecontrol1.min=1

*scan

*olecontrol1.value=recn()
*endscan











go 1
do while .not.eof()

z1=val(substr(allt(sssj),3,2))
z2=val(substr(allt(sssj),5,2))
ZHYF1=z1*12+z2

Z3=val(substr(allt(jf_nd),3,2))
z4=val(substr(allt(jf_nd),5,2))
ZHYF2=Z3*12+Z4


CBYF1=zhyf1-zhyf2



y1=VAL(SUBSTR(allt(tb_sj),3,2))
y2=VAL(SUBSTR(allt(tb_sj),5,2))
ttyf=y1*12+y2

y3=val(substr(allt(hf_sj),3,2))
y4=val(substr(allt(hf_sj),5,2))
hhyf=y3*12+y4

y5=val(substr(allt(tb_sj07),3,2))
y6=val(substr(allt(tb_sj07),5,2))
  相关解决方案