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

📄 wh_renyuan.frm

📁 小型医院管理
💻 FRM
字号:
VERSION 5.00
Begin VB.Form wh_renyuan 
   BorderStyle     =   1  'Fixed Single
   Caption         =   "齐英天肛肠医院综合信息管理系统"
   ClientHeight    =   4185
   ClientLeft      =   45
   ClientTop       =   330
   ClientWidth     =   4635
   Icon            =   "wh_renyuan.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   4185
   ScaleWidth      =   4635
   StartUpPosition =   2  '屏幕中心
   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            =   2400
      TabIndex        =   10
      Top             =   3480
      Width           =   1095
   End
   Begin VB.CommandButton Command1 
      Caption         =   "确   定"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   840
      TabIndex        =   9
      Top             =   3480
      Width           =   1095
   End
   Begin VB.Frame Frame1 
      Caption         =   "人员添加"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   3015
      Left            =   240
      TabIndex        =   5
      Top             =   240
      Width           =   4095
      Begin VB.TextBox bianma 
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   10.5
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   375
         Left            =   1200
         TabIndex        =   12
         Top             =   2040
         Width           =   2295
      End
      Begin VB.ComboBox v_bumen 
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   10.5
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   330
         ItemData        =   "wh_renyuan.frx":0BC2
         Left            =   1200
         List            =   "wh_renyuan.frx":0BCF
         TabIndex        =   2
         Top             =   1440
         Width           =   2295
      End
      Begin VB.OptionButton Option2 
         Caption         =   "管理用户"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   10.5
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   255
         Left            =   1800
         TabIndex        =   4
         Top             =   2640
         Width           =   1215
      End
      Begin VB.OptionButton Option1 
         Caption         =   "一般员工"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   10.5
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   255
         Left            =   360
         TabIndex        =   3
         Top             =   2640
         Value           =   -1  'True
         Width           =   1335
      End
      Begin VB.TextBox v_password 
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   10.5
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   375
         Left            =   1200
         TabIndex        =   1
         Top             =   840
         Width           =   2295
      End
      Begin VB.TextBox v_name 
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   10.5
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   375
         Left            =   1200
         TabIndex        =   0
         Top             =   240
         Width           =   2295
      End
      Begin VB.Label Label4 
         AutoSize        =   -1  'True
         Caption         =   "编   码"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   10.5
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   210
         Left            =   240
         TabIndex        =   11
         Top             =   2160
         Width           =   735
      End
      Begin VB.Label Label3 
         AutoSize        =   -1  'True
         Caption         =   "部   门"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   10.5
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   210
         Left            =   240
         TabIndex        =   8
         Top             =   1560
         Width           =   735
      End
      Begin VB.Label Label2 
         AutoSize        =   -1  'True
         Caption         =   "密   码"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   10.5
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   210
         Left            =   240
         TabIndex        =   7
         Top             =   960
         Width           =   735
      End
      Begin VB.Label Label1 
         AutoSize        =   -1  'True
         Caption         =   "姓   名"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   10.5
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   210
         Left            =   240
         TabIndex        =   6
         Top             =   360
         Width           =   735
      End
   End
End
Attribute VB_Name = "wh_renyuan"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
b1 = MsgBox("您确实继续吗?", vbOKCancel, "系统提示!")
If b1 = 1 Then




Dim v_name1 As String
Dim v_ma1 As String
Dim v_bumen1 As String
Dim v_quanxian1 As String




v_name1 = Trim(v_name.Text)
v_ma1 = Trim(v_password.Text)
v_bumen1 = Trim(v_bumen.Text)





'密码的唯一性################################
  
  
  Dim rs1 As New ADODB.Recordset
  Dim sql1 As String
  sql1 = "select * from 人名 where 密码='" + Trim(v_ma1) + "'"
  rs1.Open sql1, db
  
  If Not rs1.EOF Then
    a = MsgBox("密码发生冲突,请重新更换密码!", vbQuestion, "系统提示!")
    v_password.SetFocus
    Exit Sub
  End If
  
  
  
  
  '编码的唯一性###############################


 
  Dim rs11 As New ADODB.Recordset
  Dim sql11 As String
  sql11 = "select * from 人名 where 编码='" + Trim(bianma.Text) + "'"
  rs11.Open sql11, db
  
  If Not rs11.EOF Then
    a = MsgBox("编码发生冲突,请重新更换编码!", vbQuestion, "系统提示!")
    bianma.SetFocus
    Exit Sub
  End If














If Option1.Value = True Then
v_quanxian1 = "0"
End If

If Option2.Value = True Then
v_quanxian1 = "1"
End If




If v_name1 = "" Then
b1 = MsgBox("警告,姓名不能为空值!", vbQuestion, "系统提示!")
v_name.SetFocus
Exit Sub
End If



If v_ma1 = "" Then
b1 = MsgBox("警告,密码不能为空值!", vbQuestion, "系统提示!")
v_password.SetFocus
Exit Sub
End If


If v_bumen1 = "" Then
b1 = MsgBox("警告,密码不能为空值!", vbQuestion, "系统提示!")
v_password.SetFocus
Exit Sub
End If


If bianma.Text = "" Then
b1 = MsgBox("警告,编码不能为空值!", vbQuestion, "系统提示!")
bianma.SetFocus
Exit Sub
End If



Dim sql As String
Dim rs As New ADODB.Recordset

sql = "insert into 人名(姓名,密码,部门,权限,编码) values ('" + v_name1 + "','" + v_ma1 + "','" + v_bumen1 + "','" + v_quanxian1 + "','" + bianma.Text + "')"
rs.Open sql, db
b1 = MsgBox("恭喜,数据输入成功!", vbInformation, "系统提示!")
Exit Sub

End If
End Sub

Private Sub Command2_Click()
Unload Me
End Sub

⌨️ 快捷键说明

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