Rename TemplateConfigItem to FieldConfig
This commit is contained in:
60
MultiTool.Common/Templates/FieldConfig.vb
Normal file
60
MultiTool.Common/Templates/FieldConfig.vb
Normal file
@@ -0,0 +1,60 @@
|
||||
Imports MultiTool.Common.Constants
|
||||
Imports DigitalData.Modules.Language
|
||||
|
||||
Namespace Templates
|
||||
Public Class FieldConfig
|
||||
Public Property Name As String
|
||||
Public Property Table As String
|
||||
Public Property Type As ColumnType
|
||||
Public Property Template As String
|
||||
Public Property OrderKey As Integer
|
||||
|
||||
Public Property IsHead As Boolean
|
||||
Public Property IsReadOnly As Boolean
|
||||
Public Property IsVisible As Boolean
|
||||
Public Property IsRequired As Boolean
|
||||
Public Property IsVirtual As Boolean
|
||||
Public Property PreferExternalValue As Boolean
|
||||
|
||||
Public Property [Function] As ColumnFunction
|
||||
|
||||
Public ReadOnly Property FunctionName As String
|
||||
Get
|
||||
Return Utils.NotNull([Function]?.Name, String.Empty)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property FunctionParams As String
|
||||
Get
|
||||
Return Utils.NotNull([Function]?.Params, String.Empty)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Class ColumnFunction
|
||||
Public Id As XmlFunction
|
||||
Public Name As String
|
||||
Public Params As String
|
||||
End Class
|
||||
|
||||
Public Shared Function ConvertType(pType As String) As ColumnType
|
||||
Select Case pType
|
||||
Case DB_TYPE_DATE
|
||||
Return ColumnType.Date
|
||||
|
||||
Case DB_TYPE_DECIMAL
|
||||
Return ColumnType.Date
|
||||
|
||||
Case DB_TYPE_BOOLEAN
|
||||
Return ColumnType.Boolean
|
||||
|
||||
Case DB_TYPE_INTEGER
|
||||
Return ColumnType.Integer
|
||||
|
||||
Case Else
|
||||
Return ColumnType.String
|
||||
End Select
|
||||
End Function
|
||||
|
||||
End Class
|
||||
|
||||
End Namespace
|
||||
Reference in New Issue
Block a user