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

📄 scyh.frm

📁 学生管理系统 很不错的一个课程设计 适合大学生毕业设计用
💻 FRM
字号:
VERSION 5.00
Begin VB.Form 删除用户 
   Caption         =   "系统管理-删除用户"
   ClientHeight    =   3195
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   4680
   LinkTopic       =   "Form5"
   ScaleHeight     =   3195
   ScaleWidth      =   4680
   StartUpPosition =   3  '窗口缺省
   Begin VB.Frame Frame1 
      Height          =   3135
      Left            =   -7
      TabIndex        =   0
      Top             =   0
      Width           =   4695
      Begin VB.CommandButton Command3 
         Caption         =   "取消"
         Height          =   375
         Left            =   2520
         TabIndex        =   7
         Top             =   2640
         Width           =   1095
      End
      Begin VB.CommandButton Command2 
         Caption         =   "删除"
         Height          =   375
         Left            =   840
         TabIndex        =   6
         Top             =   2640
         Width           =   1095
      End
      Begin VB.Frame Frame2 
         Caption         =   "输入用户名"
         Height          =   1095
         Left            =   120
         TabIndex        =   2
         Top             =   600
         Width           =   4455
         Begin VB.CommandButton Command1 
            Caption         =   "查找"
            Height          =   375
            Left            =   3120
            TabIndex        =   4
            Top             =   360
            Width           =   1095
         End
         Begin VB.TextBox Text1 
            Height          =   375
            Left            =   360
            TabIndex        =   3
            Top             =   360
            Width           =   2055
         End
      End
      Begin VB.Label Label2 
         Caption         =   "Label2"
         Height          =   615
         Left            =   120
         TabIndex        =   5
         Top             =   1800
         Width           =   4455
      End
      Begin VB.Label Label1 
         Alignment       =   2  'Center
         Caption         =   "删 除 用 户"
         BeginProperty Font 
            Name            =   "黑体"
            Size            =   15.75
            Charset         =   134
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   375
         Left            =   480
         TabIndex        =   1
         Top             =   120
         Width           =   3735
      End
   End
End
Attribute VB_Name = "删除用户"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim biaozhi As String
Private Sub Command1_Click()
If Trim(Text1.Text) = "" Then
MsgBox "请输入要删除的用户名!", vbExclamation + vbOKOnly, "提示"
Text1.SetFocus
Exit Sub
End If

Dim mrc As ADODB.Recordset
txtsql = "select * from 用户 where 用户名='" & Trim(Text1.Text) & "'"
Set mrc = ExecuteSQL(txtsql)
If mrc.EOF = True Then
   MsgBox " 不存在该用户!", vbExclamation + vbOKOnly, "提示"
   Text1.Text = ""
Else
   biaozhi = mrc.Fields(2)
   Command2.Visible = True
   Label2.Caption = "存在该用户!"
End If
End Sub

Private Sub Command2_Click()
If biaozhi = "1" Then
     MsgBox " 无法删除系统用户!", vbExclamation + vbOKOnly, "警告"
    Else
      txtsql = "delete * from 用户 where 用户名='" & Trim(Text1.Text) & "'"
      Set mrc = ExecuteSQL(txtsql)
      MsgBox " 用户删除成功!", vbExclamation + vbOKOnly, "警告"
      Text1.Text = ""
    End If
    Label2.Caption = ""
End Sub

Private Sub Command3_Click()
Unload Me
End Sub

Private Sub Form_Load()
Command2.Visible = False
Label2.Caption = "请先输入要删除的用户名!"
End Sub

⌨️ 快捷键说明

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