tianjiaYH.frm
上传用户:linhua1013
上传日期:2014-12-05
资源大小:375k
文件大小:5k
源码类别:

SQL Server

开发平台:

Visual Basic

  1. VERSION 5.00
  2. Begin VB.Form tianjiaYH 
  3.    Caption         =   "添加用户"
  4.    ClientHeight    =   3330
  5.    ClientLeft      =   60
  6.    ClientTop       =   450
  7.    ClientWidth     =   4665
  8.    LinkTopic       =   "Form1"
  9.    LockControls    =   -1  'True
  10.    MDIChild        =   -1  'True
  11.    ScaleHeight     =   3330
  12.    ScaleWidth      =   4665
  13.    Begin VB.CommandButton Command2 
  14.       Caption         =   "取   消"
  15.       Height          =   375
  16.       Left            =   2880
  17.       TabIndex        =   11
  18.       Top             =   2880
  19.       Width           =   1095
  20.    End
  21.    Begin VB.CommandButton Command1 
  22.       Caption         =   "确   定"
  23.       Height          =   375
  24.       Left            =   720
  25.       TabIndex        =   10
  26.       Top             =   2880
  27.       Width           =   1095
  28.    End
  29.    Begin VB.PictureBox Picture1 
  30.       Height          =   1935
  31.       Left            =   0
  32.       ScaleHeight     =   1875
  33.       ScaleWidth      =   4575
  34.       TabIndex        =   1
  35.       Top             =   840
  36.       Width           =   4630
  37.       Begin VB.ComboBox YHqx 
  38.          Height          =   300
  39.          ItemData        =   "tianjiaYH.frx":0000
  40.          Left            =   1920
  41.          List            =   "tianjiaYH.frx":000A
  42.          TabIndex        =   9
  43.          Text            =   "管理员"
  44.          Top             =   1440
  45.          Width           =   1600
  46.       End
  47.       Begin VB.TextBox QDmima 
  48.          Height          =   270
  49.          Left            =   1920
  50.          TabIndex        =   7
  51.          Top             =   1000
  52.          Width           =   1575
  53.       End
  54.       Begin VB.TextBox YHmima 
  55.          Height          =   270
  56.          Left            =   1920
  57.          TabIndex        =   5
  58.          Top             =   600
  59.          Width           =   1575
  60.       End
  61.       Begin VB.TextBox YHming 
  62.          Height          =   270
  63.          Left            =   1920
  64.          TabIndex        =   3
  65.          Top             =   200
  66.          Width           =   1575
  67.       End
  68.       Begin VB.Label Label5 
  69.          AutoSize        =   -1  'True
  70.          Caption         =   "权限设置:"
  71.          Height          =   180
  72.          Left            =   900
  73.          TabIndex        =   8
  74.          Top             =   1500
  75.          Width           =   900
  76.       End
  77.       Begin VB.Label Label4 
  78.          AutoSize        =   -1  'True
  79.          Caption         =   "确定密码:"
  80.          Height          =   180
  81.          Left            =   900
  82.          TabIndex        =   6
  83.          Top             =   1080
  84.          Width           =   900
  85.       End
  86.       Begin VB.Label Label3 
  87.          Caption         =   "密  码:"
  88.          Height          =   255
  89.          Left            =   960
  90.          TabIndex        =   4
  91.          Top             =   650
  92.          Width           =   735
  93.       End
  94.       Begin VB.Label Label1 
  95.          AutoSize        =   -1  'True
  96.          Caption         =   "用户名:"
  97.          Height          =   180
  98.          Left            =   960
  99.          TabIndex        =   2
  100.          Top             =   240
  101.          Width           =   720
  102.       End
  103.    End
  104.    Begin VB.Label Label2 
  105.       AutoSize        =   -1  'True
  106.       Caption         =   "公 司 人 事 管 理 系 统"
  107.       BeginProperty Font 
  108.          Name            =   "华文彩云"
  109.          Size            =   21.75
  110.          Charset         =   134
  111.          Weight          =   400
  112.          Underline       =   0   'False
  113.          Italic          =   0   'False
  114.          Strikethrough   =   0   'False
  115.       EndProperty
  116.       ForeColor       =   &H00C0C000&
  117.       Height          =   450
  118.       Left            =   240
  119.       TabIndex        =   0
  120.       Top             =   240
  121.       Width           =   4215
  122.    End
  123. End
  124. Attribute VB_Name = "tianjiaYH"
  125. Attribute VB_GlobalNameSpace = False
  126. Attribute VB_Creatable = False
  127. Attribute VB_PredeclaredId = True
  128. Attribute VB_Exposed = False
  129. Private Sub Command1_Click()
  130.   If YHming.Text = "" Or YHmima.Text = "" Or YHqx.Text = "" Then
  131.      MsgBox "用户名、密码、用户权限缺一不可,先仔细填写完整!", , "温馨提示"
  132.   Else
  133.      If YHmima.Text <> QDmima.Text Then
  134.         MsgBox "两次输入密码不一致,请仔细检查,并记好准确密码!", , "温馨提示"
  135.      Else
  136.         QD = MsgBox("确定添加这个用户么?", 64 + 4, "温馨提示")
  137.         If QD = 6 Then
  138.            TJyonghu.AddNew
  139.            TJyonghu.Fields(0) = Trim(YHming.Text)
  140.            TJyonghu.Fields(1) = Trim(YHmima.Text)
  141.            TJyonghu.Fields(2) = Trim(YHqx.Text)
  142.            TJyonghu.Update
  143.            MsgBox "成功添加一个用户" + vbCrLf + "用户名:" + YHming.Text + vbCrLf + "密码:" + YHmima.Text + vbCrLf + "权限:" + YHqx.Text + vbCrLf + "请妥善保存密码!", , "温馨提示"
  144.         Else
  145.            YHming.Text = ""
  146.            YHmima.Text = ""
  147.            YHqx.Text = ""
  148.            QDmima.Text = ""
  149.         End If
  150.      End If
  151.  End If
  152. End Sub
  153. Private Sub Command2_Click()
  154.   Unload Me
  155. End Sub
  156. Private Sub Form_Load()
  157.   Me.Height = 3840
  158.   Me.Width = 4785
  159.   MsgBox "设置权限时请慎重考虑!", , "温馨提示"
  160.   If TJyonghu.State = adStateOpen Then TJyonghu.Close
  161.   TJyonghu.Open "userDL", MySQL, adOpenKeyset, adLockPessimistic
  162. End Sub
  163. Private Sub Form_Unload(Cancel As Integer)
  164.   Set TJyonghu = Nothing
  165. End Sub