eZoll, Sessions-Übersicht, Timas

This commit is contained in:
2026-05-26 09:37:30 +02:00
parent 6e91ef81b3
commit 850d64073b
7 changed files with 364 additions and 267 deletions

View File

@@ -81,7 +81,6 @@ Partial Class usrcntlSessions
Me.txtSessDatBis._value = ""
Me.txtSessDatBis._Waehrung = False
Me.txtSessDatBis._WaehrungZeichen = True
Me.txtSessDatBis.Enabled = False
Me.txtSessDatBis.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.txtSessDatBis.ForeColor = System.Drawing.Color.Black
Me.txtSessDatBis.Location = New System.Drawing.Point(175, 13)

View File

@@ -1,6 +1,4 @@
Imports VERAG_PROG_ALLGEMEIN
Public Class usrcntlSessions
Public Class usrcntlSessions
Dim mitarbeiter As VERAG_PROG_ALLGEMEIN.cMitarbeiter
@@ -134,23 +132,40 @@ Public Class usrcntlSessions
With dgvSessions
.Columns("System").Width = 70
.Columns("sess_niederlassung").Width = 50
.Columns("sess_niederlassung").HeaderText = "NL"
.Columns("sess_ipAddress").Width = 100
.Columns("sess_ipAddress").HeaderText = "IP-Adr"
.Columns("sess_PCName").Width = 70
.Columns("sess_PCName").HeaderText = "PC"
.Columns("sess_PCUserName").AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill
.Columns("sess_PCUserName").HeaderText = "Username"
.Columns("sess_login").Width = 100
.Columns("sess_login").HeaderText = "Login"
.Columns("sess_logout").Width = 100
.Columns("sess_logout").HeaderText = "Logout"
If dgvSessions.Rows.Count > 0 Then
'.AutoGenerateColumns = False
'.Columns("ignoreAuszahlungsdatum").CellTemplate = cell
.Columns("System").Width = 70
.Columns("sess_niederlassung").Width = 50
.Columns("sess_niederlassung").HeaderText = "NL"
.Columns("sess_ipAddress").Width = 100
.Columns("sess_ipAddress").HeaderText = "IP-Adr"
.Columns("sess_PCName").Width = 70
.Columns("sess_PCName").HeaderText = "PC"
.Columns("sess_PCUserName").AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill
.Columns("sess_PCUserName").HeaderText = "Username"
.Columns("sess_login").Width = 100
.Columns("sess_login").HeaderText = "Login"
.Columns("sess_logout").Width = 100
.Columns("sess_logout").HeaderText = "Logout"
Dim changeColor As Boolean = True
For i As Integer = 0 To .Rows.Count - 1
.Rows(i).DefaultCellStyle.BackColor = If(changeColor, Color.LightBlue, Color.White)
If i < .Rows.Count - 1 Then
Dim currentDate As Date = CDate(.Rows(i).Cells("sess_login").Value).Date
Dim nextDate As Date = CDate(.Rows(i + 1).Cells("sess_login").Value).Date
If currentDate <> nextDate Then
changeColor = Not changeColor
End If
End If
Next
End If
@@ -165,4 +180,28 @@ Public Class usrcntlSessions
initBtns("Tag")
initdgvSessions(CDate(DateTimePicker1.Value).Date, CDate(DateTimePicker2.Value).Date)
End Sub
Private Sub txtSessDatVon_TextChanged(sender As Object, e As EventArgs) Handles txtSessDatVon.TextChanged
txtSessDatVon.Enabled = sender.text <> ""
If IsDate(txtSessDatVon.Text) AndAlso IsDate(txtSessDatBis.Text) Then
initdgvSessions(CDate(txtSessDatVon.Text).Date, CDate(txtSessDatBis.Text).Date)
End If
End Sub
Private Sub txtSessDatBis_TextChanged(sender As Object, e As EventArgs) Handles txtSessDatBis.TextChanged
txtSessDatBis.Enabled = sender.text <> ""
If IsDate(txtSessDatVon.Text) AndAlso IsDate(txtSessDatBis.Text) Then
initdgvSessions(CDate(txtSessDatVon.Text).Date, CDate(txtSessDatBis.Text).Date)
End If
End Sub
Private Sub DateTimePicker1_ValueChanged(sender As Object, e As EventArgs) Handles DateTimePicker1.ValueChanged
txtSessDatVon._value = CDate(sender.value).ToShortDateString
initdgvSessions(CDate(DateTimePicker1.Value).Date, CDate(DateTimePicker2.Value).Date)
End Sub
Private Sub DateTimePicker2_ValueChanged(sender As Object, e As EventArgs) Handles DateTimePicker2.ValueChanged
txtSessDatBis._value = CDate(sender.value).ToShortDateString
initdgvSessions(CDate(DateTimePicker1.Value).Date, CDate(DateTimePicker2.Value).Date)
End Sub
End Class