?? newequipment.cls
字號(hào):
VERSION 1.0 CLASS
BEGIN
MultiUse = -1 'True
Persistable = 0 'NotPersistable
DataBindingBehavior = 0 'vbNone
DataSourceBehavior = 0 'vbNone
MTSTransactionMode = 0 'NotAnMTSObject
END
Attribute VB_Name = "newequipment"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = False
Option Explicit
Private mnid As Integer
Private mname As String
Private mconfigid As Integer
Private mbuytime As Date
Private mbrand As String
Private mvalue As Currency
Private mccount As Integer
Private mstoreid As String
Private mbargainor As String
Private msafttime As Double
Private mlinkman As String
Private mtel As String
Private mmemo As String
Public Property Get nid() As Integer
nid = mnid
End Property
Public Property Let nid(ByVal nid As Integer)
mnid = nid
End Property
Public Property Get name() As String
name = mname
End Property
Public Property Let name(ByVal name As String)
mname = name
End Property
Public Property Get configid() As Integer
configid = mconfigid
End Property
Public Property Let configid(ByVal configid As Integer)
mconfigid = configid
End Property
Public Property Get buytime() As Date
buytime = mbuytime
End Property
Public Property Let buytime(ByVal buytime As Date)
mbuytime = buytime
End Property
Public Property Get brand() As String
brand = mbrand
End Property
Public Property Let brand(ByVal brand As String)
mbrand = brand
End Property
Public Property Get value() As Currency
value = mvalue
End Property
Public Property Let value(ByVal value As Currency)
mvalue = value
End Property
Public Property Get ccount() As Integer
ccount = mccount
End Property
Public Property Let ccount(ByVal ccount As Integer)
mccount = ccount
End Property
Public Property Get storeid() As String
storeid = mstoreid
End Property
Public Property Let storeid(ByVal storeid As String)
mstoreid = storeid
End Property
Public Property Get bargainor() As String
bargainor = mbargainor
End Property
Public Property Let bargainor(ByVal bargainor As String)
mbargainor = bargainor
End Property
Public Property Get safttime() As Double
safttime = msafttime
End Property
Public Property Let safttime(ByVal safttime As Double)
msafttime = safttime
End Property
Public Property Get linkman() As String
linkman = mlinkman
End Property
Public Property Let linkman(ByVal linkman As String)
mlinkman = linkman
End Property
Public Property Get tel() As String
tel = mtel
End Property
Public Property Let tel(ByVal tel As String)
mtel = tel
End Property
Public Property Get memo() As String
memo = mmemo
End Property
Public Property Let memo(ByVal memo As String)
mmemo = memo
End Property
Public Sub Class_Initialize()
name = ""
configid = 0
buytime = #1/1/1900#
brand = ""
value = 0
ccount = 0
storeid = ""
bargainor = ""
safttime = 0
linkman = ""
tel = ""
memo = ""
End Sub
Public Sub Insert()
Connect "w"
sqlstr = "newequipment"
rs.Open sqlstr
rs.AddNew
rs.Fields("name") = name
rs.Fields("configid") = configid
rs.Fields("buytime") = buytime
rs.Fields("brand") = brand
rs.Fields("value") = value
rs.Fields("ccount") = ccount
rs.Fields("storeid") = storeid
rs.Fields("bargainor") = bargainor
rs.Fields("safttime") = safttime
rs.Fields("linkman") = linkman
rs.Fields("tel") = tel
rs.Fields("memo") = memo
rs.Update
Disconnect
MsgBox "新設(shè)備添加成功"
End Sub
Public Sub Query()
Connect "r"
sqlstr = "select * from newequipment where nid=" & nid
rs.Open sqlstr
name = rs.Fields("name")
configid = rs.Fields("configid")
buytime = rs.Fields("buytime")
brand = rs.Fields("brand")
value = rs.Fields("value")
ccount = rs.Fields("ccount")
storeid = rs.Fields("storeid")
bargainor = rs.Fields("bargainor")
safttime = rs.Fields("safttime")
linkman = rs.Fields("linkman")
tel = rs.Fields("tel")
memo = rs.Fields("memo")
Disconnect
End Sub
Public Sub Modify()
Connect "w"
sqlstr = "select * from newequipment where nid=" & nid
rs.Open sqlstr
rs.Fields("name") = name
rs.Fields("configid") = configid
rs.Fields("buytime") = buytime
rs.Fields("brand") = brand
rs.Fields("value") = value
rs.Fields("ccount") = ccount
rs.Fields("storeid") = storeid
rs.Fields("bargainor") = bargainor
rs.Fields("safttime") = safttime
rs.Fields("linkman") = linkman
rs.Fields("tel") = tel
rs.Fields("memo") = memo
rs.Update
Disconnect
MsgBox "數(shù)據(jù)修改成功"
End Sub
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -