26 lines
796 B
VB.net
26 lines
796 B
VB.net
|
|
Imports MultiTool.Common.Winline
|
|
|
|
Namespace Templates
|
|
''' <summary>
|
|
''' Class for loading column/field config from database
|
|
''' </summary>
|
|
Public Class TemplateConfig
|
|
Public Property Items As List(Of FieldConfig)
|
|
|
|
Public ReadOnly Property SqlItems As List(Of FieldConfig)
|
|
Get
|
|
Return Items.
|
|
Where(Function(item) item.Functions.Any(Function(f) f.Name = Constants.FUNCTION_SQL)).
|
|
ToList()
|
|
End Get
|
|
End Property
|
|
|
|
Public Function GetColumn(pName As String, pTable As String) As FieldConfig
|
|
Return Items.
|
|
Where(Function(c) c.Name = pName And c.Table = pTable).
|
|
FirstOrDefault()
|
|
End Function
|
|
End Class
|
|
End Namespace
|