Chat etc.
This commit is contained in:
45
Dokumentation/Drucken/frmColumnsPrint.vb
Normal file
45
Dokumentation/Drucken/frmColumnsPrint.vb
Normal file
@@ -0,0 +1,45 @@
|
||||
Public Class frmColumnsPrint
|
||||
Public DS As DataSet
|
||||
|
||||
Private Sub frmColumnsPrint_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
FillPanel()
|
||||
End Sub
|
||||
|
||||
Function FillPanel()
|
||||
Dim dt As DataTable = Class1.OrderDataTableby(DS.Tables(0), "HOST ASC")
|
||||
Dim i As Integer = 0
|
||||
For Each ch As DataColumn In dt.Columns
|
||||
|
||||
Dim uscol As New uscntr_Columns
|
||||
uscol.Label1.Text = ch.ToString
|
||||
uscol.Location = New Point(0, i * uscol.Height)
|
||||
Panel2.Controls.Add(uscol)
|
||||
i = i + 1
|
||||
Next
|
||||
End Function
|
||||
|
||||
Private Sub btnAlleDeaktivieren_Click(sender As Object, e As EventArgs) Handles btnAlleDeaktivieren.Click
|
||||
For Each uscol As uscntr_Columns In Panel2.Controls
|
||||
uscol.BackColor = Color.Red
|
||||
Next
|
||||
End Sub
|
||||
|
||||
Private Sub btnAlleAktivieren_Click(sender As Object, e As EventArgs) Handles btnAlleAktivieren.Click
|
||||
For Each uscol As uscntr_Columns In Panel2.Controls
|
||||
uscol.BackColor = Color.LightGreen
|
||||
Next
|
||||
End Sub
|
||||
|
||||
Private Sub CmdPrint_Click(sender As Object, e As EventArgs) Handles CmdPrint.Click
|
||||
Dim dswork As DataSet = DS.Copy()
|
||||
For Each uscol As uscntr_Columns In Panel2.Controls
|
||||
If uscol.BackColor = Color.Red Then
|
||||
dswork.Tables(0).Columns.Remove(uscol.Label1.Text)
|
||||
End If
|
||||
Next
|
||||
Dim PrintAR As New frmPrintActiveReports
|
||||
PrintAR.dt = dswork.Tables(0)
|
||||
PrintAR.DruckArt = "Manuell"
|
||||
PrintAR.Show()
|
||||
End Sub
|
||||
End Class
|
||||
Reference in New Issue
Block a user