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

📄 n_user.frm

📁 杭州舟远信息技术连锁有限公司的棋牌管理系统源代码
💻 FRM
字号:
VERSION 5.00
Object = "{74848F95-A02A-4286-AF0C-A3C755E4A5B3}#1.0#0"; "actskn43.ocx"
Begin VB.Form N_USER 
   Caption         =   "操作员管理"
   ClientHeight    =   5670
   ClientLeft      =   60
   ClientTop       =   450
   ClientWidth     =   5250
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   ScaleHeight     =   5670
   ScaleWidth      =   5250
   StartUpPosition =   3  '窗口缺省
   Begin VB.ComboBox Combo1 
      Height          =   300
      Left            =   2040
      TabIndex        =   16
      Top             =   3480
      Width           =   1335
   End
   Begin ACTIVESKINLibCtl.Skin Skin1 
      Left            =   1200
      OleObjectBlob   =   "N_USER.frx":0000
      Top             =   5040
   End
   Begin VB.TextBox Text7 
      Enabled         =   0   'False
      Height          =   375
      Index           =   5
      Left            =   960
      TabIndex        =   15
      Text            =   "原密码:"
      Top             =   1080
      Width           =   975
   End
   Begin VB.TextBox Text7 
      Enabled         =   0   'False
      Height          =   375
      Index           =   4
      Left            =   960
      TabIndex        =   14
      Text            =   "新密码:"
      Top             =   1680
      Width           =   975
   End
   Begin VB.TextBox Text7 
      Enabled         =   0   'False
      Height          =   375
      Index           =   3
      Left            =   960
      TabIndex        =   13
      Text            =   "确定密码:"
      Top             =   2280
      Width           =   975
   End
   Begin VB.TextBox Text7 
      Enabled         =   0   'False
      Height          =   375
      Index           =   2
      Left            =   960
      TabIndex        =   12
      Text            =   "用户名:"
      Top             =   2880
      Width           =   975
   End
   Begin VB.TextBox Text7 
      Enabled         =   0   'False
      Height          =   375
      Index           =   1
      Left            =   960
      TabIndex        =   11
      Text            =   "权限:"
      Top             =   3480
      Width           =   975
   End
   Begin VB.TextBox Text7 
      Enabled         =   0   'False
      Height          =   375
      Index           =   0
      Left            =   960
      TabIndex        =   10
      Text            =   "登入名:"
      Top             =   480
      Width           =   975
   End
   Begin VB.CommandButton Command8 
      Caption         =   "删除用户"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   2520
      TabIndex        =   9
      Top             =   4200
      Width           =   1215
   End
   Begin VB.CommandButton Command4 
      Caption         =   "修改密码"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   120
      TabIndex        =   8
      Top             =   4200
      Width           =   1095
   End
   Begin VB.CommandButton Command2 
      Caption         =   "新增用户"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   1320
      TabIndex        =   7
      Top             =   4200
      Width           =   1095
   End
   Begin VB.TextBox Text2 
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   2040
      MaxLength       =   10
      TabIndex        =   6
      Top             =   1080
      Width           =   2055
   End
   Begin VB.TextBox Text1 
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   2040
      MaxLength       =   10
      TabIndex        =   5
      Top             =   480
      Width           =   2055
   End
   Begin VB.TextBox Text3 
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   2040
      MaxLength       =   10
      TabIndex        =   4
      Top             =   1680
      Width           =   2055
   End
   Begin VB.TextBox Text4 
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   2040
      MaxLength       =   10
      TabIndex        =   3
      Top             =   2280
      Width           =   2055
   End
   Begin VB.CommandButton Command1 
      Caption         =   "退  出"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   495
      Left            =   3600
      TabIndex        =   2
      Top             =   4920
      Width           =   1455
   End
   Begin VB.CommandButton Command3 
      Caption         =   "确认"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   3840
      TabIndex        =   1
      Top             =   4200
      Width           =   1215
   End
   Begin VB.TextBox Text5 
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   2040
      MaxLength       =   10
      TabIndex        =   0
      Top             =   2880
      Width           =   2055
   End
End
Attribute VB_Name = "N_USER"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim SYS_USER As String
Dim SYS_USERNAME As String
Dim SYS_LX As Integer

Private Sub Command1_Click()
Unload Me
End Sub

