📄 pass1.prg
字号:
**************************************************
*-- 类: pass1 (e:\sf1\user.vcx)
*-- 父类: form
*-- 基类: form
*
DEFINE CLASS pass1 AS form
Height = 442
Width = 582
DoCreate = .T.
AutoCenter = .T.
Caption = "Form1"
TitleBar = 0
Name = "Form1"
ADD OBJECT container1 AS container WITH ;
Top = 48, ;
Left = 48, ;
Width = 432, ;
Height = 133, ;
SpecialEffect = 1, ;
TabIndex = 4, ;
ForeColor = RGB(192,192,192), ;
BackColor = RGB(156,226,193), ;
Name = "Container1"
ADD OBJECT pass1.container1.container1 AS container WITH ;
Top = 24, ;
Left = 36, ;
Width = 365, ;
Height = 85, ;
SpecialEffect = 0, ;
BackColor = RGB(255,255,255), ;
Name = "Container1"
ADD OBJECT pass1.container1.container1.label1 AS label WITH ;
AutoSize = .T., ;
FontBold = .T., ;
FontName = "楷体_GB2312", ;
FontSize = 28, ;
BackStyle = 0, ;
Caption = "路桥收费管理系统", ;
Height = 44, ;
Left = 25, ;
Top = 24, ;
Width = 315, ;
ForeColor = RGB(255,0,0), ;
Name = "Label1"
ADD OBJECT label1 AS label WITH ;
AutoSize = .T., ;
FontBold = .T., ;
FontSize = 16, ;
Caption = "用户编号:", ;
Height = 26, ;
Left = 126, ;
Top = 204, ;
Width = 103, ;
TabIndex = 5, ;
ForeColor = RGB(0,0,255), ;
Name = "Label1"
ADD OBJECT label2 AS label WITH ;
AutoSize = .T., ;
FontBold = .T., ;
FontSize = 16, ;
Caption = "密 码:", ;
Height = 26, ;
Left = 147, ;
Top = 240, ;
Width = 83, ;
TabIndex = 6, ;
ForeColor = RGB(0,0,255), ;
Name = "Label2"
ADD OBJECT text1 AS textbox WITH ;
FontSize = 11, ;
Height = 25, ;
Left = 232, ;
TabIndex = 1, ;
Top = 204, ;
Width = 121, ;
Name = "Text1"
ADD OBJECT text2 AS textbox WITH ;
FontSize = 11, ;
Height = 25, ;
Left = 232, ;
TabIndex = 2, ;
Top = 238, ;
Width = 121, ;
PasswordChar = "*", ;
Name = "Text2"
ADD OBJECT command1 AS commandbutton WITH ;
Top = 330, ;
Left = 139, ;
Height = 38, ;
Width = 75, ;
FontBold = .T., ;
FontName = "楷体_GB2312", ;
FontSize = 20, ;
Caption = "确定", ;
TabIndex = 7, ;
ForeColor = RGB(255,0,0), ;
Name = "Command1"
ADD OBJECT command2 AS commandbutton WITH ;
Top = 331, ;
Left = 304, ;
Height = 38, ;
Width = 75, ;
FontBold = .T., ;
FontName = "楷体_GB2312", ;
FontSize = 20, ;
Caption = "取消", ;
TabIndex = 8, ;
ForeColor = RGB(255,0,0), ;
Name = "Command2"
ADD OBJECT label3 AS label WITH ;
AutoSize = .T., ;
FontBold = .T., ;
FontSize = 14, ;
Caption = "站 台:", ;
Height = 24, ;
Left = 147, ;
Top = 279, ;
Width = 76, ;
TabIndex = 9, ;
ForeColor = RGB(0,0,255), ;
Name = "Label3"
ADD OBJECT text3 AS textbox WITH ;
FontSize = 11, ;
Alignment = 3, ;
Value = "", ;
Format = "", ;
Height = 25, ;
InputMask = "", ;
Left = 231, ;
TabIndex = 3, ;
Top = 275, ;
Width = 35, ;
Name = "Text3"
PROCEDURE Init
public n,opno,zd,compdate
n=1
ENDPROC
PROCEDURE Destroy
clear event
ENDPROC
PROCEDURE command1.Click
if (n>2)
=messagebox("口令三次输入错误,不能使用本系统",48,"信息提示")
thisform.release
else
select oper
locate for alltrim(op)==alltrim(thisform.text1.value) and alltrim(pwd)==alltrim(thisform.text2.value)
if found()
if !alltrim(jb)="操作员"
=messagebox("你不是操作员,不能使用本系统",48,"信息提示")
thisform.release
else
zd=thisform.text3.value
opno=thisform.text1.value
compdate=date()
curtime=val(subs(time(),1,2))
if curtime=22 or curtime=23 or curtime=0 or curtime=1
if messagebox("现在是两天之间的交接班时间,是否进行日交接班",48+4,"信息提示")=6
if curtime=22 or curtime=23
compdate=date()+1
else
compdate=date()
endif
endif
endif
do form main1 to optype
if optype=2
thisform.release
else
thisform.text1.value=space(10)
thisform.text2.value=space(10)
thisform.text3.value=space(2)
thisform.text1.setfocus
endif
endif
else
=messagebox("[用户编号/密码]不正确, 重新输入",48,"信息提示")
thisform.text1.value=space(10)
thisform.text2.value=space(10)
thisform.text3.value=space(2)
n=n+1
thisform.text1.setfocus
endif
endif
ENDPROC
PROCEDURE command2.Click
m=1
thisform.release
ENDPROC
PROCEDURE text3.Valid
if empty(this.value)
return .f.
endif
ENDPROC
ENDDEFINE
*
*-- 结束定义: pass1
**************************************************
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -