107 lines
3.5 KiB
Plaintext
107 lines
3.5 KiB
Plaintext
' SetExportWinLineDoc_TableContent
|
|
' ----------------------------------------------------------------------------
|
|
' Diese Subroutine füllt eine Tabelle (Grid) mit Daten
|
|
' Parameter 1 (LEVEL) = Das aktuelle Showlevel übergeben.
|
|
' Parameter 2 (GRID) = Falls mehrere Grids auf einem Level vorkommen, kann über diesen Parameter nochmals unterscheiden werden.
|
|
'
|
|
' ----------------------------------------------------------------------------
|
|
' Copyright (c) 2021 by Digital Data GmbH
|
|
'
|
|
' Digital Data GmbH • Ludwig-Rinn-Strasse 16 • D-35452 Heuchelheim
|
|
' Tel.: 0641/202360 • E-Mail: info-flow@digitaldata.works
|
|
' ----------------------------------------------------------------------------
|
|
' Creation Date / Author: 07.07.2021 / MK
|
|
' Version Date / Editor: 07.07.2021 / MK
|
|
' Version Number: 1.0.0.0
|
|
|
|
Sub SetExportWinLineDoc_TableContent(LEVEL,GRID)
|
|
|
|
If (LEVEL = 1) or (LEVEL = "1") Then
|
|
|
|
If (GRID = LEVEL1_GRID_ID) Then
|
|
|
|
LEVEL1_Grid.Clear
|
|
LEVEL1_Grid.InitUserGrid
|
|
LEVEL1_Grid.Header
|
|
|
|
Set SQLResult_Profiles = Conn.Select(SQLQuery_Profiles)
|
|
If (SQLResult_Profiles.RowCount) > 0 Then
|
|
|
|
LEVEL1_Grid.IsRedraw = False
|
|
|
|
'Fill left Frame / Table
|
|
If (SQLResult_Profiles.RowCount > 0) Then
|
|
Do
|
|
CWLCurrentWindow.ActiveWindow.Vars.Value(495,0) = cint(SQLResult_Profiles.value("u000"))
|
|
CWLCurrentWindow.ActiveWindow.Vars.Value(495,1) = cstr(SQLResult_Profiles.value("u001"))
|
|
CWLCurrentWindow.ActiveWindow.Vars.Value(495,2) = cstr(SQLResult_Profiles.value("u002"))
|
|
CWLCurrentWindow.ActiveWindow.Vars.Value(495,3) = cstr(SQLResult_Profiles.value("u003"))
|
|
|
|
LEVEL1_Grid.AddLine()
|
|
|
|
'Trick it, because rowcount wont work
|
|
If (SQLResult_Profiles.NextRecord = False) Then
|
|
Exit Do
|
|
End If
|
|
Loop
|
|
End If
|
|
|
|
LEVEL1_Grid.IsRedraw = True
|
|
|
|
'Show count down below the table
|
|
LEVEL1_TXT_TabelCounter.Contents = (Cstr(LEVEL1_Grid.LineCount) & " Zuordnungen gefunden")
|
|
|
|
'Set focus for the fist call, so ribbon buttons will work well (eg. NEW)
|
|
MacroCommands.MSetFieldFocus MAIN_WINDOW_ID,LEVEL1_GRID_ID
|
|
|
|
End If
|
|
|
|
End If
|
|
|
|
'------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
|
|
|
ElseIf (LEVEL = 2) or (LEVEL = "2") Then
|
|
|
|
If (GRID = LEVEL2_GRID_ID) Then
|
|
|
|
LEVEL2_Grid.Clear
|
|
LEVEL2_Grid.InitUserGrid
|
|
LEVEL2_Grid.Header
|
|
|
|
Set SQLResult_Configs = Conn.Select(SQLQuery_Configs)
|
|
If (SQLResult_Configs.RowCount) > 0 Then
|
|
|
|
LEVEL2_Grid.IsRedraw = False
|
|
|
|
'Fill left Frame / Table
|
|
If (SQLResult_Configs.RowCount > 0) Then
|
|
Do
|
|
CWLCurrentWindow.ActiveWindow.Vars.Value(495,50) = cint(SQLResult_Configs.value("u000"))
|
|
CWLCurrentWindow.ActiveWindow.Vars.Value(495,51) = cstr(SQLResult_Configs.value("u001"))
|
|
CWLCurrentWindow.ActiveWindow.Vars.Value(495,52) = cstr(SQLResult_Configs.value("u002"))
|
|
CWLCurrentWindow.ActiveWindow.Vars.Value(495,53) = cstr(SQLResult_Configs.value("u003"))
|
|
|
|
LEVEL2_Grid.AddLine()
|
|
|
|
'Trick it, because rowcount wont work
|
|
If (SQLResult_Configs.NextRecord = False) Then
|
|
Exit Do
|
|
End If
|
|
Loop
|
|
End If
|
|
|
|
LEVEL2_Grid.IsRedraw = True
|
|
|
|
'Show count down the table
|
|
LEVEL2_TXT_TabelCounter.Contents = (Cstr(LEVEL2_Grid.LineCount) & " Zuordnungen gefunden")
|
|
|
|
'Set focus for the fist call, so ribbon buttons will work well (eg. NEW)
|
|
MacroCommands.MSetFieldFocus MAIN_WINDOW_ID,LEVEL2_GRID_ID
|
|
|
|
End If
|
|
|
|
End If
|
|
|
|
End if
|
|
|
|
End Sub |