⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 w_login.srw

📁 PB9.0生成的图书管理系统
💻 SRW
字号:
$PBExportHeader$w_login.srw
forward
global type w_login from window
end type
type cb_1 from commandbutton within w_login
end type
type sle_2 from singlelineedit within w_login
end type
type sle_1 from singlelineedit within w_login
end type
type st_2 from statictext within w_login
end type
type st_1 from statictext within w_login
end type
end forward

global type w_login from window
integer width = 1047
integer height = 692
boolean titlebar = true
string title = "密码验证"
boolean controlmenu = true
boolean minbox = true
boolean maxbox = true
boolean resizable = true
long backcolor = 67108864
string icon = "AppIcon!"
boolean center = true
cb_1 cb_1
sle_2 sle_2
sle_1 sle_1
st_2 st_2
st_1 st_1
end type
global w_login w_login

type variables

end variables

on w_login.create
this.cb_1=create cb_1
this.sle_2=create sle_2
this.sle_1=create sle_1
this.st_2=create st_2
this.st_1=create st_1
this.Control[]={this.cb_1,&
this.sle_2,&
this.sle_1,&
this.st_2,&
this.st_1}
end on

on w_login.destroy
destroy(this.cb_1)
destroy(this.sle_2)
destroy(this.sle_1)
destroy(this.st_2)
destroy(this.st_1)
end on

event open;w_main.visible=false
sle_1.setfocus()
end event
type cb_1 from commandbutton within w_login
integer x = 270
integer y = 408
integer width = 457
integer height = 128
integer taborder = 30
integer textsize = -12
integer weight = 400
fontcharset fontcharset = ansi!
fontpitch fontpitch = variable!
fontfamily fontfamily = swiss!
string facename = "Arial"
string text = "登录"
end type

event clicked;string pwd
int rc,net
username=sle_1.text
pwd=sle_2.text

select count(id)
into :rc
from users
where username=:username
and password=:pwd
using sqlca;

if rc>0 then
	m_main.enabled=true
	if username="adm" then
		m_main.m_文件.m_管理用户.enabled=true
	else
		m_main.m_文件.m_管理用户.enabled=false
	end if
	LoginOk="ok"
	w_main.visible=true
else
	net=messagebox("提示:","用户名或者密码与档案不符,请重新输入!按Cancel取消。",Exclamation!, OKCancel!, 2)
end if

if net=1 then
	return 1
else
	close(parent)	
end if
end event

type sle_2 from singlelineedit within w_login
integer x = 375
integer y = 264
integer width = 457
integer height = 88
integer taborder = 20
integer textsize = -12
integer weight = 400
fontcharset fontcharset = ansi!
fontpitch fontpitch = variable!
fontfamily fontfamily = swiss!
string facename = "Arial"
long textcolor = 33554432
borderstyle borderstyle = stylelowered!
end type

type sle_1 from singlelineedit within w_login
integer x = 375
integer y = 120
integer width = 457
integer height = 88
integer taborder = 10
integer textsize = -12
integer weight = 400
fontcharset fontcharset = ansi!
fontpitch fontpitch = variable!
fontfamily fontfamily = swiss!
string facename = "Arial"
long textcolor = 33554432
borderstyle borderstyle = stylelowered!
end type

type st_2 from statictext within w_login
integer x = 87
integer y = 276
integer width = 279
integer height = 72
integer textsize = -12
integer weight = 400
fontcharset fontcharset = ansi!
fontpitch fontpitch = variable!
fontfamily fontfamily = swiss!
string facename = "Arial"
long textcolor = 33554432
long backcolor = 67108864
string text = "密码"
boolean focusrectangle = false
end type

type st_1 from statictext within w_login
integer x = 78
integer y = 124
integer width = 279
integer height = 72
integer textsize = -12
integer weight = 400
fontcharset fontcharset = ansi!
fontpitch fontpitch = variable!
fontfamily fontfamily = swiss!
string facename = "Arial"
long textcolor = 33554432
long backcolor = 67108864
string text = "用户名"
boolean focusrectangle = false
end type

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -