📄 frm_xgmm.frm
字号:
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Begin VB.Form frm_xgmm
BorderStyle = 3 'Fixed Dialog
Caption = "操作员密码修改"
ClientHeight = 1965
ClientLeft = 45
ClientTop = 330
ClientWidth = 4125
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 1965
ScaleWidth = 4125
ShowInTaskbar = 0 'False
Begin VB.TextBox Text5
Height = 375
Left = 600
TabIndex = 10
Text = "111"
Top = 2040
Width = 975
End
Begin MSAdodcLib.Adodc Adodc1
Height = 375
Left = 120
Top = 2640
Width = 1935
_ExtentX = 3413
_ExtentY = 661
ConnectMode = 0
CursorLocation = 3
IsolationLevel = -1
ConnectionTimeout= 15
CommandTimeout = 30
CursorType = 3
LockType = 3
CommandType = 1
CursorOptions = 0
CacheSize = 50
MaxRecords = 0
BOFAction = 0
EOFAction = 0
ConnectStringType= 1
Appearance = 1
BackColor = -2147483643
ForeColor = -2147483640
Orientation = 0
Enabled = -1
Connect = "Provider=MSDASQL.1;Persist Security Info=False;User ID=sa;Data Source=cggl"
OLEDBString = "Provider=MSDASQL.1;Persist Security Info=False;User ID=sa;Data Source=cggl"
OLEDBFile = ""
DataSourceName = ""
OtherAttributes = ""
UserName = ""
Password = ""
RecordSource = "select * from Table_xxdl"
Caption = "Adodc1"
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.TextBox Text4
Height = 375
Left = 2400
TabIndex = 9
Text = "Text4"
Top = 2520
Width = 1095
End
Begin VB.CommandButton Command2
Caption = "取消"
Height = 375
Left = 3120
TabIndex = 2
Top = 1560
Width = 975
End
Begin VB.Frame Frame1
Height = 1455
Left = 10
TabIndex = 0
Top = 0
Width = 4095
Begin VB.TextBox Text3
Height = 300
IMEMode = 3 'DISABLE
Left = 1320
PasswordChar = "*"
TabIndex = 8
Top = 960
Width = 2535
End
Begin VB.TextBox Text2
Height = 300
IMEMode = 3 'DISABLE
Left = 1320
PasswordChar = "*"
TabIndex = 7
Top = 600
Width = 2535
End
Begin VB.TextBox Text1
Height = 300
IMEMode = 3 'DISABLE
Left = 1320
PasswordChar = "*"
TabIndex = 6
Top = 240
Width = 2535
End
Begin VB.Label Label3
Caption = "请确认新密码"
Height = 255
Left = 120
TabIndex = 5
Top = 1050
Width = 1095
End
Begin VB.Label Label2
Caption = "请输入新密码"
Height = 375
Left = 120
TabIndex = 4
Top = 690
Width = 1095
End
Begin VB.Label Label1
Caption = "请输入旧密码"
Height = 375
Left = 120
TabIndex = 3
Top = 330
Width = 1215
End
End
Begin VB.CommandButton Command1
Caption = "确认"
Height = 375
Left = 2040
TabIndex = 1
Top = 1560
Width = 975
End
End
Attribute VB_Name = "frm_xgmm"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'Public adoCon As New ADODB.Connection
'Public adoRs As New ADODB.Recordset
Private Sub Command1_Click()
Call main
If Text1.Text = "" Or Text2.Text = "" Or Text3.Text = "" Then
MsgBox "输入不能为空!!", 64, "采购管理系统"
Else
Adodc1.RecordSource = "select * from Table_xxdl where 口令 ='" & Text1.Text & "'"
Adodc1.Refresh
If Adodc1.Recordset.RecordCount > 0 Then
Text4.Text = Adodc1.Recordset.Fields("用户名")
If Text2.Text <> Text3.Text Then
MsgBox "两次输入的密码不一致,请您确认后重新输入", 64, "采购管理系统"
Text2.Text = ""
Text3.Text = ""
Text2.SetFocus
Else
Set adoRs = adoCon.Execute("UPDATE Table_xxdl SET 口令= '" + Text3.Text + "' where 用户名='" + Text4.Text + "'")
Adodc1.Refresh
MsgBox "密码修改成功,请您记住新密码", 64, "采购管理系统"
Unload Me
End If
Else
MsgBox "没有此用户的信息,请您确认后重新输入", 64, "采购管理系统"
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text1.SetFocus
End If
End If
adoCon.Close
End Sub
Private Sub Command2_Click()
Unload Me
End Sub
Private Sub Form_Load()
Me.Left = (Screen.Width - Me.Width) / 2
Me.Top = (Screen.Height - Me.Height) / 2
frm_main.StatusBar1.Panels(1).Text = " 当前操作: " & Me.Caption
End Sub
Private Sub Form_Unload(Cancel As Integer)
frm_main.StatusBar1.Panels(1).Text = " 吉林省明日科技有限公司"
End Sub
Private Sub Text1_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
Text2.SetFocus
Else
End If
End Sub
Private Sub Text2_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
Text3.SetFocus
Else
End If
End Sub
Private Sub Text3_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
Call Command1_Click
Else
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -