Ueberstunden
This commit is contained in:
@@ -1,11 +1,12 @@
|
||||
|
||||
Imports System.Data.Common
|
||||
Imports System.Drawing
|
||||
Imports System.Runtime.InteropServices.ComTypes
|
||||
Imports System.Text
|
||||
Imports System.Threading
|
||||
Imports System.Web.UI.WebControls
|
||||
Imports System.Windows.Forms
|
||||
Imports System.Windows.Forms.VisualStyles.VisualStyleElement.ToolTip
|
||||
|
||||
|
||||
Public Class frmUeberstundenauszahlen
|
||||
|
||||
Dim SQL As New VERAG_PROG_ALLGEMEIN.SQL
|
||||
@@ -145,10 +146,12 @@ Public Class frmUeberstundenauszahlen
|
||||
|
||||
|
||||
Private Function getUeberstunden(dtAccouts As DataTable, dtSumUeberstunden As DataTable) As DataTable
|
||||
Dim dtmerged As DataTable
|
||||
Dim dtmerged As New DataTable
|
||||
If dtAccouts IsNot Nothing AndAlso dtSumUeberstunden IsNot Nothing Then
|
||||
|
||||
dtmerged = dtAccouts.Clone
|
||||
|
||||
|
||||
dtmerged.Merge(dtSumUeberstunden, False, MissingSchemaAction.Add)
|
||||
|
||||
If (dtmerged.Columns.Contains("accountType")) Then
|
||||
@@ -210,6 +213,7 @@ Public Class frmUeberstundenauszahlen
|
||||
|
||||
Try
|
||||
|
||||
|
||||
Dim SQL As New VERAG_PROG_ALLGEMEIN.SQL
|
||||
Dim frm As New Form
|
||||
Dim dgv As New DataGridView()
|
||||
@@ -220,21 +224,39 @@ Public Class frmUeberstundenauszahlen
|
||||
End If
|
||||
|
||||
Dim dv = New DataView(dt)
|
||||
dv.RowFilter = "accountid = 1550 Or accountid = 1551 Or accountid = 1553"
|
||||
dgv.DataSource = dv.ToTable
|
||||
dv.RowFilter = "accountid = 1550 Or accountid = 1551 Or accountid = 1553" 'Überstunden!
|
||||
dt = dv.ToTable
|
||||
|
||||
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
|
||||
|
||||
|
||||
dgv.DataSource = dt
|
||||
|
||||
|
||||
|
||||
If dgv IsNot Nothing Then
|
||||
frm.Size = New Size(500, 500)
|
||||
dgv.Size = New Size(frm.Size.Width, frm.Size.Height)
|
||||
dgv.Dock = DockStyle.Fill
|
||||
dgv.Anchor = AnchorStyles.Left
|
||||
dgv.Anchor = AnchorStyles.Top
|
||||
dgv.ReadOnly = True
|
||||
frm.Controls.Add(dgv)
|
||||
frm.StartPosition = FormStartPosition.CenterScreen
|
||||
frm.ShowDialog()
|
||||
End If
|
||||
dgv.AutoSize = DataGridViewAutoSizeColumnMode.Fill
|
||||
dgv.Dock = DockStyle.Fill
|
||||
dgv.ReadOnly = True
|
||||
frm.Controls.Add(dgv)
|
||||
frm.Width *= 2
|
||||
frm.StartPosition = FormStartPosition.CenterScreen
|
||||
frm.ShowDialog()
|
||||
End If
|
||||
|
||||
|
||||
Catch ex As System.Exception
|
||||
@@ -578,7 +600,6 @@ Public Class frmUeberstundenauszahlen
|
||||
Private Sub calcUeberstunden()
|
||||
|
||||
|
||||
|
||||
If txtAusz.Text <> "" AndAlso IsNumeric(txtAusz.Text) Then
|
||||
|
||||
Dim summeAusz = CDbl(txtAusz.Text)
|
||||
|
||||
Reference in New Issue
Block a user