Bugfix, optische Verbesserungen

This commit is contained in:
2024-03-07 17:39:42 +01:00
parent aa0b0ea6ff
commit 54d48a4a34
2 changed files with 36 additions and 19 deletions

View File

@@ -66,6 +66,7 @@ Partial Class frmUeberstundenauszahlen
Me.cbxTeilzeit = New System.Windows.Forms.CheckBox()
Me.PictureBox1 = New System.Windows.Forms.PictureBox()
Me.lblWarning = New System.Windows.Forms.Label()
Me.Label5 = New System.Windows.Forms.Label()
CType(Me.picDel, System.ComponentModel.ISupportInitialize).BeginInit()
Me.Panel1.SuspendLayout()
CType(Me.picShow, System.ComponentModel.ISupportInitialize).BeginInit()
@@ -477,7 +478,7 @@ Partial Class frmUeberstundenauszahlen
'
Me.PictureBox1.BackgroundImage = CType(resources.GetObject("PictureBox1.BackgroundImage"), System.Drawing.Image)
Me.PictureBox1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom
Me.PictureBox1.Location = New System.Drawing.Point(422, 12)
Me.PictureBox1.Location = New System.Drawing.Point(189, 5)
Me.PictureBox1.Name = "PictureBox1"
Me.PictureBox1.Size = New System.Drawing.Size(29, 26)
Me.PictureBox1.TabIndex = 38
@@ -487,16 +488,26 @@ Partial Class frmUeberstundenauszahlen
'
Me.lblWarning.AutoSize = True
Me.lblWarning.ForeColor = System.Drawing.Color.Red
Me.lblWarning.Location = New System.Drawing.Point(413, 48)
Me.lblWarning.Location = New System.Drawing.Point(304, 5)
Me.lblWarning.Name = "lblWarning"
Me.lblWarning.Size = New System.Drawing.Size(0, 13)
Me.lblWarning.TabIndex = 39
'
'Label5
'
Me.Label5.AutoSize = True
Me.Label5.ForeColor = System.Drawing.Color.Red
Me.Label5.Location = New System.Drawing.Point(378, 45)
Me.Label5.Name = "Label5"
Me.Label5.Size = New System.Drawing.Size(0, 13)
Me.Label5.TabIndex = 40
'
'frmUeberstundenauszahlen
'
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
Me.ClientSize = New System.Drawing.Size(646, 337)
Me.Controls.Add(Me.Label5)
Me.Controls.Add(Me.lblWarning)
Me.Controls.Add(Me.PictureBox1)
Me.Controls.Add(Me.cbxTeilzeit)
@@ -564,4 +575,5 @@ Partial Class frmUeberstundenauszahlen
Friend WithEvents PictureBox1 As Windows.Forms.PictureBox
Friend WithEvents picShow As Windows.Forms.PictureBox
Friend WithEvents lblWarning As Windows.Forms.Label
Friend WithEvents Label5 As Windows.Forms.Label
End Class

View File

@@ -227,32 +227,37 @@ Public Class frmUeberstundenauszahlen
Exit Sub
End If
Dim dv = New DataView(dt)
dv.RowFilter = "accountid = 1550 Or accountid = 1551 Or accountid = 1553" 'Überstunden!
dt = dv.ToTable
For Each row As DataRow In dt.Rows
If dt.Columns.Contains("accountid") Then
Select Case row(0)
Case 1550 : If IsDBNull(row(1)) Then row(1) = CStr("ÜS 100%")
Case 1551 : If IsDBNull(row(1)) Then row(1) = CStr("ÜS 50%")
Case 1553 : If IsDBNull(row(1)) Then row(1) = CStr("ÜS 25%")
Dim dv = New DataView(dt)
dv.RowFilter = "accountid = 1550 Or accountid = 1551 Or accountid = 1553" 'Überstunden!
dt = dv.ToTable
End Select
Next
For Each row As DataRow In dt.Rows
Select Case row(0)
Case 1550 : If IsDBNull(row(1)) Then row(1) = CStr("ÜS 100%")
Case 1551 : If IsDBNull(row(1)) Then row(1) = CStr("ÜS 50%")
Case 1553 : If IsDBNull(row(1)) Then row(1) = CStr("ÜS 25%")
End Select
Next
If (dt.Columns.Contains("accountid")) Then
dt.Columns.Remove("accountid")
dt.AcceptChanges()
End If
If (dt.Columns.Contains("accountid")) Then
dt.Columns.Remove("accountid")
dt.AcceptChanges()
End If
dgv.DataSource = dt
If dgv IsNot Nothing Then
If dgv IsNot Nothing Then
dgv.AutoSize = DataGridViewAutoSizeColumnMode.Fill
dgv.Dock = DockStyle.Fill
dgv.ReadOnly = True
@@ -726,9 +731,9 @@ Public Class frmUeberstundenauszahlen
If row.Item("name") = "ÜS werden nicht auf lfd. Saldo hinzugezählt" Then
If row.Item("value") = "true" Then
MsgBox("ÜS werden nicht auf lfd. Saldo hinzugezählt")
Label5.Text = "ÜS werden nicht auf lfd. Saldo hinzugezählt!"
Else
lblWarning.Text = ""
Label5.Text = ""
End If
End If