📄 cfield.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 = "CField"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = False
Option Explicit
Public FieldName As String
Public FieldNameC As String
Public TableName As String
Public TableNameC As String
Public DataType As Integer
Public Function IsEmpty() As Boolean
'判断此类是否初始化
If Trim(FieldName & "") = "" Then
IsEmpty = True
Else
IsEmpty = False
End If
End Function
Public Function GetFullName(Optional iType As Integer = 0) As String
'取字段的全名
'iType=0 英文字段名 1 中文字段名
If iType = 0 Then
GetFullName = TableName & "." & FieldName
Else
GetFullName = TableNameC & "." & FieldNameC
End If
End Function
Public Function Include(s As String) As Boolean
'判断名称s是此字段
If UCase(s) = UCase(FieldName) Or UCase(s) = UCase(FieldNameC) Or UCase(s) = UCase(GetFullName) Or UCase(s) = UCase(GetFullName(1)) Then
Include = True
Else
Include = False
End If
End Function
Public Function NewCByValue(sName As String, sNameC As String, sTableName As String, iDataType As Integer)
FieldName = sName
FieldNameC = sNameC
TableName = sTableName
TableNameC = GetTableNameC(sTableName)
DataType = iDataType
End Function
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -