MultiTool/MultiTool.Common/Templates/TemplateConfigItem.vb
2022-04-06 14:55:15 +02:00

59 lines
1.7 KiB
VB.net

Imports MultiTool.Common.Constants
Imports DigitalData.Modules.Language
Namespace Templates
Public Class TemplateConfigItem
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 [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