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

📄 cuser.cls

📁 一个vb编的计算机机房管理系统
💻 CLS
字号:
VERSION 1.0 CLASS
BEGIN
  MultiUse = -1  'True
  Persistable = 0  'NotPersistable
  DataBindingBehavior = 0  'vbNone
  DataSourceBehavior  = 0  'vbNone
  MTSTransactionMode  = 0  'NotAnMTSObject
END
Attribute VB_Name = "cuser"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = False
Option Explicit
Private muid As String
Private muname As String
Private mpwd As String
Private mbalance As Currency
Private mctype As String

Property Get uid() As String
uid = muid
End Property
Property Let uid(ByVal uid As String)
muid = uid
End Property
Property Get uname() As String
uname = muname
End Property
Property Let uname(ByVal uname As String)
muname = uname
End Property
Property Get pwd() As String
pwd = mpwd
End Property
Property Let pwd(ByVal pwd As String)
mpwd = pwd
End Property
Property Get balance() As Currency
balance = mbalance
End Property
Property Let balance(ByVal balance As Currency)
mbalance = balance
End Property
Property Get ctype() As String
ctype = mctype
End Property
Property Let ctype(ByVal ctype As String)
mctype = ctype
End Property

Public Sub Insert()
Connect "w"
sqlstr = "select uid from cuser where uid='" & uid & "'"
rs.Open sqlstr
If rs.EOF Then
 rs.AddNew
 rs.Fields("uid") = uid
 rs.Fields("uname") = uname
 rs.Fields("pwd") = pwd
 rs.Fields("balance") = balance
 rs.Fields("ctype") = ctype
 rs.Update
Else
 MsgBox "编号为" & uid & "的人员数据已经在数据库中"
 Disconnect
 Exit Sub
End If
Disconnect
End Sub

⌨️ 快捷键说明

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