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

📄 frmopset.frm

📁 CBB摄像直读远传抄表系统 Ver 5.2
💻 FRM
字号:
VERSION 5.00
Begin VB.Form frmOPSet 
   BorderStyle     =   1  'Fixed Single
   Caption         =   "操作员设置"
   ClientHeight    =   2880
   ClientLeft      =   45
   ClientTop       =   330
   ClientWidth     =   4800
   ControlBox      =   0   'False
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MDIChild        =   -1  'True
   MinButton       =   0   'False
   ScaleHeight     =   2880
   ScaleWidth      =   4800
   Begin VB.Frame Frame1 
      Caption         =   "操作员权限"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   9.75
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   1575
      Left            =   120
      TabIndex        =   5
      Top             =   1200
      Width           =   3255
      Begin VB.CheckBox chkOPSet 
         Caption         =   "操作员设置"
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   9.75
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   255
         Left            =   1680
         TabIndex        =   12
         Top             =   630
         Width           =   1455
      End
      Begin VB.CheckBox chkMonAlert 
         Caption         =   "报警监测"
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   9.75
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   255
         Left            =   1680
         TabIndex        =   11
         Top             =   360
         Width           =   1455
      End
      Begin VB.CheckBox chkDataEdit 
         Caption         =   "数据编辑"
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   9.75
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   255
         Left            =   240
         TabIndex        =   10
         Top             =   1170
         Width           =   1335
      End
      Begin VB.CheckBox chkDataQuery 
         Caption         =   "数据查询"
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   9.75
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   255
         Left            =   240
         TabIndex        =   9
         Top             =   900
         Width           =   1335
      End
      Begin VB.CheckBox chkDataCollect 
         Caption         =   "数据采集"
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   9.75
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   255
         Left            =   240
         TabIndex        =   8
         Top             =   630
         Width           =   1335
      End
      Begin VB.CheckBox chkCheckNet 
         Caption         =   "网络巡检"
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   9.75
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   255
         Left            =   240
         TabIndex        =   7
         Top             =   360
         Width           =   1335
      End
      Begin VB.CheckBox chkSysSet 
         Caption         =   "系统设置"
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   9.75
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   255
         Left            =   1680
         TabIndex        =   6
         Top             =   900
         Width           =   1455
      End
   End
   Begin VB.CommandButton cmdOK 
      Caption         =   "确定"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   9.75
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   3600
      TabIndex        =   4
      Top             =   240
      Width           =   1095
   End
   Begin VB.CommandButton cmdCancel 
      Caption         =   "取消"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   9.75
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   3600
      TabIndex        =   3
      Top             =   720
      Width           =   1095
   End
   Begin VB.TextBox txtPWD 
      Height          =   285
      IMEMode         =   3  'DISABLE
      Left            =   1440
      PasswordChar    =   "*"
      TabIndex        =   2
      Top             =   480
      Width           =   1575
   End
   Begin VB.TextBox txtID 
      Height          =   285
      Left            =   1440
      TabIndex        =   1
      Top             =   120
      Width           =   1575
   End
   Begin VB.TextBox txtPWD2 
      Height          =   285
      IMEMode         =   3  'DISABLE
      Left            =   1440
      PasswordChar    =   "*"
      TabIndex        =   0
      Top             =   840
      Width           =   1575
   End
   Begin VB.Label Label2 
      Caption         =   "口令:"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   9.75
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   255
      Left            =   360
      TabIndex        =   15
      Top             =   480
      Width           =   1095
   End
   Begin VB.Label Label1 
      Caption         =   "操作员名:"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   9.75
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   255
      Left            =   360
      TabIndex        =   14
      Top             =   120
      Width           =   1095
   End
   Begin VB.Label Label3 
      Caption         =   "口令确认:"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   9.75
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   255
      Left            =   360
      TabIndex        =   13
      Top             =   840
      Width           =   1095
   End
End
Attribute VB_Name = "frmOPSet"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'****************************************************************************
'人人为我,我为人人
'枕善居收藏整理
'发布日期:2007/07/09
'描    述:CBB三表户外计量系统 Ver 5.2
'网    站:http://www.Mndsoft.com/  (VB6源码博客)
'网    站:http://www.VbDnet.com/   (VB.NET源码博客,主要基于.NET2005)
'e-mail  :Mndsoft@163.com
'e-mail  :Mndsoft@126.com
'OICQ    :88382850
'          如果您有新的好的代码别忘记给枕善居哦!
'****************************************************************************
Private Sub cmdCancel_Click()
On Error GoTo ProcError
    dbCbb.Rollback
    Unload frmOPSet
    Exit Sub