Private Sub Command2_Click()
On Error Resume Next
Combo1.Clear

If Trim(SYS_NAME) <> "超级用户" Then
 MsgBox "您没有权限新增用户!"
Exit Sub
End If
Call Form_Load
Text1.Visible = True
Text3.Visible = True
Text4.Visible = True
Text5.Visible = True
'Text6.Visible = True
Command3.Enabled = True
SYS_LX = 1

End Sub

Private Sub Command3_Click()
On Error Resume Next
Dim user_rec  As ADODB.Recordset
Select Case SYS_LX
Case 0
    Set user_rec = New ADODB.Recordset
    user_rec.Source = "SELECT * FROM  N_USER WHERE NAME='" & Trim(SYS_USERNAME) & "'"
    Set user_rec.ActiveConnection = objConn
    user_rec.CursorType = adOpenDynamic
    user_rec.LockType = adLockOptimistic
    user_rec.Open
    If Trim(user_rec.Fields("PASWD")) <> Trim(Text2.Text) Then
        MsgBox "原密码输入错误!"
        GoTo endless
    End If
    If Trim(Text3.Text) <> Trim(Text4.Text) Then
        MsgBox "新密码和确认密码不符!"
        GoTo endless
    End If
    user_rec.Fields("PASWD") = Trim(Text3.Text)
    user_rec.Update
Case 1
    If Trim(Text3.Text) <> Trim(Text4.Text) Then
        MsgBox "新密码和确认密码不符!"
        GoTo endless
    End If
    Set user_rec = New ADODB.Recordset
    user_rec.Source = "SELECT * FROM  N_USER"
    Set user_rec.ActiveConnection = objConn
    user_rec.CursorType = adOpenDynamic
    user_rec.LockType = adLockOptimistic
    user_rec.Open
    user_rec.AddNew
    With user_rec
        .Fields("UR") = Trim(Text1.Text)
        .Fields("PASWD") = Trim(Text3.Text)
        .Fields("NAME") = Trim(Text5.Text)
        .Fields("POWER") = Combo1.Text
    End With
    user_rec.Update
Case 2
    If Trim(Text1.Text) = Trim(SYS_UR) Then
       MsgBox "无法删除当前用户!"
       GoTo endless
    End If
    Set user_rec = New ADODB.Recordset
    user_rec.Source = "SELECT * FROM  N_USER WHERE UR='" & Trim(Text1.Text) & "'"
    Set user_rec.ActiveConnection = objConn
    user_rec.CursorType = adOpenDynamic
    user_rec.LockType = adLockOptimistic
    user_rec.Open
    If user_rec.EOF Then
        MsgBox "该用户不存在!"
        GoTo endless
    End If
    user_rec.Delete
    user_rec.Update
End Select
Call Form_Load
endless:
user_rec.Close
Set user_rec = Nothing
End Sub

Private Sub Command4_Click()
    Combo1.Clear
    Call Form_Load
    Text2.Visible = True
    Text3.Visible = True
    Text4.Visible = True
    Command3.Enabled = True
    SYS_LX = 0
End Sub

Private Sub Command8_Click()
On Error Resume Next
Combo1.Clear
'If IsNull(SYS_USER) Then
'MsgBox "您没有权限删除用户!"
'Exit Sub
'End If
If Trim(SYS_NAME) <> "超级用户" Then
MsgBox "您没有权限删除用户!"
Exit Sub
End If
Call Form_Load
Text1.Visible = True
Command3.Enabled = True
SYS_LX = 2

End Sub

Private Sub Form_Load()
Skin1.LoadSkin App.Path + "\棋牌界面"
Skin1.ApplySkin hWnd
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Text5.Text = ""
'Text6.Text = ""
Text1.Visible = False
Text2.Visible = False
Text3.Visible = False
Text4.Visible = False
Text5.Visible = False
'Text6.Visible = False
Command3.Enabled = False
 With Combo1
   .AddItem ("前台操作员")
   .AddItem ("超级用户")
 End With
 
'Call N_GetCMSG("N_USER", "NAME", USER_Combo)

End Sub


Sub init_MAIN(SYS_U As String, NAME As String)
SYS_USERNAME = NAME
SYS_USER = SYS_U
End Sub

⌨️ 快捷键说明

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