ms
This commit is contained in:
@@ -56,6 +56,7 @@ Public Class ClassControlCreator
|
||||
Public Guid As Integer
|
||||
Public AttrID As Integer
|
||||
Public DependingAttrID As Integer
|
||||
Public Multiselect As Boolean
|
||||
Public AttrTitle As String
|
||||
Public AttrType As String
|
||||
Public SourceSQL As String
|
||||
@@ -95,9 +96,9 @@ Public Class ClassControlCreator
|
||||
oSourceSQL = oSourceSQL.Replace("@pUSER_ID", My.Application.User.UserId)
|
||||
oSourceSQL = oSourceSQL.Replace("@RESULT_TITLE", pAttributeRow.Item("ATTRIBUTE_TITLE").ToString)
|
||||
Dim oDTSource As DataTable
|
||||
If pAttributeRow.Item("DEPENDING_ATTRIBUTE1") = 0 Then
|
||||
oDTSource = My.Database_IDB.GetDatatable(oSourceSQL)
|
||||
End If
|
||||
'If pAttributeRow.Item("DEPENDING_ATTRIBUTE1") = 0 Then
|
||||
oDTSource = My.Database_IDB.GetDatatable(oSourceSQL)
|
||||
'End If
|
||||
|
||||
Dim oMinValue As String = ""
|
||||
Dim oMaxValue As String = ""
|
||||
@@ -109,17 +110,18 @@ Public Class ClassControlCreator
|
||||
Dim omyclass = New ControlMetadata() With {
|
||||
.Guid = CType(pAttributeRow.Item("GUID"), Integer),
|
||||
.AttrID = CType(pAttributeRow.Item("ATTRIBUTE_ID"), Integer),
|
||||
.DependingAttrID = CType(pAttributeRow.Item("DEPENDING_ATTRIBUTE1"), Integer),
|
||||
.DTSource = CType(oDTSource, DataTable),
|
||||
.AttrTitle = CType(pAttributeRow.Item("ATTRIBUTE_TITLE"), String),
|
||||
.Multiselect = CType(pAttributeRow.Item("MULTISELECT"), Boolean),
|
||||
.SourceSQL = oSourceSQL,
|
||||
.MinValue = oMinValue,
|
||||
.MaxValue = oMaxValue
|
||||
}
|
||||
If CInt(pAttributeRow.Item("DEPENDING_ATTRIBUTE1")) <> 0 Then
|
||||
omyclass.DTSource = Nothing
|
||||
Else
|
||||
omyclass.DTSource = CType(oDTSource, DataTable)
|
||||
End If
|
||||
' If CInt(pAttributeRow.Item("DEPENDING_ATTRIBUTE1")) <> 0 Then
|
||||
' omyclass.DTSource = Nothing
|
||||
'' Else
|
||||
' omyclass.DTSource = CType(oDTSource, DataTable)
|
||||
' End If
|
||||
ctrl.Tag = omyclass
|
||||
ctrl.Name = props.Name
|
||||
ctrl.Location = props.Location
|
||||
@@ -196,6 +198,11 @@ Public Class ClassControlCreator
|
||||
oView.OptionsView.ShowAutoFilterRow = True
|
||||
oView.OptionsView.EnableAppearanceEvenRow = True
|
||||
oMyNewGridControl.Size = New Size(CInt(pAttributeRow.Item("WIDTH")), CInt(pAttributeRow.Item("HEIGHT")))
|
||||
If CType(pAttributeRow.Item("MULTISELECT"), Boolean) Then
|
||||
oView.OptionsSelection.MultiSelect = True
|
||||
oView.OptionsSelection.MultiSelectMode = GridMultiSelectMode.CheckBoxRowSelect
|
||||
oMyNewGridControl.Size = New Size(CInt(pAttributeRow.Item("WIDTH") + 50), CInt(pAttributeRow.Item("HEIGHT")))
|
||||
End If
|
||||
|
||||
' Add and configure navigator to delete rows
|
||||
oMyNewGridControl.UseEmbeddedNavigator = True
|
||||
|
||||
Reference in New Issue
Block a user