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

📄 tinventor.cls

📁 汽车维修管理软件。其中包含三个编辑控件。
💻 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 = "TInventor"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = False
Attribute VB_Ext_KEY = "SavedWithClassBuilder6" ,"Yes"
Attribute VB_Ext_KEY = "Top_Level" ,"Yes"
'保持属性值的局部变量
Private m_Id As Long '局部复制
Private m_Code As String '局部复制
Private m_InventorName As String '局部复制
Private m_Unit As String '局部复制
Private m_InventorType As Long '局部复制
Private m_IsChange As Boolean
Public Function FindAsId(ByVal pId As Long) As Boolean
Dim re As ADODB.Recordset
Set re = SQLFind(CStr(pId), "Inventory", "AutoId", FT_NUMBER)
If re.BOF And re.EOF Then
   FindAsId = False
   Exit Function
End If
m_Id = re.Fields(0).Value
m_Code = re.Fields(1).Value
m_InventorName = re.Fields(2).Value
m_Unit = re.Fields(3).Value
m_InventorType = re.Fields(4).Value
m_IsChange = True
Set re = Nothing
FindAsId = True
End Function

Public Function Find(ByRef pFindString As String, ByVal pFindType As FindType) As Boolean
Dim re As ADODB.Recordset
Select Case pFindType
   Case FindType.Find_From_Code
        Set re = SQLFind(pFindString, "Inventory", "Code", FT_CHAR)
   Case FindType.Find_From_Name
        Set re = SQLFind(pFindString, "Inventory", "Name", FT_CHAR)
End Select
If re.BOF And re.EOF Then
   Find = False
   Exit Function
End If
m_Id = re.Fields(0).Value
m_Code = re.Fields(1).Value
m_InventorName = re.Fields(2).Value
m_Unit = re.Fields(3).Value
m_InventorType = re.Fields(4).Value

m_IsChange = True
Set re = Nothing
Find = True
End Function

'Public Property Let InventorType(ByVal vData As Long)
'm_InventorType = vData
'End Property
Public Property Get IsChange() As Boolean
IsChange = m_IsChange
End Property

Public Property Get InventorType() As Long
InventorType = m_InventorType
End Property



'Public Property Let Unit(ByVal vData As String)
'm_Unit = vData
'End Property


Public Property Get Unit() As String
Unit = m_Unit
End Property



'Public Property Let InventorName(ByVal vData As String)
'm_InventorName = vData
'End Property


Public Property Get InventorName() As String
InventorName = m_InventorName
End Property



'Public Property Let Code(ByVal vData As String)
'm_Code = vData
'End Property


Public Property Get Code() As String
Code = m_Code
End Property



'Public Property Let Id(ByVal vData As Long)
'm_Id = vData
'End Property


Public Property Get Id() As Long
Id = m_Id
End Property



Private Sub Class_Initialize()
ClearData
End Sub
Public Sub ClearData()
m_Id = -1
m_Code = vbNullString
m_InventorName = vbNullString
m_Unit = vbNullString
m_InventorType = -1
m_IsChange = False
End Sub

⌨️ 快捷键说明

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