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

📄 frmchangeoperator.frm

📁 金水区行政审批服务软件窗口系统
💻 FRM
字号:
VERSION 5.00
Object = "{8ED8CCC1-8472-46D0-93E7-F66929B98442}#2.0#0"; "xpcmd.ocx"
Begin VB.Form frmChangeOperator 
   BorderStyle     =   1  'Fixed Single
   Caption         =   "更换操作员"
   ClientHeight    =   2670
   ClientLeft      =   4350
   ClientTop       =   3930
   ClientWidth     =   4290
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   2670
   ScaleWidth      =   4290
   StartUpPosition =   2  '屏幕中心
   Begin XPCmd.xpcmdbutton xpcmdbutton2 
      Height          =   375
      Left            =   2760
      TabIndex        =   8
      Top             =   1680
      Width           =   975
      _ExtentX        =   1720
      _ExtentY        =   661
      Caption         =   "   取  消"
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
   End
   Begin XPCmd.xpcmdbutton xpcmdbutton1 
      Height          =   375
      Left            =   1560
      TabIndex        =   7
      Top             =   1680
      Width           =   975
      _ExtentX        =   1720
      _ExtentY        =   661
      Caption         =   "   确  定"
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
   End
   Begin VB.PictureBox PicCaption 
      AutoRedraw      =   -1  'True
      AutoSize        =   -1  'True
      BorderStyle     =   0  'None
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   720
      Left            =   3960
      Picture         =   "frmChangeOperator.frx":0000
      ScaleHeight     =   720
      ScaleWidth      =   9600
      TabIndex        =   5
      TabStop         =   0   'False
      Top             =   0
      Visible         =   0   'False
      Width           =   9600
      Begin VB.PictureBox PicBorder 
         AutoRedraw      =   -1  'True
         AutoSize        =   -1  'True
         BorderStyle     =   0  'None
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   150
         Left            =   0
         Picture         =   "frmChangeOperator.frx":16844
         ScaleHeight     =   150
         ScaleWidth      =   1050
         TabIndex        =   6
         TabStop         =   0   'False
         Top             =   0
         Visible         =   0   'False
         Width           =   1050
      End
   End
   Begin VB.Frame Frame1 
      Caption         =   "操作员更换"
      Height          =   1455
      Left            =   120
      TabIndex        =   0
      Top             =   120
      Width           =   3855
      Begin VB.TextBox Text1 
         Height          =   270
         IMEMode         =   3  'DISABLE
         Left            =   1440
         PasswordChar    =   "*"
         TabIndex        =   4
         Top             =   800
         Width           =   2175
      End
      Begin VB.ComboBox Combo1 
         Height          =   300
         Left            =   1440
         TabIndex        =   3
         Top             =   320
         Width           =   2175
      End
      Begin VB.Label Label2 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "密    码(P):"
         Height          =   180
         Left            =   240
         TabIndex        =   2
         Top             =   840
         Width           =   1170
      End
      Begin VB.Label Label1 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "用户名称(U):"
         Height          =   180
         Left            =   240
         TabIndex        =   1
         Top             =   360
         Width           =   1170
      End
   End
End
Attribute VB_Name = "frmChangeOperator"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'特别提示:以下代码处理更换操作员的功能
'          更换操作员的前提是一定是系统的合法用户因此加了身份验证
'          只有通过身份验证后更换操作才能生效,更换后一些参数如:工作人员姓名,密码等会进行传递
'2003-06-26 dww am 9:57
'定义漂亮窗体所需的对象变量
Private m_cn As cNeoCaption
'定义两个全局变量来接受上层传来的变量
Public inDepartmentName As String
Public inWindowName As String
'定义私有变量来存放当前窗体的工作人员姓名
Private inWorkerName As String
'声名ado对象
Dim rs As ADODB.Recordset
Dim db As ADODB.Connection








Private Sub Form_Load()
'此处代码将制作一个漂亮窗体用
 Set m_cn = New cNeoCaption
 Skin Me, m_cn