ProcError:
    ProcErr
End Sub


Private Sub cmdOK_Click()
On Error GoTo ProcError
    Dim rcOPSet As Recordset

    If Trim(UCase(txtPWD.Text)) <> Trim(UCase(txtPWD2.Text)) Then
        MsgBox "两次输入口令不一致" + Chr(10) + "请重新输入", , "操作员设置"
        Exit Sub
    End If
    
    If Trim(txtID.Text) = "" Then
        MsgBox "操作员名不能为空", , "操作员设置"
        Exit Sub
    End If
    Set rcOPSet = dbCbb.OpenRecordset("OPMap", dbOpenDynaset)
    rcOPSet.FindFirst "ID=""" + Trim(txtID.Text) + """"
    If Not rcOPSet.NoMatch Then
        MsgBox "当前操作员名已经设置" + Chr(10) + "请选择其他操作员名", , "操作员设置"
        Set rcOPSet = Nothing
        Exit Sub
    End If
    
    rcOPSet.AddNew
            rcOPSet!id = Trim(txtID.Text)
            rcOPSet!Password = Trim(UCase(txtPWD.Text))
            rcOPSet!checkNet = chkCheckNet.Value
            rcOPSet!DataCollect = chkDataCollect.Value
            rcOPSet!DataQuery = chkDataQuery.Value
            rcOPSet!DataEdit = chkDataEdit.Value
            rcOPSet!monAlert = chkMonAlert.Value
            rcOPSet!OPSet = chkOPSet.Value
            rcOPSet!SysSet = chkSysSet.Value
            'rcOPSet!GetIn = chkGetIn.Value
    rcOPSet.Update
    
    dbCbb.CommitTrans
'status
    AppendStatusInfo Me.Caption & "(" & Trim(txtID.Text) & ")", icoBLUE
    SaveLog Me.Caption & "(" & Trim(txtID.Text) & ")", 0
    Unload frmOPSet
    initLstOP
    Exit Sub
ProcError:
    ProcErr
End Sub

Private Sub Form_Load()
On Error GoTo ProcError
    If UBound(curForm) > 0 Then
        curForm(UBound(curForm)).Enabled = False
    End If
    ReDim Preserve curForm(UBound(curForm) + 1)
    Set curForm(UBound(curForm)) = Me

    
Dim rcOPSet As Recordset

    dbCbb.BeginTrans
    
    If curSetOP <> "" Then
        frmOPSet.Caption = "修改操作员设置"
        Set rcOPSet = dbCbb.OpenRecordset("OPMap", dbOpenDynaset)
        rcOPSet.FindFirst "ID=""" + curSetOP + """"
        If Not rcOPSet.NoMatch Then
            txtID.Text = rcOPSet!id
            txtPWD.Text = rcOPSet!Password
            txtPWD2.Text = rcOPSet!Password
            chkCheckNet.Value = rcOPSet!checkNet
            chkDataCollect.Value = rcOPSet!DataCollect
            chkDataQuery.Value = rcOPSet!DataQuery
            chkDataEdit.Value = rcOPSet!DataEdit
            chkMonAlert.Value = rcOPSet!monAlert
            chkOPSet.Value = rcOPSet!OPSet
            chkSysSet.Value = rcOPSet!SysSet
            'chkGetIn.Value = rcOPSet!GetIn
            
            rcOPSet.Delete
        Else
            MsgBox "没有找到匹配的操作员信息", 48, "修改操作员设置"
        End If
        Set rcOPSet = Nothing
    Else
        frmOPSet.Caption = "新增操作员设置"
    End If
    DoEvents
    Exit Sub
ProcError:
    ProcErr
End Sub


Private Sub Form_Unload(Cancel As Integer)
    ReDim Preserve curForm(UBound(curForm) - 1)
    If UBound(curForm) > 0 Then
        curForm(UBound(curForm)).Enabled = True
    End If

End Sub

⌨️ 快捷键说明

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