99 lines
2.9 KiB
VB.net
99 lines
2.9 KiB
VB.net
Imports Gemeinsames
|
|
Imports VERAG_PROG_ALLGEMEIN
|
|
|
|
Public Class usrctlMAUebersicht
|
|
|
|
|
|
Dim SQL As New Statistik
|
|
|
|
Sub init()
|
|
DataGridView1.Rows.Clear()
|
|
DataGridView1.Columns(0).Visible = False
|
|
Dim listMaAVG As List(Of listMaAVG) = SQL.getAVGMa(CDate(datStatVon.Value.ToShortDateString), CDate(datStatBis.Value.ToShortDateString), txtMin.Text, txtMax.Text)
|
|
If Not listMaAVG Is Nothing Then
|
|
For Each l In listMaAVG
|
|
DataGridView1.Rows.Add(l.mit_id, l.mit_name, l.mit_avg, l.mit_count)
|
|
Next
|
|
End If
|
|
End Sub
|
|
|
|
Private Sub Panel1_Paint() 'sender As Object, e As PaintEventArgs) Handles Panel1.Paint
|
|
Panel1.Controls.Clear()
|
|
|
|
|
|
Dim t As New TableLayoutPanel
|
|
Panel1.Controls.Add(t)
|
|
Panel1.Width = 800
|
|
Panel1.Height = 500
|
|
Panel1.BorderStyle = BorderStyle.FixedSingle
|
|
|
|
|
|
t.Width = 800
|
|
t.CellBorderStyle = TableLayoutPanelCellBorderStyle.Single
|
|
|
|
t.AutoScroll = True
|
|
t.AutoSize = True
|
|
t.AutoSizeMode = AutoSizeMode.GrowAndShrink
|
|
|
|
|
|
t.Dock = DockStyle.Fill
|
|
|
|
t.Controls.Clear()
|
|
t.ColumnStyles.Clear()
|
|
t.RowStyles.Clear()
|
|
|
|
t.ColumnStyles.Add(New ColumnStyle(SizeType.Percent, 30))
|
|
t.ColumnStyles.Add(New ColumnStyle(SizeType.Percent, 70))
|
|
t.ColumnCount = 2
|
|
|
|
Dim l1 As New Label
|
|
l1.Text = "Mitarbeiter"
|
|
Dim l2 As New Label
|
|
l2.Text = "In Bearbeitung"
|
|
t.Controls.Add(l1, 0, 0)
|
|
t.Controls.Add(l2, 1, 0)
|
|
t.Controls.Add(l2, 1, 0)
|
|
|
|
Dim listMaAVG As List(Of listMaAVG) = SQL.getAVGMa(CDate(datStatVon.Value.ToShortDateString), CDate(datStatBis.Value.ToShortDateString), txtMin.Text, txtMax.Text)
|
|
|
|
|
|
Dim i As Integer = 0
|
|
If Not listMaAVG Is Nothing Then
|
|
For Each l In listMaAVG
|
|
t.RowStyles.Add(New RowStyle(SizeType.AutoSize, 70))
|
|
|
|
'MsgBox("Test" & l.mit_name)
|
|
Dim p_left As New Panel
|
|
Dim p_right As New Panel
|
|
p_left.Dock = DockStyle.Fill
|
|
p_right.Dock = DockStyle.Fill
|
|
p_left.AutoSize = True '.Height = 20
|
|
p_right.AutoSize = True '#.Height = 20
|
|
|
|
't.RowCount = 2
|
|
|
|
Dim l3 As New Label
|
|
l3.Text = l.mit_name
|
|
Dim l4 As New Label
|
|
l4.Text = CStr(l.mit_avg) & " min"
|
|
p_left.Controls.Add(l3)
|
|
p_right.Controls.Add(l4)
|
|
|
|
|
|
|
|
t.Controls.Add(p_left, 0, i + 1)
|
|
t.Controls.Add(p_right, 1, i + 1)
|
|
i += 1
|
|
Next
|
|
End If
|
|
End Sub
|
|
|
|
|
|
Private Sub usrctlMAUebersicht_Load(sender As Object, e As EventArgs) Handles MyBase.Load
|
|
init()
|
|
End Sub
|
|
|
|
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
|
|
init()
|
|
End Sub
|
|
End Class |