'------------------------------------------------------------
'调整Frame控件的背景颜色使其和窗体颜色一致
'若Frame控件上有标签则应修改标签属性使其为透明
Frame1.BackColor = RGB(207, 203, 207)
'------------------------------------------------------------
'调用模块中的函数将本单位的所有工作人员姓名导入组合框中
If Not GetAllWorkerName(inDepartmentName, Combo1) Then
   Exit Sub
End If
End Sub
Private Sub Form_Unload(Cancel As Integer)
'处理窗体卸载的操作主要是释放对象
Set m_cn = Nothing
Set rs = Nothing
Set db = Nothing
End Sub












Private Sub xpcmdbutton1_Click()
'处理确定按钮的操作
Set db = New ADODB.Connection
Set rs = New ADODB.Recordset
db.ConnectionString = frmShouJian.DBConectString
db.Open
rs.Open "select Workername,password from  " & gsWorkerTblStorageName, db, adOpenStatic, adLockReadOnly
rs.Close
If Combo1.Text <> "" Then
    rs.Open "select Workername,password from " & gsWorkerTblStorageName & "  where Workername='" & Combo1.Text & "'and password='" & Text1.Text & "'"
    If rs.EOF = True And rs.BOF Then
      n = MsgBox("密码错误!请重新输入密码!", vbExclamation, "系统登录警告")
      Text1.Text = ""
      Text1.SetFocus
    Else
      '验证通过后进行变量传递如果发生错误请检查此处
      frmShouJian.inWorkerName = LTrim(Combo1.Text)
      frmShouJian.inPassWord = LTrim(Text1.Text)
      inWindowName = frmShouJian.inWindowName
      inWorkerName = LTrim(Combo1.Text)
      frmShouJian.Caption = "欢迎使用 [" + inDepartmentName + "]---->>" + "[" + inWindowName + "]---->>" + "[" + "收件办理" + "]" + "---->>" + "[" + "操作员:" + Trim(inWorkerName) + "]"
      Unload Me
    End If
Else
     n = MsgBox("请选择用户名!用户名不能为空!", vbExclamation, "系统登录警告")
End If
Set db = Nothing
Set rs = Nothing
End Sub
Private Sub xpcmdbutton2_Click()
'处理取消按钮操作
Unload Me
End Sub
Private Sub Text1_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
   Set db = New ADODB.Connection
   Set rs = New ADODB.Recordset
   db.ConnectionString = frmShouJian.DBConectString
   db.Open
   rs.Open "select Workername,password from  " & gsWorkerTblStorageName, db, adOpenStatic, adLockReadOnly
   rs.Close
   If Combo1.Text <> "" Then
     rs.Open "select Workername,password from " & gsWorkerTblStorageName & "  where Workername='" & Combo1.Text & "'and password='" & Text1.Text & "'"
     If rs.EOF = True And rs.BOF Then
       n = MsgBox("密码错误!请重新输入密码!", vbExclamation, "系统登录警告")
       Text1.Text = ""
       Text1.SetFocus
     Else
       '验证通过后进行变量传递如果发生错误请检查此处
       frmShouJian.inWorkerName = LTrim(Combo1.Text)
       frmShouJian.inPassWord = LTrim(Text1.Text)
       inWindowName = frmShouJian.inWindowName
       inWorkerName = LTrim(Combo1.Text)
       frmShouJian.Caption = "欢迎使用 [" + inDepartmentName + "]---->>" + "[" + inWindowName + "]---->>" + "[" + "收件办理" + "]" + "---->>" + "[" + "操作员:" + Trim(inWorkerName) + "]"
       Unload Me
     End If
Else
       n = MsgBox("请选择用户名!用户名不能为空!", vbExclamation, "系统登录警告")
End If
Set db = Nothing
Set rs = Nothing
End If
End Sub

⌨️ 快捷键说明

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