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

📄 main_xtgl_mm.frm

📁 EMS是一个企业营销管理系统,功能强大,供大家享用,希望大家多多支持!!
💻 FRM
字号:
VERSION 5.00
Begin VB.Form main_xtgl_mm 
   BorderStyle     =   3  'Fixed Dialog
   Caption         =   "密码修改"
   ClientHeight    =   3180
   ClientLeft      =   2715
   ClientTop       =   3690
   ClientWidth     =   6525
   Icon            =   "main_xtgl_mm.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   3180
   ScaleWidth      =   6525
   ShowInTaskbar   =   0   'False
   StartUpPosition =   1  '所有者中心
   Tag             =   "修改密码"
   Begin VB.CommandButton Command2 
      Caption         =   "取消"
      Height          =   390
      Left            =   3360
      Picture         =   "main_xtgl_mm.frx":000C
      TabIndex        =   2
      TabStop         =   0   'False
      Top             =   2640
      Width           =   1575
   End
   Begin VB.CommandButton Command1 
      Caption         =   "确定"
      Height          =   390
      Left            =   1605
      Picture         =   "main_xtgl_mm.frx":19C6
      TabIndex        =   1
      Top             =   2640
      Width           =   1575
   End
   Begin VB.Frame Frame1 
      Height          =   2535
      Left            =   30
      TabIndex        =   3
      Top             =   -60
      Width           =   6465
      Begin VB.TextBox Text1 
         BackColor       =   &H00FFFFFF&
         Height          =   315
         Index           =   2
         Left            =   2130
         TabIndex        =   7
         Top             =   1860
         Width           =   2880
      End
      Begin VB.TextBox Text1 
         BackColor       =   &H00FFFFFF&
         Height          =   315
         Index           =   1
         Left            =   2130
         TabIndex        =   6
         Top             =   1305
         Width           =   2880
      End
      Begin VB.TextBox Text1 
         BackColor       =   &H00FFFFFF&
         Height          =   315
         Index           =   0
         Left            =   2130
         Locked          =   -1  'True
         TabIndex        =   0
         Top             =   765
         Width           =   2880
      End
      Begin VB.Label Label1 
         BackStyle       =   0  'Transparent
         Caption         =   "请输入操作员、原密码及新密码"
         ForeColor       =   &H000000FF&
         Height          =   225
         Left            =   180
         TabIndex        =   5
         Top             =   315
         Width           =   4290
      End
      Begin VB.Label Label2 
         BackStyle       =   0  'Transparent
         Caption         =   "操作员                原密码                  新密码"
         Height          =   1365
         Left            =   1425
         TabIndex        =   4
         Top             =   825
         Width           =   690
      End
   End
End
Attribute VB_Name = "main_xtgl_mm"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Form_Load()
  If main_xtgl_czqx.Visible = True Then
     Text1(0) = main_xtgl_czqx.DataList1.BoundText
  Else
     Text1(0) = czy
  End If
End Sub

Private Sub Text1_GotFocus(Index As Integer)
  Text1(Index).BackColor = &HFFFF80
  Text1(Index).SelStart = 0
  Text1(Index).SelLength = Len(Text1(Index))
End Sub
Private Sub Text1_LostFocus(Index As Integer)
  Text1(Index).BackColor = &HFFFFFF
End Sub
Private Sub Text1_KeyDown(Index As Integer, KeyCode As Integer, Shift As Integer)
  If KeyCode = vbKeyReturn And Index < 2 Then Text1(Index + 1).SetFocus
  If KeyCode = vbKeyReturn And Index = 2 Then Command1.SetFocus
  If KeyCode = vbKeyUp And Index > 0 Then Text1(Index - 1).SetFocus
End Sub
Private Sub Command1_Click()     '确认修改操作员信息
  Dim rs1 As New ADODB.Recordset
  If Len(Text1(0)) = 0 Then
     MsgBox "请输入操作员!", , "提示窗口"
     Exit Sub
  End If
  If Len(Text1(1)) = 0 Then
     MsgBox "请输入原密码!", , "提示窗口"
     Exit Sub
  End If
  On Error GoTo SaveErr
  rs1.Open "权限信息表 where 操作员='" + Text1(0).text + "'", Cnn, adOpenStatic
  If rs1.RecordCount > 0 Then
     If Text1(1) <> rs1.Fields("密码") Then
        MsgBox "原密码不正确!", , "提示窗口"
        Text1(1).SetFocus
     Else
        If Len(Text1(2)) = 0 Then
           MsgBox "请输入新密码!", , "提示窗口"
           Text1(2).SetFocus
        Else
           Cnn.Execute ("update 权限信息表 set 密码='" + Text1(2) + "'where 操作员='" + Text1(0).text + "'")
           MsgBox "密码修改成功!", , "提示窗口"
           Command2_Click
        End If
     End If
  Else
     MsgBox "操作员不正确!", , "提示窗口"
     Text1(0).SetFocus
  End If
  Exit Sub
SaveErr:
       MsgBox Err.Description
End Sub
Private Sub Command2_Click()
  Unload Me
End Sub






⌨️ 快捷键说明

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