📄 frm_login.frm
字号:
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Begin VB.Form frm_login
BorderStyle = 0 'None
Caption = "登录"
ClientHeight = 3225
ClientLeft = 0
ClientTop = 0
ClientWidth = 5010
LinkTopic = "Form1"
LockControls = -1 'True
MaxButton = 0 'False
Picture = "frm_login.frx":0000
ScaleHeight = 3225
ScaleWidth = 5010
ShowInTaskbar = 0 'False
StartUpPosition = 2 '屏幕中心
Begin VB.TextBox Text1
Appearance = 0 'Flat
Height = 270
Left = 3255
TabIndex = 0
Top = 1320
Width = 1335
End
Begin VB.TextBox Text2
Appearance = 0 'Flat
Height = 270
IMEMode = 3 'DISABLE
Left = 3255
PasswordChar = "*"
TabIndex = 2
Top = 1770
Width = 1335
End
Begin MSAdodcLib.Adodc adoLogin
Height = 330
Left = 180
Top = 1185
Visible = 0 'False
Width = 2190
_ExtentX = 3863
_ExtentY = 582
ConnectMode = 0
CursorLocation = 3
IsolationLevel = -1
ConnectionTimeout= 15
CommandTimeout = 30
CursorType = 3
LockType = 3
CommandType = 8
CursorOptions = 0
CacheSize = 50
MaxRecords = 0
BOFAction = 0
EOFAction = 0
ConnectStringType= 1
Appearance = 1
BackColor = -2147483643
ForeColor = -2147483640
Orientation = 0
Enabled = -1
Connect = ""
OLEDBString = ""
OLEDBFile = ""
DataSourceName = ""
OtherAttributes = ""
UserName = ""
Password = ""
RecordSource = ""
Caption = "adoLogin"
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
_Version = 393216
End
Begin VB.Label labEnd
BackStyle = 0 'Transparent
Height = 300
Left = 3690
TabIndex = 3
Top = 2310
Width = 885
End
Begin VB.Label labLogin
BackStyle = 0 'Transparent
Height = 300
Left = 2805
TabIndex = 1
Top = 2310
Width = 885
End
End
Attribute VB_Name = "frm_login"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub labEnd_Click()
End
End Sub
Private Sub labLogin_Click()
adoLogin.ConnectionString = PublicStr
adoLogin.RecordSource = "select * from tbOA_user where username='" + Text1.Text + "' and userpwd='" + Text2.Text + "'"
adoLogin.Refresh
If adoLogin.Recordset.RecordCount > 0 Then
If adoLogin.Recordset.Fields(2).Value = 0 Then
frm_mainBefore.Show
frm_mainBefore.System.Enabled = False '权限约束
frm_mainBefore.StatusBar1.Panels(1).Text = "操作职员:" & Text1.Text
'设置控件TreeView树状菜单
Set n1 = frm_mainBefore.TreeView1.Nodes.Add(, tvwChild, "通知管理", "通知管理", 1)
Set node1 = frm_mainBefore.TreeView1.Nodes.Add(n1.Index, tvwChild, "发布通知", "发布通知", 1)
Set node1 = frm_mainBefore.TreeView1.Nodes.Add(n1.Index, tvwChild, "接收通知", "接收通知", 1)
Set node1 = frm_mainBefore.TreeView1.Nodes.Add(n1.Index, tvwChild, "已发通知", "已发通知", 1)
Set n2 = frm_mainBefore.TreeView1.Nodes.Add(, tvwChild, "新闻管理", "新闻管理", 1)
Set nnode2 = frm_mainBefore.TreeView1.Nodes.Add(n2.Index, tvwChild, "新闻发布", "新闻发布", 1)
Set node2 = frm_mainBefore.TreeView1.Nodes.Add(n2.Index, tvwChild, "接收新闻", "接收新闻", 1)
Set node2 = frm_mainBefore.TreeView1.Nodes.Add(n2.Index, tvwChild, "已发新闻", "已发新闻", 1)
Set n4 = frm_mainBefore.TreeView1.Nodes.Add(, tvwChild, "文件传送", "文件传送", 1)
Set nnode4 = frm_mainBefore.TreeView1.Nodes.Add(n4.Index, tvwChild, "传送文件", "传送文件", 1)
Set node4 = frm_mainBefore.TreeView1.Nodes.Add(n4.Index, tvwChild, "接收文件", "接收文件", 1)
Set node4 = frm_mainBefore.TreeView1.Nodes.Add(n4.Index, tvwChild, "已发文件", "已发文件", 1)
Set n3 = frm_mainBefore.TreeView1.Nodes.Add(, tvwChild, "交流管理", "交流管理", 1)
Set node3 = frm_mainBefore.TreeView1.Nodes.Add(n3.Index, tvwChild, "意见箱", "意见箱", 1)
Set node3 = frm_mainBefore.TreeView1.Nodes.Add(n3.Index, tvwChild, "投票活动", "投票活动", 1)
Set node3 = frm_mainBefore.TreeView1.Nodes.Add(n3.Index, tvwChild, "短消息服务", "短消息服务", 1)
Else
frm_mainBefore.Show
frm_mainBefore.StatusBar1.Panels(1).Text = "操作职员:" & Text1.Text
'设置控件TreeView树状菜单
Set n1 = frm_mainBefore.TreeView1.Nodes.Add(, tvwChild, "通知管理", "通知管理", 1)
Set node1 = frm_mainBefore.TreeView1.Nodes.Add(n1.Index, tvwChild, "发布通知", "发布通知", 1)
Set node1 = frm_mainBefore.TreeView1.Nodes.Add(n1.Index, tvwChild, "接收通知", "接收通知", 1)
Set node1 = frm_mainBefore.TreeView1.Nodes.Add(n1.Index, tvwChild, "已发通知", "已发通知", 1)
Set n2 = frm_mainBefore.TreeView1.Nodes.Add(, tvwChild, "新闻管理", "新闻管理", 1)
Set nnode2 = frm_mainBefore.TreeView1.Nodes.Add(n2.Index, tvwChild, "新闻发布", "新闻发布", 1)
Set node2 = frm_mainBefore.TreeView1.Nodes.Add(n2.Index, tvwChild, "接收新闻", "接收新闻", 1)
Set node2 = frm_mainBefore.TreeView1.Nodes.Add(n2.Index, tvwChild, "已发新闻", "已发新闻", 1)
Set n4 = frm_mainBefore.TreeView1.Nodes.Add(, tvwChild, "文件传送", "文件传送", 1)
Set nnode4 = frm_mainBefore.TreeView1.Nodes.Add(n4.Index, tvwChild, "传送文件", "传送文件", 1)
Set node4 = frm_mainBefore.TreeView1.Nodes.Add(n4.Index, tvwChild, "接收文件", "接收文件", 1)
Set node4 = frm_mainBefore.TreeView1.Nodes.Add(n4.Index, tvwChild, "已发文件", "已发文件", 1)
Set n3 = frm_mainBefore.TreeView1.Nodes.Add(, tvwChild, "交流管理", "交流管理", 1)
Set node3 = frm_mainBefore.TreeView1.Nodes.Add(n3.Index, tvwChild, "意见箱", "意见箱", 1)
Set node3 = frm_mainBefore.TreeView1.Nodes.Add(n3.Index, tvwChild, "投票活动", "投票活动", 1)
Set node3 = frm_mainBefore.TreeView1.Nodes.Add(n3.Index, tvwChild, "短消息服务", "短消息服务", 1)
Set n5 = frm_mainBefore.TreeView1.Nodes.Add(, tvwChild, "系统维护管理", "系统维护管理", 1)
Set node5 = frm_mainBefore.TreeView1.Nodes.Add(n5.Index, tvwChild, "人事管理", "人事管理", 1)
Set node5 = frm_mainBefore.TreeView1.Nodes.Add(n5.Index, tvwChild, "投票管理", "投票管理", 1)
Set node5 = frm_mainBefore.TreeView1.Nodes.Add(n5.Index, tvwChild, "意见箱管理", "意见箱管理", 1)
Set node5 = frm_mainBefore.TreeView1.Nodes.Add(n5.Index, tvwChild, "系统设置", "系统设置", 1)
End If
Unload Me
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -