ls_xkzh = replace(ls_xkzh,i,1,char(asc(mid(ls_xkzh,i,1)) - j - 16))
next
ll = long(left(ls_xkzh,10))
if right(ls_xkzh,6) <> right(string(ll / 23 - gl_mc),6) or mod(ll,gl_mc) <> 0 or len(ls_xkzh) <> 16 or isnull(ls_xkzh) then
messagebox("","非法许可证号!")
parent.ii_serial_times ++
if parent.ii_serial_times > 3 then
halt
end if
return
end if
ls_xkzh = parent.sle_1.text
if len(ls_xkzh) <> 16 then
return
end if
update syst02 set xkzh =' ' using sqlca;
/* SQL Parameters List
0-> :ls_xkzh
*/
close(parent)
return
for i = 1 to 16
循环开始,如果I的值小于5,J=I*3
if i < 5 then
j = i * 3
end if
I大于15,J=J-15
if j > 15 then
j = j - 5
end if
replace内容替换,具体的,网上查一下就知道了,
mid取ls_xkzh的第I位和1位。
ls_xkzh = replace(ls_xkzh,i,1,char(asc(mid(ls_xkzh,i,1)) - j - 16))
next
left取lx_xkzh左十位,ll等于结果转换为long
ll = long(left(ls_xkzh,10))
right取右,
if right(ls_xkzh,6) <> right(string(ll / 23 - gl_mc),6) or mod(ll,gl_mc) <> 0 or len(ls_xkzh) <> 16 or isnull(ls_xkzh) then
messagebox("","非法许可证号!")
parent.ii_serial_times ++
if parent.ii_serial_times > 3 then
halt
end if
return
end if
ls_xkzh = parent.sle_1.text
if len(ls_xkzh) <> 16 then
return
end if
update syst02 set xkzh =' ' using sqlca;
/* SQL Parameters List
0-> :ls_xkzh
*/
close(parent)
return