VF如何设计表单

2024-12-23 01:32:51
推荐回答(2个)
回答1:

SELECT authdbf
LOCAL cname
cname=thisform.text1.Value
cpsd=thisform.text2.Value
IF EMPTY(cname).or.empty(cpsd)
MESSAGEBOX("用户名或密码不能为空,请重新输入",48,"系统提示")
thisform.text1.Value=""
thisform.text2.Value=""
thisform.text2.SetFocus
ELSE
go top
LOCATE for ALLTRIM(cname)=ALLTRIM(name)
SET EXACT ON
IF !FOUND()
MESSAGEBOX("用户不存在",46,"系统提示")
thisform.text1.Value=""
thisform.text2.Value=""
thisform.text2.SetFocus
ELSE
IF ALLTRIM(authdbf.psd)!=cpsd
cn=cn+1
nanswer=MESSAGEBOX("密码不正确,继续输入或退出?",4+32,"系统提示")
do case
CASE nanswer=6
thisform.text1.Value=""
thisform.text2.value=""
CASE nanswer=7
CLEAR EVENTS
QUIT
ENDCASE
thisform.text2.setfocus
IF cn=3
MESSAGEBOX("密码输入超过规定次数",48,"系统提示")
QUIT
ENDIF
ELSE
crealname=ALLTRIM(realname)
SELECT history
APPEND BLANK
replace history.hname with ALLTRIM(cname)
replace history.hlogintime with DATETIME()
replace history.hrealname with crealname
SELECT authdbf
do case
CASE authtype="管理员" &&&authno为权限表权限标记
auth=1
CASE authtype="业务员"
auth=2
ENDCASE
_screen.Visible= .T.
_screen.Left=0
_screen.Top=0
_screen.windowstate=2
thisform.Release
ENDIF
ENDIF
ENDIF

仅供参考
我没用SQL语句

回答2:

进入VF环境,在文档中的表单项新建就可以了。