diff --git a/VERAG_PROG_ALLGEMEIN/Mitarbeiterverzeichnis/frmUeberstundenauszahlen.Designer.vb b/VERAG_PROG_ALLGEMEIN/Mitarbeiterverzeichnis/frmUeberstundenauszahlen.Designer.vb index f444db68..328b3a45 100644 --- a/VERAG_PROG_ALLGEMEIN/Mitarbeiterverzeichnis/frmUeberstundenauszahlen.Designer.vb +++ b/VERAG_PROG_ALLGEMEIN/Mitarbeiterverzeichnis/frmUeberstundenauszahlen.Designer.vb @@ -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 diff --git a/VERAG_PROG_ALLGEMEIN/Mitarbeiterverzeichnis/frmUeberstundenauszahlen.vb b/VERAG_PROG_ALLGEMEIN/Mitarbeiterverzeichnis/frmUeberstundenauszahlen.vb index db35e225..8d2d5eac 100644 --- a/VERAG_PROG_ALLGEMEIN/Mitarbeiterverzeichnis/frmUeberstundenauszahlen.vb +++ b/VERAG_PROG_ALLGEMEIN/Mitarbeiterverzeichnis/frmUeberstundenauszahlen.vb @@ -227,27 +227,32 @@ 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 @@ -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