Merge branch 'master' of https://verag.visualstudio.com/SDL/_git/SDL
This commit is contained in:
@@ -32,6 +32,9 @@ Public Class cBonitaetsauskunft
|
||||
Property ba_datenarchivId As Object = Nothing
|
||||
Property ba_Geschaeftszweck As Object = Nothing
|
||||
Property ba_GSName As Object = Nothing
|
||||
Property ba_UID As String = ""
|
||||
|
||||
Property ba_forcedRequest As Boolean = False
|
||||
|
||||
|
||||
Dim SQL As New SQL
|
||||
@@ -75,6 +78,8 @@ Public Class cBonitaetsauskunft
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ba_datenarchivId", ba_datenarchivId))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ba_Geschaeftszweck", ba_Geschaeftszweck))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ba_GSName", ba_GSName))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ba_UID", ba_UID))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ba_forcedRequest", ba_forcedRequest))
|
||||
|
||||
Return list
|
||||
End Function
|
||||
|
||||
@@ -50,22 +50,24 @@ Public Class cFeiertage
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Function GetFirstyDayInxMonth(ByVal day As DayOfWeek, ByVal month As Integer, ByVal year As Integer) As DateTime
|
||||
Public Function GetFirstyDayYInxMonth(ByVal day As DayOfWeek, ByVal month As Integer, ByVal year As Integer, Optional irgnoreDay As Boolean = False) As DateTime
|
||||
|
||||
' Create a start date for the 1st day of the month
|
||||
Dim startDate As DateTime = New DateTime(year, month, 1)
|
||||
|
||||
While startDate.DayOfWeek <> day
|
||||
startDate = startDate.AddDays(1)
|
||||
End While
|
||||
If Not irgnoreDay Then
|
||||
|
||||
While startDate.DayOfWeek <> day
|
||||
startDate = startDate.AddDays(1)
|
||||
End While
|
||||
End If
|
||||
|
||||
Return startDate
|
||||
|
||||
End Function
|
||||
|
||||
|
||||
Public Function GetLastyDayInxMonth(ByVal day As DayOfWeek, ByVal month As Integer, ByVal year As Integer) As DateTime
|
||||
Public Function GetLastyDayYInxMonth(ByVal day As DayOfWeek, ByVal month As Integer, ByVal year As Integer, Optional irgnoreDay As Boolean = False) As DateTime
|
||||
|
||||
' Create a start date for the last weekday of the month
|
||||
Dim startDate As DateTime
|
||||
@@ -77,9 +79,14 @@ Public Class cFeiertage
|
||||
startDate = startDate.AddDays(-1)
|
||||
End If
|
||||
|
||||
While (startDate.DayOfWeek <> day)
|
||||
If irgnoreDay Then
|
||||
startDate = startDate.AddDays(-1)
|
||||
End While
|
||||
Else
|
||||
While (startDate.DayOfWeek <> day)
|
||||
startDate = startDate.AddDays(-1)
|
||||
End While
|
||||
End If
|
||||
|
||||
|
||||
Return startDate
|
||||
|
||||
@@ -268,9 +275,9 @@ Public Class cFeiertage
|
||||
|
||||
Case "GB"
|
||||
If datum = Karfreitag Then Return True
|
||||
If datum = GetFirstyDayInxMonth(DayOfWeek.Monday, 5, _Year) Then Return True 'Early May Bank Holiday Erster Montag im Mai
|
||||
If datum = GetLastyDayInxMonth(DayOfWeek.Monday, 5, _Year) Then Return True 'Spring Bank Holiday Letzter Montag im Mai
|
||||
If datum = GetLastyDayInxMonth(DayOfWeek.Monday, 8, _Year) Then Return True 'Summer Bank Holiday Letzter Montag im August
|
||||
If datum = GetFirstyDayYInxMonth(DayOfWeek.Monday, 5, _Year) Then Return True 'Early May Bank Holiday Erster Montag im Mai
|
||||
If datum = GetLastyDayYInxMonth(DayOfWeek.Monday, 5, _Year) Then Return True 'Spring Bank Holiday Letzter Montag im Mai
|
||||
If datum = GetLastyDayYInxMonth(DayOfWeek.Monday, 8, _Year) Then Return True 'Summer Bank Holiday Letzter Montag im August
|
||||
|
||||
Return False
|
||||
Case Else
|
||||
|
||||
@@ -22,6 +22,7 @@ Public Class cMitarbeiter
|
||||
Property mit_durchwahl As String = ""
|
||||
Property mit_telefonnr As String = ""
|
||||
Property mit_email As String = ""
|
||||
Property mit_emailprivat As String = ""
|
||||
Property mit_mobiltel As String = ""
|
||||
Property mit_allowAnruf As Boolean
|
||||
Property mit_info As String = ""
|
||||
@@ -202,6 +203,7 @@ Public Class cMitarbeiter
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("mit_Sprachkentnisse", mit_Sprachkentnisse))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("mit_homeoffice", mit_homeoffice))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("mit_timasNichtStempeln", mit_timasNichtStempeln))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("mit_emailprivat", mit_emailprivat))
|
||||
|
||||
|
||||
Return list
|
||||
@@ -401,6 +403,7 @@ Public Class cMitarbeiter
|
||||
If Not dr.Item("mit_Sprachkentnisse") Is DBNull.Value Then Me.mit_Sprachkentnisse = dr.Item("mit_Sprachkentnisse")
|
||||
Me.mit_homeoffice = dr.Item("mit_homeoffice")
|
||||
Me.mit_timasNichtStempeln = dr.Item("mit_timasNichtStempeln")
|
||||
If Not dr.Item("mit_emailprivat") Is DBNull.Value Then Me.mit_emailprivat = dr.Item("mit_emailprivat")
|
||||
|
||||
|
||||
Catch ex As Exception
|
||||
|
||||
146
VERAG_PROG_ALLGEMEIN/Classes/cUeberstunden.vb
Normal file
146
VERAG_PROG_ALLGEMEIN/Classes/cUeberstunden.vb
Normal file
@@ -0,0 +1,146 @@
|
||||
|
||||
Imports System.Data.SqlClient
|
||||
Imports System.Reflection
|
||||
|
||||
Public Class cUeberstunden
|
||||
|
||||
Property uest_id As Integer
|
||||
Property uest_maId As Object = Nothing
|
||||
Property uest_timasId As Object = Nothing
|
||||
Property uest_100 As Object = Nothing
|
||||
Property uest_50 As Object = Nothing
|
||||
Property uest_0 As Object = Nothing
|
||||
Property uest_date As Date = Nothing
|
||||
Property uest_created As Object = Nothing
|
||||
Property uest_lastChanged As Object = Nothing
|
||||
Property uest_deleted As Boolean
|
||||
Property uest_systemuser As Object = Nothing
|
||||
Property uest_maxUE As Object = Nothing
|
||||
Property uest_ignoreLimit As Boolean
|
||||
|
||||
Public hasEntry = False
|
||||
|
||||
Dim SQL As New SQL
|
||||
|
||||
|
||||
|
||||
Sub New(uest_maId, uest_date)
|
||||
Me.uest_maId = uest_maId
|
||||
Me.uest_date = uest_date
|
||||
LOAD()
|
||||
End Sub
|
||||
|
||||
Sub New(uest_maId, uest_date, uest_created)
|
||||
Me.uest_maId = uest_maId
|
||||
Me.uest_date = uest_date
|
||||
Me.uest_created = uest_created
|
||||
End Sub
|
||||
|
||||
Function getParameterList() As List(Of VERAG_PROG_ALLGEMEIN.SQLVariable)
|
||||
Dim list As New List(Of VERAG_PROG_ALLGEMEIN.SQLVariable)
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("uest_id", uest_id,, True, True))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("uest_maId", uest_maId))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("uest_timasId", uest_timasId))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("uest_100", uest_100))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("uest_50", uest_50))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("uest_0", uest_0))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("uest_date", uest_date))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("uest_created", uest_created))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("uest_lastChanged", uest_lastChanged))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("uest_deleted", uest_deleted))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("uest_systemuser", uest_systemuser))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("uest_ignoreLimit", uest_ignoreLimit))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("uest_maxUE", uest_maxUE))
|
||||
|
||||
Return list
|
||||
End Function
|
||||
|
||||
|
||||
|
||||
Public Function SAVE() As Boolean
|
||||
Dim list As List(Of VERAG_PROG_ALLGEMEIN.SQLVariable) = getParameterList()
|
||||
|
||||
Dim sqlstr = " BEGIN TRAN IF EXISTS(SELECT * FROM tblUeberstunden WHERE uest_maId=@uest_maId AND uest_date=@uest_date AND uest_deleted = 0) " &
|
||||
" BEGIN " & getUpdateCmd() & " END " &
|
||||
" Else " &
|
||||
" BEGIN " & getInsertCmd() & " END " &
|
||||
" commit tran "
|
||||
|
||||
Return SQL.doSQLVarList(sqlstr, "ADMIN", , list)
|
||||
End Function
|
||||
|
||||
Public Sub LOAD()
|
||||
Try
|
||||
hasEntry = False
|
||||
Using conn As SqlConnection = SQL.GetNewOpenConnectionADMIN()
|
||||
Using cmd As New SqlCommand("SELECT TOP(1) * FROM tblUeberstunden WHERE uest_maId=@uest_maId AND uest_date=@uest_date AND uest_deleted = 0 order by uest_created desc", conn)
|
||||
cmd.Parameters.AddWithValue("@uest_maId", uest_maId)
|
||||
cmd.Parameters.AddWithValue("@uest_date", uest_date)
|
||||
Dim dr = cmd.ExecuteReader()
|
||||
If dr.Read Then
|
||||
For Each li In getParameterList()
|
||||
Dim propInfo As PropertyInfo = Me.GetType.GetProperty(li.Scalarvariable)
|
||||
|
||||
If dr.Item(li.Text) Is DBNull.Value Then
|
||||
propInfo.SetValue(Me, Nothing)
|
||||
Else
|
||||
propInfo.SetValue(Me, dr.Item(li.Text))
|
||||
End If
|
||||
|
||||
Next
|
||||
hasEntry = True
|
||||
End If
|
||||
dr.Close()
|
||||
End Using
|
||||
End Using
|
||||
Catch ex As Exception
|
||||
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
Public Function getUpdateCmd() As String
|
||||
Try
|
||||
Dim list As List(Of VERAG_PROG_ALLGEMEIN.SQLVariable) = getParameterList()
|
||||
|
||||
|
||||
Dim str As String = ""
|
||||
For Each i In list
|
||||
If Not i.isPrimaryParam Then
|
||||
str &= "[" & i.Text & "] = @" & i.Scalarvariable & "," '.Replace("-", "").Replace(" ", "") & ","
|
||||
End If
|
||||
Next
|
||||
str = str.Substring(0, str.Length - 1) 'wg. ','
|
||||
Return (" UPDATE [tblUeberstunden] SET " & str & " WHERE uest_maId=@uest_maId AND uest_date=@uest_date AND uest_deleted = 0 ")
|
||||
|
||||
Catch ex As Exception
|
||||
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name)
|
||||
End Try
|
||||
Return ""
|
||||
End Function
|
||||
|
||||
|
||||
Public Function getInsertCmd() As String
|
||||
Try
|
||||
Dim list As List(Of VERAG_PROG_ALLGEMEIN.SQLVariable) = getParameterList()
|
||||
Dim str As String = ""
|
||||
Dim values As String = ""
|
||||
For Each i In list
|
||||
If Not i.isPrimaryParam Then
|
||||
str &= "[" & i.Text & "],"
|
||||
values &= "@" & i.Scalarvariable & "," '.Replace("-", "").Replace(" ", "") & ","
|
||||
End If
|
||||
Next
|
||||
str = str.Substring(0, str.Length - 1) 'wg. ','
|
||||
values = values.Substring(0, values.Length - 1) 'wg. ','
|
||||
Return (" INSERT INTO tblUeberstunden (" & str & ") VALUES(" & values & ") ")
|
||||
Catch ex As Exception
|
||||
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name)
|
||||
End Try
|
||||
Return ""
|
||||
End Function
|
||||
|
||||
|
||||
End Class
|
||||
|
||||
@@ -1409,7 +1409,10 @@ Public Class cFormularManager
|
||||
Using webClient As New Net.WebClient()
|
||||
Dim data() As Byte = webClient.DownloadData(URL)
|
||||
Using stream As New MemoryStream(data)
|
||||
Dim doc As Spire.Pdf.PdfDocument = New Spire.Pdf.PdfDocument(stream)
|
||||
|
||||
Dim doc As Spire.Pdf.PdfDocument = New Spire.Pdf.PdfDocument
|
||||
doc.LoadFromStream(stream)
|
||||
|
||||
If doc IsNot Nothing Then
|
||||
doc.PageSettings.Size = Spire.Pdf.PdfPageSize.A4
|
||||
doc.SaveToFile(targetPath)
|
||||
@@ -1422,7 +1425,7 @@ Public Class cFormularManager
|
||||
|
||||
Return targetPath
|
||||
Catch ex As Exception
|
||||
MsgBox(ex.Message & ex.StackTrace)
|
||||
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name)
|
||||
End Try
|
||||
Return ""
|
||||
End Function
|
||||
|
||||
@@ -28,8 +28,10 @@ Partial Class frmMitarbeitersuche
|
||||
Me.Button4 = New System.Windows.Forms.Button()
|
||||
Me.btnClose = New System.Windows.Forms.Button()
|
||||
Me.PictureBox2 = New System.Windows.Forms.PictureBox()
|
||||
Me.sbMitarbeiter = New VERAG_PROG_ALLGEMEIN.MySearchBox()
|
||||
Me.pnlMain = New System.Windows.Forms.Panel()
|
||||
Me.pnl = New System.Windows.Forms.Panel()
|
||||
Me.Button3 = New System.Windows.Forms.Button()
|
||||
Me.Panel2 = New System.Windows.Forms.Panel()
|
||||
Me.lblStatusZE = New System.Windows.Forms.Label()
|
||||
Me.Label13 = New System.Windows.Forms.Label()
|
||||
@@ -81,7 +83,6 @@ Partial Class frmMitarbeitersuche
|
||||
Me.lblFirma = New System.Windows.Forms.Label()
|
||||
Me.Label4 = New System.Windows.Forms.Label()
|
||||
Me.Label3 = New System.Windows.Forms.Label()
|
||||
Me.sbMitarbeiter = New VERAG_PROG_ALLGEMEIN.MySearchBox()
|
||||
Me.pnlSrch.SuspendLayout()
|
||||
CType(Me.PictureBox2, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
Me.pnlMain.SuspendLayout()
|
||||
@@ -154,6 +155,32 @@ Partial Class frmMitarbeitersuche
|
||||
Me.PictureBox2.TabIndex = 18
|
||||
Me.PictureBox2.TabStop = False
|
||||
'
|
||||
'sbMitarbeiter
|
||||
'
|
||||
Me.sbMitarbeiter._allowFreitext = False
|
||||
Me.sbMitarbeiter._AllowSetValue = False
|
||||
Me.sbMitarbeiter._allowSpaceAsSplitter = True
|
||||
Me.sbMitarbeiter._autoSizeGross = False
|
||||
Me.sbMitarbeiter._hideIfListEmpty = True
|
||||
Me.sbMitarbeiter._value = Nothing
|
||||
Me.sbMitarbeiter.conn_art = "FMZOLL"
|
||||
Me.sbMitarbeiter.dgvpos = "LEFT"
|
||||
Me.sbMitarbeiter.DISPLAY_PARAM = Nothing
|
||||
Me.sbMitarbeiter.Font = New System.Drawing.Font("Microsoft Sans Serif", 14.0!)
|
||||
Me.sbMitarbeiter.INVISIBLE_COLUMNS = Nothing
|
||||
Me.sbMitarbeiter.key_visible = False
|
||||
Me.sbMitarbeiter.KEYPARAM = Nothing
|
||||
Me.sbMitarbeiter.Location = New System.Drawing.Point(45, 11)
|
||||
Me.sbMitarbeiter.Name = "sbMitarbeiter"
|
||||
Me.sbMitarbeiter.searchActive = True
|
||||
Me.sbMitarbeiter.Size = New System.Drawing.Size(582, 29)
|
||||
Me.sbMitarbeiter.SQL_ORDER_BY = Nothing
|
||||
Me.sbMitarbeiter.SQL_SELECT = Nothing
|
||||
Me.sbMitarbeiter.SQL_WHERE = Nothing
|
||||
Me.sbMitarbeiter.SQL_WhereParamList = Nothing
|
||||
Me.sbMitarbeiter.TabIndex = 0
|
||||
Me.sbMitarbeiter.usrcntl = Nothing
|
||||
'
|
||||
'pnlMain
|
||||
'
|
||||
Me.pnlMain.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink
|
||||
@@ -169,6 +196,7 @@ Partial Class frmMitarbeitersuche
|
||||
'
|
||||
Me.pnl.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink
|
||||
Me.pnl.BackColor = System.Drawing.Color.FromArgb(CType(CType(250, Byte), Integer), CType(CType(254, Byte), Integer), CType(CType(255, Byte), Integer))
|
||||
Me.pnl.Controls.Add(Me.Button3)
|
||||
Me.pnl.Controls.Add(Me.Panel2)
|
||||
Me.pnl.Controls.Add(Me.pnlZeiten)
|
||||
Me.pnl.Controls.Add(Me.lblMAId)
|
||||
@@ -199,6 +227,21 @@ Partial Class frmMitarbeitersuche
|
||||
Me.pnl.Size = New System.Drawing.Size(774, 480)
|
||||
Me.pnl.TabIndex = 24
|
||||
'
|
||||
'Button3
|
||||
'
|
||||
Me.Button3.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom
|
||||
Me.Button3.FlatStyle = System.Windows.Forms.FlatStyle.Flat
|
||||
Me.Button3.Image = Global.VERAG_PROG_ALLGEMEIN.My.Resources.Resources.zeiterfassung_s
|
||||
Me.Button3.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft
|
||||
Me.Button3.Location = New System.Drawing.Point(647, 138)
|
||||
Me.Button3.Name = "Button3"
|
||||
Me.Button3.Size = New System.Drawing.Size(125, 40)
|
||||
Me.Button3.TabIndex = 129
|
||||
Me.Button3.Text = "ÜS auszahlen"
|
||||
Me.Button3.TextAlign = System.Drawing.ContentAlignment.MiddleRight
|
||||
Me.Button3.UseVisualStyleBackColor = True
|
||||
Me.Button3.Visible = False
|
||||
'
|
||||
'Panel2
|
||||
'
|
||||
Me.Panel2.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
|
||||
@@ -415,7 +458,7 @@ Partial Class frmMitarbeitersuche
|
||||
Me.btnSettings.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft
|
||||
Me.btnSettings.Location = New System.Drawing.Point(646, 95)
|
||||
Me.btnSettings.Name = "btnSettings"
|
||||
Me.btnSettings.Size = New System.Drawing.Size(125, 61)
|
||||
Me.btnSettings.Size = New System.Drawing.Size(125, 40)
|
||||
Me.btnSettings.TabIndex = 29
|
||||
Me.btnSettings.Text = "Einstellungen"
|
||||
Me.btnSettings.TextAlign = System.Drawing.ContentAlignment.MiddleRight
|
||||
@@ -592,7 +635,7 @@ Partial Class frmMitarbeitersuche
|
||||
Me.lblHandyNr.Font = New System.Drawing.Font("Microsoft Sans Serif", 12.0!, System.Drawing.FontStyle.Bold)
|
||||
Me.lblHandyNr.Location = New System.Drawing.Point(360, 164)
|
||||
Me.lblHandyNr.Name = "lblHandyNr"
|
||||
Me.lblHandyNr.Size = New System.Drawing.Size(411, 25)
|
||||
Me.lblHandyNr.Size = New System.Drawing.Size(281, 25)
|
||||
Me.lblHandyNr.TabIndex = 22
|
||||
Me.lblHandyNr.Text = "+43 7711 / 2777 0"
|
||||
Me.lblHandyNr.TextAlign = System.Drawing.ContentAlignment.MiddleLeft
|
||||
@@ -613,7 +656,7 @@ Partial Class frmMitarbeitersuche
|
||||
Me.lblTelefon.Font = New System.Drawing.Font("Microsoft Sans Serif", 12.0!, System.Drawing.FontStyle.Bold)
|
||||
Me.lblTelefon.Location = New System.Drawing.Point(360, 138)
|
||||
Me.lblTelefon.Name = "lblTelefon"
|
||||
Me.lblTelefon.Size = New System.Drawing.Size(411, 25)
|
||||
Me.lblTelefon.Size = New System.Drawing.Size(281, 25)
|
||||
Me.lblTelefon.TabIndex = 16
|
||||
Me.lblTelefon.Text = "+43 7711 / 2777 0"
|
||||
Me.lblTelefon.TextAlign = System.Drawing.ContentAlignment.MiddleLeft
|
||||
@@ -772,32 +815,6 @@ Partial Class frmMitarbeitersuche
|
||||
Me.Label3.Text = "Niederlassung:"
|
||||
Me.Label3.TextAlign = System.Drawing.ContentAlignment.MiddleLeft
|
||||
'
|
||||
'sbMitarbeiter
|
||||
'
|
||||
Me.sbMitarbeiter._allowFreitext = False
|
||||
Me.sbMitarbeiter._AllowSetValue = False
|
||||
Me.sbMitarbeiter._allowSpaceAsSplitter = True
|
||||
Me.sbMitarbeiter._autoSizeGross = False
|
||||
Me.sbMitarbeiter._hideIfListEmpty = True
|
||||
Me.sbMitarbeiter._value = Nothing
|
||||
Me.sbMitarbeiter.conn_art = "FMZOLL"
|
||||
Me.sbMitarbeiter.dgvpos = "LEFT"
|
||||
Me.sbMitarbeiter.DISPLAY_PARAM = Nothing
|
||||
Me.sbMitarbeiter.Font = New System.Drawing.Font("Microsoft Sans Serif", 14.0!)
|
||||
Me.sbMitarbeiter.INVISIBLE_COLUMNS = Nothing
|
||||
Me.sbMitarbeiter.key_visible = False
|
||||
Me.sbMitarbeiter.KEYPARAM = Nothing
|
||||
Me.sbMitarbeiter.Location = New System.Drawing.Point(45, 11)
|
||||
Me.sbMitarbeiter.Name = "sbMitarbeiter"
|
||||
Me.sbMitarbeiter.searchActive = True
|
||||
Me.sbMitarbeiter.Size = New System.Drawing.Size(582, 29)
|
||||
Me.sbMitarbeiter.SQL_ORDER_BY = Nothing
|
||||
Me.sbMitarbeiter.SQL_SELECT = Nothing
|
||||
Me.sbMitarbeiter.SQL_WHERE = Nothing
|
||||
Me.sbMitarbeiter.SQL_WhereParamList = Nothing
|
||||
Me.sbMitarbeiter.TabIndex = 0
|
||||
Me.sbMitarbeiter.usrcntl = Nothing
|
||||
'
|
||||
'frmMitarbeitersuche
|
||||
'
|
||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
|
||||
@@ -894,4 +911,5 @@ Partial Class frmMitarbeitersuche
|
||||
Friend WithEvents Button2 As Windows.Forms.Button
|
||||
Friend WithEvents PictureBox5 As Windows.Forms.PictureBox
|
||||
Friend WithEvents btnAkten As Windows.Forms.Button
|
||||
Friend WithEvents Button3 As Windows.Forms.Button
|
||||
End Class
|
||||
|
||||
@@ -72,6 +72,7 @@ Public Class frmMitarbeitersuche
|
||||
lblTimasSaldo.Visible = False
|
||||
Panel1.Visible = False
|
||||
btnSettings.Visible = False
|
||||
Button3.Visible = False
|
||||
' Dim MA As cMitarbeiter = Nothing
|
||||
If sbMitarbeiter._value <> "" Then
|
||||
MA = New cMitarbeiter(sbMitarbeiter._value)
|
||||
@@ -190,6 +191,8 @@ Public Class frmMitarbeitersuche
|
||||
|
||||
If VERAG_PROG_ALLGEMEIN.cBerechtignunen.CHECK_BERECHTIGUNG_bool("ZE_AKTENGANG", "SDL") Then btnAkten.Visible = True
|
||||
|
||||
If VERAG_PROG_ALLGEMEIN.cBerechtignunen.CHECK_BERECHTIGUNG_bool("Überstunden_auszahlen", "SDL") Then Button3.Visible = True = True
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
@@ -423,7 +426,7 @@ Public Class frmMitarbeitersuche
|
||||
Dim dtZeiten As New DataTable
|
||||
If timas IsNot Nothing Then
|
||||
Dim isServiceRunning As Boolean = True
|
||||
timas.getTimeSaldo(MA.mit_timasId, lblTimasSaldo.Text, isServiceRunning)
|
||||
timas.getTimeSaldo(MA.mit_timasId, lblTimasSaldo.Text, "dailyBalanceYesterday", isServiceRunning)
|
||||
If Not isServiceRunning Then
|
||||
'Abfrage konnte nicht durchgeführt werden.
|
||||
MsgBox("Abfragefehler am Timas-Server!")
|
||||
@@ -484,4 +487,9 @@ Public Class frmMitarbeitersuche
|
||||
Process.Start(webAddress)
|
||||
End Sub
|
||||
|
||||
Private Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click
|
||||
If sbMitarbeiter._value = "" Then Exit Sub
|
||||
Dim f As New frmUeberstundenauszahlen(sbMitarbeiter._value)
|
||||
f.ShowDialog(Me)
|
||||
End Sub
|
||||
End Class
|
||||
450
VERAG_PROG_ALLGEMEIN/Mitarbeiterverzeichnis/frmUeberstundenauszahlen.Designer.vb
generated
Normal file
450
VERAG_PROG_ALLGEMEIN/Mitarbeiterverzeichnis/frmUeberstundenauszahlen.Designer.vb
generated
Normal file
@@ -0,0 +1,450 @@
|
||||
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()>
|
||||
Partial Class frmUeberstundenauszahlen
|
||||
Inherits System.Windows.Forms.Form
|
||||
|
||||
'Das Formular überschreibt den Löschvorgang, um die Komponentenliste zu bereinigen.
|
||||
<System.Diagnostics.DebuggerNonUserCode()>
|
||||
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
|
||||
Try
|
||||
If disposing AndAlso components IsNot Nothing Then
|
||||
components.Dispose()
|
||||
End If
|
||||
Finally
|
||||
MyBase.Dispose(disposing)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
'Wird vom Windows Form-Designer benötigt.
|
||||
Private components As System.ComponentModel.IContainer
|
||||
|
||||
'Hinweis: Die folgende Prozedur ist für den Windows Form-Designer erforderlich.
|
||||
'Das Bearbeiten ist mit dem Windows Form-Designer möglich.
|
||||
'Das Bearbeiten mit dem Code-Editor ist nicht möglich.
|
||||
<System.Diagnostics.DebuggerStepThrough()>
|
||||
Private Sub InitializeComponent()
|
||||
Me.components = New System.ComponentModel.Container()
|
||||
Me.dtpMonat = New System.Windows.Forms.DateTimePicker()
|
||||
Me.lblMonat = New System.Windows.Forms.Label()
|
||||
Me.Label2 = New System.Windows.Forms.Label()
|
||||
Me.Label3 = New System.Windows.Forms.Label()
|
||||
Me.Label4 = New System.Windows.Forms.Label()
|
||||
Me.txt100 = New System.Windows.Forms.TextBox()
|
||||
Me.txt50 = New System.Windows.Forms.TextBox()
|
||||
Me.txtMehr = New System.Windows.Forms.TextBox()
|
||||
Me.txtAusz = New System.Windows.Forms.TextBox()
|
||||
Me.lblMA = New System.Windows.Forms.Label()
|
||||
Me.Label7 = New System.Windows.Forms.Label()
|
||||
Me.Button1 = New System.Windows.Forms.Button()
|
||||
Me.txt100x2 = New System.Windows.Forms.TextBox()
|
||||
Me.txt50x15 = New System.Windows.Forms.TextBox()
|
||||
Me.txtAusz100 = New System.Windows.Forms.TextBox()
|
||||
Me.txtAusz50 = New System.Windows.Forms.TextBox()
|
||||
Me.CheckVatTestService1 = New VERAG_PROG_ALLGEMEIN.eu.europa.ec.checkVatTestService()
|
||||
Me.cbxabwDatum = New System.Windows.Forms.CheckBox()
|
||||
Me.lblBis = New System.Windows.Forms.Label()
|
||||
Me.dtpBis = New System.Windows.Forms.DateTimePicker()
|
||||
Me.txtSummeAuszb = New System.Windows.Forms.TextBox()
|
||||
Me.txtberAusz50 = New System.Windows.Forms.TextBox()
|
||||
Me.txtberAusz100 = New System.Windows.Forms.TextBox()
|
||||
Me.Label1 = New System.Windows.Forms.Label()
|
||||
Me.txtlfdSaldo = New System.Windows.Forms.TextBox()
|
||||
Me.Label6 = New System.Windows.Forms.Label()
|
||||
Me.picDel = New System.Windows.Forms.PictureBox()
|
||||
Me.txtAusz50vonSaldo = New System.Windows.Forms.TextBox()
|
||||
Me.Panel1 = New System.Windows.Forms.Panel()
|
||||
Me.Label8 = New System.Windows.Forms.Label()
|
||||
Me.txt50x1 = New System.Windows.Forms.TextBox()
|
||||
Me.dgvUeberstunden = New VERAG_PROG_ALLGEMEIN.MyDatagridview(Me.components)
|
||||
Me.cbxoverwrite = New System.Windows.Forms.CheckBox()
|
||||
CType(Me.picDel, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
Me.Panel1.SuspendLayout()
|
||||
CType(Me.dgvUeberstunden, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
Me.SuspendLayout()
|
||||
'
|
||||
'dtpMonat
|
||||
'
|
||||
Me.dtpMonat.CustomFormat = "yyyy/MM"
|
||||
Me.dtpMonat.Format = System.Windows.Forms.DateTimePickerFormat.Custom
|
||||
Me.dtpMonat.Location = New System.Drawing.Point(15, 41)
|
||||
Me.dtpMonat.Name = "dtpMonat"
|
||||
Me.dtpMonat.Size = New System.Drawing.Size(81, 20)
|
||||
Me.dtpMonat.TabIndex = 0
|
||||
'
|
||||
'lblMonat
|
||||
'
|
||||
Me.lblMonat.AutoSize = True
|
||||
Me.lblMonat.Location = New System.Drawing.Point(12, 25)
|
||||
Me.lblMonat.Name = "lblMonat"
|
||||
Me.lblMonat.Size = New System.Drawing.Size(37, 13)
|
||||
Me.lblMonat.TabIndex = 1
|
||||
Me.lblMonat.Text = "Monat"
|
||||
'
|
||||
'Label2
|
||||
'
|
||||
Me.Label2.AutoSize = True
|
||||
Me.Label2.Location = New System.Drawing.Point(13, 11)
|
||||
Me.Label2.Name = "Label2"
|
||||
Me.Label2.Size = New System.Drawing.Size(196, 13)
|
||||
Me.Label2.TabIndex = 2
|
||||
Me.Label2.Text = "Überstunden 100% (So/Nacht/Feiertag)"
|
||||
'
|
||||
'Label3
|
||||
'
|
||||
Me.Label3.AutoSize = True
|
||||
Me.Label3.Location = New System.Drawing.Point(12, 131)
|
||||
Me.Label3.Name = "Label3"
|
||||
Me.Label3.Size = New System.Drawing.Size(138, 13)
|
||||
Me.Label3.TabIndex = 3
|
||||
Me.Label3.Text = "Mehrarbeit (autom. ausbez.)"
|
||||
'
|
||||
'Label4
|
||||
'
|
||||
Me.Label4.AutoSize = True
|
||||
Me.Label4.Location = New System.Drawing.Point(13, 53)
|
||||
Me.Label4.Name = "Label4"
|
||||
Me.Label4.Size = New System.Drawing.Size(113, 13)
|
||||
Me.Label4.TabIndex = 4
|
||||
Me.Label4.Text = "Überstunden 50% (Sa)"
|
||||
'
|
||||
'txt100
|
||||
'
|
||||
Me.txt100.Location = New System.Drawing.Point(16, 27)
|
||||
Me.txt100.Name = "txt100"
|
||||
Me.txt100.ReadOnly = True
|
||||
Me.txt100.Size = New System.Drawing.Size(47, 20)
|
||||
Me.txt100.TabIndex = 5
|
||||
Me.txt100.Text = "0"
|
||||
'
|
||||
'txt50
|
||||
'
|
||||
Me.txt50.Location = New System.Drawing.Point(16, 69)
|
||||
Me.txt50.Name = "txt50"
|
||||
Me.txt50.ReadOnly = True
|
||||
Me.txt50.Size = New System.Drawing.Size(47, 20)
|
||||
Me.txt50.TabIndex = 6
|
||||
Me.txt50.Text = "0"
|
||||
'
|
||||
'txtMehr
|
||||
'
|
||||
Me.txtMehr.Location = New System.Drawing.Point(15, 147)
|
||||
Me.txtMehr.Name = "txtMehr"
|
||||
Me.txtMehr.ReadOnly = True
|
||||
Me.txtMehr.Size = New System.Drawing.Size(47, 20)
|
||||
Me.txtMehr.TabIndex = 7
|
||||
Me.txtMehr.Text = "0"
|
||||
'
|
||||
'txtAusz
|
||||
'
|
||||
Me.txtAusz.Location = New System.Drawing.Point(192, 196)
|
||||
Me.txtAusz.Name = "txtAusz"
|
||||
Me.txtAusz.Size = New System.Drawing.Size(54, 20)
|
||||
Me.txtAusz.TabIndex = 9
|
||||
Me.txtAusz.Text = "0"
|
||||
'
|
||||
'lblMA
|
||||
'
|
||||
Me.lblMA.AutoSize = True
|
||||
Me.lblMA.Location = New System.Drawing.Point(238, 6)
|
||||
Me.lblMA.Name = "lblMA"
|
||||
Me.lblMA.Size = New System.Drawing.Size(56, 13)
|
||||
Me.lblMA.TabIndex = 10
|
||||
Me.lblMA.Text = "Mitarbeiter"
|
||||
'
|
||||
'Label7
|
||||
'
|
||||
Me.Label7.AutoSize = True
|
||||
Me.Label7.Location = New System.Drawing.Point(238, 26)
|
||||
Me.Label7.Name = "Label7"
|
||||
Me.Label7.Size = New System.Drawing.Size(65, 13)
|
||||
Me.Label7.TabIndex = 11
|
||||
Me.Label7.Text = "Mustermann"
|
||||
'
|
||||
'Button1
|
||||
'
|
||||
Me.Button1.DialogResult = System.Windows.Forms.DialogResult.OK
|
||||
Me.Button1.Location = New System.Drawing.Point(321, 170)
|
||||
Me.Button1.Name = "Button1"
|
||||
Me.Button1.Size = New System.Drawing.Size(87, 30)
|
||||
Me.Button1.TabIndex = 12
|
||||
Me.Button1.Text = "Auszahlen"
|
||||
Me.Button1.UseVisualStyleBackColor = True
|
||||
'
|
||||
'txt100x2
|
||||
'
|
||||
Me.txt100x2.Location = New System.Drawing.Point(112, 27)
|
||||
Me.txt100x2.Name = "txt100x2"
|
||||
Me.txt100x2.ReadOnly = True
|
||||
Me.txt100x2.Size = New System.Drawing.Size(49, 20)
|
||||
Me.txt100x2.TabIndex = 14
|
||||
Me.txt100x2.Text = "0"
|
||||
'
|
||||
'txt50x15
|
||||
'
|
||||
Me.txt50x15.Location = New System.Drawing.Point(112, 69)
|
||||
Me.txt50x15.Name = "txt50x15"
|
||||
Me.txt50x15.ReadOnly = True
|
||||
Me.txt50x15.Size = New System.Drawing.Size(49, 20)
|
||||
Me.txt50x15.TabIndex = 15
|
||||
Me.txt50x15.Text = "0"
|
||||
'
|
||||
'txtAusz100
|
||||
'
|
||||
Me.txtAusz100.Location = New System.Drawing.Point(197, 27)
|
||||
Me.txtAusz100.Name = "txtAusz100"
|
||||
Me.txtAusz100.ReadOnly = True
|
||||
Me.txtAusz100.Size = New System.Drawing.Size(54, 20)
|
||||
Me.txtAusz100.TabIndex = 16
|
||||
Me.txtAusz100.Text = "0"
|
||||
'
|
||||
'txtAusz50
|
||||
'
|
||||
Me.txtAusz50.Location = New System.Drawing.Point(197, 69)
|
||||
Me.txtAusz50.Name = "txtAusz50"
|
||||
Me.txtAusz50.ReadOnly = True
|
||||
Me.txtAusz50.Size = New System.Drawing.Size(54, 20)
|
||||
Me.txtAusz50.TabIndex = 17
|
||||
Me.txtAusz50.Text = "0"
|
||||
'
|
||||
'CheckVatTestService1
|
||||
'
|
||||
Me.CheckVatTestService1.Credentials = Nothing
|
||||
Me.CheckVatTestService1.Url = "http://ec.europa.eu/taxation_customs/vies/services/checkVatTestService"
|
||||
Me.CheckVatTestService1.UseDefaultCredentials = False
|
||||
'
|
||||
'cbxabwDatum
|
||||
'
|
||||
Me.cbxabwDatum.AutoSize = True
|
||||
Me.cbxabwDatum.Location = New System.Drawing.Point(15, 5)
|
||||
Me.cbxabwDatum.Name = "cbxabwDatum"
|
||||
Me.cbxabwDatum.Size = New System.Drawing.Size(129, 17)
|
||||
Me.cbxabwDatum.TabIndex = 18
|
||||
Me.cbxabwDatum.Text = "abweichendes Datum"
|
||||
Me.cbxabwDatum.UseVisualStyleBackColor = True
|
||||
'
|
||||
'lblBis
|
||||
'
|
||||
Me.lblBis.AutoSize = True
|
||||
Me.lblBis.Location = New System.Drawing.Point(134, 25)
|
||||
Me.lblBis.Name = "lblBis"
|
||||
Me.lblBis.Size = New System.Drawing.Size(20, 13)
|
||||
Me.lblBis.TabIndex = 20
|
||||
Me.lblBis.Text = "bis"
|
||||
Me.lblBis.Visible = False
|
||||
'
|
||||
'dtpBis
|
||||
'
|
||||
Me.dtpBis.CustomFormat = "yyyy/MM/dd"
|
||||
Me.dtpBis.Format = System.Windows.Forms.DateTimePickerFormat.Custom
|
||||
Me.dtpBis.Location = New System.Drawing.Point(137, 41)
|
||||
Me.dtpBis.Name = "dtpBis"
|
||||
Me.dtpBis.Size = New System.Drawing.Size(81, 20)
|
||||
Me.dtpBis.TabIndex = 19
|
||||
Me.dtpBis.Visible = False
|
||||
'
|
||||
'txtSummeAuszb
|
||||
'
|
||||
Me.txtSummeAuszb.Location = New System.Drawing.Point(110, 196)
|
||||
Me.txtSummeAuszb.Name = "txtSummeAuszb"
|
||||
Me.txtSummeAuszb.ReadOnly = True
|
||||
Me.txtSummeAuszb.Size = New System.Drawing.Size(49, 20)
|
||||
Me.txtSummeAuszb.TabIndex = 21
|
||||
Me.txtSummeAuszb.Text = "0"
|
||||
'
|
||||
'txtberAusz50
|
||||
'
|
||||
Me.txtberAusz50.Location = New System.Drawing.Point(291, 69)
|
||||
Me.txtberAusz50.Name = "txtberAusz50"
|
||||
Me.txtberAusz50.ReadOnly = True
|
||||
Me.txtberAusz50.Size = New System.Drawing.Size(54, 20)
|
||||
Me.txtberAusz50.TabIndex = 24
|
||||
Me.txtberAusz50.Text = "0"
|
||||
'
|
||||
'txtberAusz100
|
||||
'
|
||||
Me.txtberAusz100.Location = New System.Drawing.Point(291, 27)
|
||||
Me.txtberAusz100.Name = "txtberAusz100"
|
||||
Me.txtberAusz100.ReadOnly = True
|
||||
Me.txtberAusz100.Size = New System.Drawing.Size(54, 20)
|
||||
Me.txtberAusz100.TabIndex = 23
|
||||
Me.txtberAusz100.Text = "0"
|
||||
'
|
||||
'Label1
|
||||
'
|
||||
Me.Label1.AutoSize = True
|
||||
Me.Label1.Location = New System.Drawing.Point(289, 11)
|
||||
Me.Label1.Name = "Label1"
|
||||
Me.Label1.Size = New System.Drawing.Size(92, 13)
|
||||
Me.Label1.TabIndex = 25
|
||||
Me.Label1.Text = "bereits ausgezahlt"
|
||||
'
|
||||
'txtlfdSaldo
|
||||
'
|
||||
Me.txtlfdSaldo.Location = New System.Drawing.Point(17, 108)
|
||||
Me.txtlfdSaldo.Name = "txtlfdSaldo"
|
||||
Me.txtlfdSaldo.ReadOnly = True
|
||||
Me.txtlfdSaldo.Size = New System.Drawing.Size(49, 20)
|
||||
Me.txtlfdSaldo.TabIndex = 26
|
||||
Me.txtlfdSaldo.Text = "0"
|
||||
'
|
||||
'Label6
|
||||
'
|
||||
Me.Label6.AutoSize = True
|
||||
Me.Label6.Location = New System.Drawing.Point(18, 92)
|
||||
Me.Label6.Name = "Label6"
|
||||
Me.Label6.Size = New System.Drawing.Size(48, 13)
|
||||
Me.Label6.TabIndex = 27
|
||||
Me.Label6.Text = "lfd Saldo"
|
||||
'
|
||||
'picDel
|
||||
'
|
||||
Me.picDel.BackgroundImage = Global.VERAG_PROG_ALLGEMEIN.My.Resources.Resources.del
|
||||
Me.picDel.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom
|
||||
Me.picDel.Location = New System.Drawing.Point(387, 11)
|
||||
Me.picDel.Name = "picDel"
|
||||
Me.picDel.Size = New System.Drawing.Size(21, 16)
|
||||
Me.picDel.TabIndex = 28
|
||||
Me.picDel.TabStop = False
|
||||
'
|
||||
'txtAusz50vonSaldo
|
||||
'
|
||||
Me.txtAusz50vonSaldo.Location = New System.Drawing.Point(197, 108)
|
||||
Me.txtAusz50vonSaldo.Name = "txtAusz50vonSaldo"
|
||||
Me.txtAusz50vonSaldo.ReadOnly = True
|
||||
Me.txtAusz50vonSaldo.Size = New System.Drawing.Size(49, 20)
|
||||
Me.txtAusz50vonSaldo.TabIndex = 29
|
||||
Me.txtAusz50vonSaldo.Text = "0"
|
||||
'
|
||||
'Panel1
|
||||
'
|
||||
Me.Panel1.Controls.Add(Me.cbxoverwrite)
|
||||
Me.Panel1.Controls.Add(Me.Label8)
|
||||
Me.Panel1.Controls.Add(Me.txt50x1)
|
||||
Me.Panel1.Controls.Add(Me.Label2)
|
||||
Me.Panel1.Controls.Add(Me.txtAusz50vonSaldo)
|
||||
Me.Panel1.Controls.Add(Me.Label3)
|
||||
Me.Panel1.Controls.Add(Me.picDel)
|
||||
Me.Panel1.Controls.Add(Me.Label4)
|
||||
Me.Panel1.Controls.Add(Me.Label6)
|
||||
Me.Panel1.Controls.Add(Me.txt100)
|
||||
Me.Panel1.Controls.Add(Me.txtlfdSaldo)
|
||||
Me.Panel1.Controls.Add(Me.txt50)
|
||||
Me.Panel1.Controls.Add(Me.Label1)
|
||||
Me.Panel1.Controls.Add(Me.txtMehr)
|
||||
Me.Panel1.Controls.Add(Me.txtberAusz50)
|
||||
Me.Panel1.Controls.Add(Me.txtberAusz100)
|
||||
Me.Panel1.Controls.Add(Me.txtAusz)
|
||||
Me.Panel1.Controls.Add(Me.txtSummeAuszb)
|
||||
Me.Panel1.Controls.Add(Me.Button1)
|
||||
Me.Panel1.Controls.Add(Me.txt100x2)
|
||||
Me.Panel1.Controls.Add(Me.txt50x15)
|
||||
Me.Panel1.Controls.Add(Me.txtAusz100)
|
||||
Me.Panel1.Controls.Add(Me.txtAusz50)
|
||||
Me.Panel1.Location = New System.Drawing.Point(15, 67)
|
||||
Me.Panel1.Name = "Panel1"
|
||||
Me.Panel1.Size = New System.Drawing.Size(421, 235)
|
||||
Me.Panel1.TabIndex = 30
|
||||
'
|
||||
'Label8
|
||||
'
|
||||
Me.Label8.AutoSize = True
|
||||
Me.Label8.Location = New System.Drawing.Point(194, 179)
|
||||
Me.Label8.Name = "Label8"
|
||||
Me.Label8.Size = New System.Drawing.Size(56, 13)
|
||||
Me.Label8.TabIndex = 33
|
||||
Me.Label8.Text = "Auszahlen"
|
||||
'
|
||||
'txt50x1
|
||||
'
|
||||
Me.txt50x1.Location = New System.Drawing.Point(112, 108)
|
||||
Me.txt50x1.Name = "txt50x1"
|
||||
Me.txt50x1.ReadOnly = True
|
||||
Me.txt50x1.Size = New System.Drawing.Size(49, 20)
|
||||
Me.txt50x1.TabIndex = 32
|
||||
Me.txt50x1.Text = "0"
|
||||
'
|
||||
'dgvUeberstunden
|
||||
'
|
||||
Me.dgvUeberstunden.AKTUALISIERUNGS_INTERVALL = -1
|
||||
Me.dgvUeberstunden.AllowUserToAddRows = False
|
||||
Me.dgvUeberstunden.AllowUserToDeleteRows = False
|
||||
Me.dgvUeberstunden.BackgroundColor = System.Drawing.Color.White
|
||||
Me.dgvUeberstunden.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
|
||||
Me.dgvUeberstunden.Location = New System.Drawing.Point(381, 12)
|
||||
Me.dgvUeberstunden.Name = "dgvUeberstunden"
|
||||
Me.dgvUeberstunden.ReadOnly = True
|
||||
Me.dgvUeberstunden.Size = New System.Drawing.Size(32, 20)
|
||||
Me.dgvUeberstunden.TabIndex = 13
|
||||
Me.dgvUeberstunden.Visible = False
|
||||
'
|
||||
'cbxoverwrite
|
||||
'
|
||||
Me.cbxoverwrite.AutoSize = True
|
||||
Me.cbxoverwrite.Checked = True
|
||||
Me.cbxoverwrite.CheckState = System.Windows.Forms.CheckState.Checked
|
||||
Me.cbxoverwrite.Location = New System.Drawing.Point(59, 179)
|
||||
Me.cbxoverwrite.Name = "cbxoverwrite"
|
||||
Me.cbxoverwrite.Size = New System.Drawing.Size(102, 17)
|
||||
Me.cbxoverwrite.TabIndex = 31
|
||||
Me.cbxoverwrite.Text = "max. auszahlbar"
|
||||
Me.cbxoverwrite.UseVisualStyleBackColor = True
|
||||
'
|
||||
'frmUeberstundenauszahlen
|
||||
'
|
||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
|
||||
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
|
||||
Me.ClientSize = New System.Drawing.Size(463, 337)
|
||||
Me.Controls.Add(Me.Panel1)
|
||||
Me.Controls.Add(Me.lblBis)
|
||||
Me.Controls.Add(Me.dtpBis)
|
||||
Me.Controls.Add(Me.cbxabwDatum)
|
||||
Me.Controls.Add(Me.dgvUeberstunden)
|
||||
Me.Controls.Add(Me.Label7)
|
||||
Me.Controls.Add(Me.lblMA)
|
||||
Me.Controls.Add(Me.lblMonat)
|
||||
Me.Controls.Add(Me.dtpMonat)
|
||||
Me.Name = "frmUeberstundenauszahlen"
|
||||
Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen
|
||||
Me.Text = "Überstunden auszahlen"
|
||||
CType(Me.picDel, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
Me.Panel1.ResumeLayout(False)
|
||||
Me.Panel1.PerformLayout()
|
||||
CType(Me.dgvUeberstunden, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
Me.ResumeLayout(False)
|
||||
Me.PerformLayout()
|
||||
|
||||
End Sub
|
||||
|
||||
Friend WithEvents dtpMonat As Windows.Forms.DateTimePicker
|
||||
Friend WithEvents lblMonat As Windows.Forms.Label
|
||||
Friend WithEvents Label2 As Windows.Forms.Label
|
||||
Friend WithEvents Label3 As Windows.Forms.Label
|
||||
Friend WithEvents Label4 As Windows.Forms.Label
|
||||
Friend WithEvents txt100 As Windows.Forms.TextBox
|
||||
Friend WithEvents txt50 As Windows.Forms.TextBox
|
||||
Friend WithEvents txtMehr As Windows.Forms.TextBox
|
||||
Friend WithEvents txtAusz As Windows.Forms.TextBox
|
||||
Friend WithEvents lblMA As Windows.Forms.Label
|
||||
Friend WithEvents Label7 As Windows.Forms.Label
|
||||
Friend WithEvents Button1 As Windows.Forms.Button
|
||||
Friend WithEvents dgvUeberstunden As MyDatagridview
|
||||
Friend WithEvents txt100x2 As Windows.Forms.TextBox
|
||||
Friend WithEvents txt50x15 As Windows.Forms.TextBox
|
||||
Friend WithEvents txtAusz100 As Windows.Forms.TextBox
|
||||
Friend WithEvents txtAusz50 As Windows.Forms.TextBox
|
||||
Friend WithEvents CheckVatTestService1 As eu.europa.ec.checkVatTestService
|
||||
Friend WithEvents cbxabwDatum As Windows.Forms.CheckBox
|
||||
Friend WithEvents lblBis As Windows.Forms.Label
|
||||
Friend WithEvents dtpBis As Windows.Forms.DateTimePicker
|
||||
Friend WithEvents txtSummeAuszb As Windows.Forms.TextBox
|
||||
Friend WithEvents txtberAusz50 As Windows.Forms.TextBox
|
||||
Friend WithEvents txtberAusz100 As Windows.Forms.TextBox
|
||||
Friend WithEvents Label1 As Windows.Forms.Label
|
||||
Friend WithEvents txtlfdSaldo As Windows.Forms.TextBox
|
||||
Friend WithEvents Label6 As Windows.Forms.Label
|
||||
Friend WithEvents picDel As Windows.Forms.PictureBox
|
||||
Friend WithEvents txtAusz50vonSaldo As Windows.Forms.TextBox
|
||||
Friend WithEvents Panel1 As Windows.Forms.Panel
|
||||
Friend WithEvents txt50x1 As Windows.Forms.TextBox
|
||||
Friend WithEvents Label8 As Windows.Forms.Label
|
||||
Friend WithEvents cbxoverwrite As Windows.Forms.CheckBox
|
||||
End Class
|
||||
@@ -0,0 +1,123 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="CheckVatTestService1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
</root>
|
||||
@@ -0,0 +1,450 @@
|
||||
Imports System.Runtime.InteropServices.ComTypes
|
||||
Imports System.Threading
|
||||
Imports System.Windows.Forms
|
||||
Imports Microsoft.Office.Interop.Outlook
|
||||
Imports Therefore.API
|
||||
|
||||
Public Class frmUeberstundenauszahlen
|
||||
|
||||
Dim MA As cMitarbeiter = Nothing
|
||||
Dim timas As cTimasAPI = New cTimasAPI
|
||||
Dim dt As New DataTable
|
||||
Dim timeaccountdt As New DataTable
|
||||
Dim dtResult As New DataTable
|
||||
Dim tag As cFeiertage
|
||||
Dim auszahlugsdatum As New Date
|
||||
Dim maxUberstundenpruefung As Boolean = True
|
||||
Dim stunden100ausz, stunden50ausz, stunden100auszbere, stunden50auszbere, stunden100bereitsausbezahl, stunden50bereitsausbezahlt, mehrabeit, stundenlfdSaldo, stundenlfdSaldobere As Double
|
||||
|
||||
|
||||
Sub New(mit_id)
|
||||
|
||||
' Dieser Aufruf ist für den Designer erforderlich.
|
||||
InitializeComponent()
|
||||
|
||||
' Fügen Sie Initialisierungen nach dem InitializeComponent()-Aufruf hinzu.
|
||||
MA = New cMitarbeiter(mit_id)
|
||||
tag = New cFeiertage(DateTime.Parse(dtpMonat.Value).Year)
|
||||
Label7.Text = MA.mit_vname & " " & MA.mit_nname
|
||||
timas.getTimeaccountList(dt)
|
||||
|
||||
|
||||
Dim dv = New DataView(dt)
|
||||
dv.RowFilter = "info like '%zuschlag%' Or name = 'Mehrarbeit' Or name like 'Überstunden%' Or info like 'Auszahlungskonto%' Or name like '%01-Lfd Saldo%'"
|
||||
timeaccountdt = dv.ToTable
|
||||
|
||||
getUeberstunden(False)
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub cbxoverwrite_CheckedChanged(sender As Object, e As EventArgs) Handles cbxoverwrite.CheckedChanged
|
||||
|
||||
If Not cbxoverwrite.Checked Then
|
||||
maxUberstundenpruefung = False 'Limit für max. auszahlbar deaktivieren!
|
||||
Else
|
||||
If Not maxUberstundenpruefung Then
|
||||
maxUberstundenpruefung = True
|
||||
getUeberstunden(cbxabwDatum.Checked)
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub DateTimePicker1_ValueChanged(sender As Object, e As EventArgs) Handles dtpMonat.ValueChanged, dtpBis.ValueChanged
|
||||
getUeberstunden(cbxabwDatum.Checked)
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub getUeberstunden(abwDatum As Boolean)
|
||||
|
||||
Dim startdate, enddate As Date
|
||||
If timeaccountdt IsNot Nothing Then
|
||||
|
||||
If abwDatum Then
|
||||
startdate = (dtpMonat.Value)
|
||||
enddate = (dtpBis.Value)
|
||||
auszahlugsdatum = enddate
|
||||
Else
|
||||
startdate = tag.GetFirstyDayYInxMonth(DateTime.Parse(dtpMonat.Value).DayOfWeek, DateTime.Parse(dtpMonat.Value).Month, DateTime.Parse(dtpMonat.Value).Year, True)
|
||||
enddate = tag.GetLastyDayYInxMonth(DateTime.Parse(dtpMonat.Value).DayOfWeek, DateTime.Parse(dtpMonat.Value).Month, DateTime.Parse(dtpMonat.Value).Year, True)
|
||||
auszahlugsdatum = enddate
|
||||
End If
|
||||
|
||||
timas.getTimeAccounts(startdate, enddate, MA.mit_timasId, timeaccountdt, dtResult)
|
||||
|
||||
If dtResult.Rows.Count < 1 Then
|
||||
MsgBox("Für den gewählten Zeitraum konnten keine Stunden ermittelt werden!")
|
||||
Panel1.Enabled = False
|
||||
Exit Sub
|
||||
Else
|
||||
Panel1.Enabled = True
|
||||
End If
|
||||
|
||||
Dim dt = calcUeberstunden(timeaccountdt, dtResult)
|
||||
fillFields(dt)
|
||||
dgvUeberstunden.DataSource = dt
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
Private Function calcUeberstunden(dtAccouts As DataTable, dtSumUeberstunden As DataTable) As DataTable
|
||||
Dim dtmerged As 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
|
||||
dtmerged.Columns.Remove("accountType")
|
||||
dtmerged.AcceptChanges()
|
||||
End If
|
||||
|
||||
If (dtmerged.Columns.Contains("info")) Then
|
||||
dtmerged.Columns.Remove("info")
|
||||
dtmerged.AcceptChanges()
|
||||
End If
|
||||
|
||||
If (dtmerged.Columns.Contains("number")) Then
|
||||
dtmerged.Columns.Remove("number")
|
||||
dtmerged.AcceptChanges()
|
||||
End If
|
||||
|
||||
If (dtmerged.Columns.Contains("date")) Then
|
||||
dtmerged.Columns.Remove("date")
|
||||
dtmerged.AcceptChanges()
|
||||
End If
|
||||
|
||||
|
||||
Dim groups = dtmerged.AsEnumerable().
|
||||
GroupBy(Function(row) New With {
|
||||
Key .Id = row.Field(Of Integer)("accountid"),
|
||||
Key .Multi = row.Field(Of String)("multiplier")
|
||||
})
|
||||
|
||||
Dim tableResult = dtmerged.Clone()
|
||||
For Each grp In groups
|
||||
|
||||
tableResult.Rows.Add(grp.Key.Id, grp.Key.Multi,
|
||||
grp.Sum(Function(row)
|
||||
Dim value = 0
|
||||
If Not IsDBNull(row.Item("value")) Then value = row.Item("value")
|
||||
Return value
|
||||
End Function))
|
||||
Next
|
||||
|
||||
|
||||
End If
|
||||
Return dtmerged
|
||||
End Function
|
||||
|
||||
Public Sub fillFields(dt As DataTable)
|
||||
|
||||
'69 10-Na 22-06
|
||||
'70 11-Sa 00-24 ===> 50%
|
||||
'72 13-So 00-24
|
||||
'73 14-FtN 00-24
|
||||
'1209 Mehrarbeit
|
||||
'1235 Überstunden 100% gesamt ===> 100%
|
||||
|
||||
picDel.Visible = False
|
||||
|
||||
For Each c As Control In Panel1.Controls
|
||||
If TypeOf c Is TextBox Then
|
||||
c.Text = "0"
|
||||
End If
|
||||
Next
|
||||
|
||||
stunden50bereitsausbezahlt = 0
|
||||
stunden100bereitsausbezahl = 0
|
||||
|
||||
|
||||
If dt IsNot Nothing AndAlso dt.Rows.Count > 0 Then
|
||||
Dim calc As Double = 0
|
||||
For Each r As DataRow In dt.Rows
|
||||
If Not IsDBNull(r.Item("value")) Then
|
||||
|
||||
If r.Item("accountid") = "1209" Then
|
||||
calc = CDbl(txtMehr.Text)
|
||||
calc += r.Item("value") * (r.Item("multiplier") & "1")
|
||||
txtMehr.Text = calc
|
||||
mehrabeit = calc
|
||||
End If
|
||||
|
||||
If r.Item("accountid") = "1235" Then
|
||||
calc = CDbl(txt100.Text)
|
||||
calc += r.Item("value") * (r.Item("multiplier") & "1")
|
||||
txt100.Text = calc
|
||||
stunden100ausz = calc
|
||||
End If
|
||||
|
||||
If r.Item("accountid") = "70" Then
|
||||
calc = CDbl(txt50.Text)
|
||||
calc += r.Item("value") * (r.Item("multiplier") & "1")
|
||||
txt50.Text = calc
|
||||
stunden50ausz = calc
|
||||
End If
|
||||
|
||||
|
||||
If r.Item("accountid") = "1550" Then
|
||||
calc = CDbl(txtberAusz100.Text)
|
||||
calc += r.Item("value") * (r.Item("multiplier") & "1")
|
||||
txtberAusz100.Text = calc
|
||||
stunden100bereitsausbezahl = calc
|
||||
End If
|
||||
|
||||
If r.Item("accountid") = "1551" Then
|
||||
calc = CDbl(txtberAusz50.Text)
|
||||
calc += r.Item("value") * (r.Item("multiplier") & "1")
|
||||
txtberAusz50.Text = calc
|
||||
stunden50bereitsausbezahlt = calc
|
||||
End If
|
||||
|
||||
'Berechnung von lfd Saldo im Zeitraum -> deaktiviert, es soll immer der aktuelle Saldo gezogen werden, egal in welchem Monat ich bin (22.02.2024)
|
||||
'If r.Item("accountid") = "65" Then
|
||||
' calc = CDbl(txtlfdSaldo.Text)
|
||||
' calc += r.Item("value") * (r.Item("multiplier") & "1")
|
||||
' txtlfdSaldo.Text = calc
|
||||
'End If
|
||||
|
||||
End If
|
||||
Next
|
||||
|
||||
If (stunden100bereitsausbezahl + stunden50bereitsausbezahlt) > 0 Then
|
||||
picDel.Visible = True
|
||||
Button1.Enabled = False
|
||||
txtAusz.Enabled = False
|
||||
Else
|
||||
Button1.Enabled = True
|
||||
txtAusz.Enabled = True
|
||||
End If
|
||||
|
||||
stunden100auszbere = stunden100ausz * 2
|
||||
stunden50auszbere = stunden50ausz * 1.5
|
||||
|
||||
txt100x2.Text = stunden100auszbere
|
||||
txt50x15.Text = stunden50auszbere
|
||||
|
||||
'If CDbl(txtlfdSaldo.Text) < 0 Or auszahlugsdatum.Month = Today.Month AndAlso auszahlugsdatum.Year = Today.Year Then
|
||||
'wenn berechneter Saldo negativ, dann ist im Regelfall das aktuelle MOnat noch nicht abgeschlossen!, daher anstatt den berechneten Saldo in overallBalance laden!
|
||||
txtlfdSaldo.Text = timas.getTimeSaldo(MA.mit_timasId, "", "overallBalance")
|
||||
|
||||
'End If
|
||||
|
||||
|
||||
stundenlfdSaldo = CDbl(txtlfdSaldo.Text)
|
||||
stundenlfdSaldobere = stundenlfdSaldo
|
||||
|
||||
stundenlfdSaldobere -= stunden100auszbere
|
||||
stundenlfdSaldobere -= stunden50auszbere
|
||||
stundenlfdSaldobere = Math.Round(stundenlfdSaldobere, 2)
|
||||
|
||||
|
||||
If stundenlfdSaldo <= 0 Then Button1.Enabled = False
|
||||
|
||||
txtSummeAuszb.Text = stundenlfdSaldo
|
||||
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub txtAusz_TextChanged(sender As Object, e As EventArgs) Handles txtAusz.TextChanged
|
||||
|
||||
|
||||
|
||||
If txtAusz.Text <> "" AndAlso IsNumeric(txtAusz.Text) Then
|
||||
|
||||
Dim summeAusz = CDbl(txtAusz.Text)
|
||||
If summeAusz <= 0 Then
|
||||
txtAusz50vonSaldo.Text = "0"
|
||||
txtAusz50.Text = "0"
|
||||
txtAusz100.Text = "0"
|
||||
txtAusz.Text = "0"
|
||||
Button1.Enabled = False
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
txt100x2.Text = stunden100auszbere
|
||||
txt50x15.Text = stunden50auszbere
|
||||
txt50x1.Text = stundenlfdSaldobere
|
||||
|
||||
If stundenlfdSaldo >= summeAusz Then 'Prüfung, damit nicht zuviele ÜS ausbezahlt werden können!
|
||||
|
||||
Button1.Enabled = True
|
||||
|
||||
Else
|
||||
If maxUberstundenpruefung Then
|
||||
Button1.Enabled = False
|
||||
Else
|
||||
Button1.Enabled = True
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
|
||||
If summeAusz >= stunden100auszbere Then
|
||||
txtAusz100.Text = stunden100auszbere
|
||||
Else
|
||||
txtAusz100.Text = summeAusz
|
||||
End If
|
||||
|
||||
summeAusz = Math.Round(summeAusz - stunden100auszbere, 2)
|
||||
|
||||
If summeAusz >= stunden50auszbere Then
|
||||
txtAusz50.Text = stunden50auszbere
|
||||
summeAusz = Math.Round(summeAusz - stunden50auszbere, 2)
|
||||
ElseIf summeAusz < 0 Then
|
||||
txtAusz50.Text = "0"
|
||||
Else
|
||||
txtAusz50.Text = summeAusz
|
||||
summeAusz = Math.Round(summeAusz - stunden50auszbere, 2)
|
||||
End If
|
||||
|
||||
If summeAusz >= stundenlfdSaldo Then
|
||||
txtAusz50vonSaldo.Text = stundenlfdSaldo
|
||||
summeAusz = Math.Round(summeAusz - stundenlfdSaldo, 2)
|
||||
ElseIf summeAusz < 0 Then
|
||||
txtAusz50vonSaldo.Text = "0"
|
||||
Else
|
||||
txtAusz50vonSaldo.Text = summeAusz
|
||||
summeAusz = Math.Round(summeAusz - stundenlfdSaldo, 2)
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub cbxabwDatum_CheckedChanged(sender As Object, e As EventArgs) Handles cbxabwDatum.CheckedChanged
|
||||
If cbxabwDatum.Checked Then
|
||||
lblBis.Visible = True
|
||||
dtpBis.Visible = True
|
||||
lblMonat.Text = "bis"
|
||||
dtpMonat.CustomFormat = "yyyy/MM/dd"
|
||||
|
||||
Else
|
||||
lblBis.Visible = False
|
||||
dtpBis.Visible = False
|
||||
lblMonat.Text = "Monat"
|
||||
dtpMonat.CustomFormat = "yyyy/MM"
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
|
||||
|
||||
|
||||
Dim sum100, sum50, sum0, gesamt As Double
|
||||
sum100 = RoundOfDigits(CDbl(txtAusz100.Text) * 0.5, 2) 'Übergabe in ZE-System als heruntergerechnete 100%ige bzw. 50%ige ÜS!
|
||||
sum50 = RoundOfDigits(CDbl(txtAusz50.Text) * 100 / 150, 2)
|
||||
sum0 = CDbl(txtAusz50vonSaldo.Text)
|
||||
gesamt = CDbl(txtAusz.Text)
|
||||
|
||||
Dim aksAuszahlung As MsgBoxResult = MsgBox("Überstunden für " & MA.mit_vname & " " & MA.mit_nname & " mit " & auszahlugsdatum.ToShortDateString() & " auszahlen?" & vbNewLine & sum100 & "x 100% ÜS :" & txtAusz100.Text & vbNewLine & sum50 & "x 50% ÜS: " & CDbl(txtAusz50.Text) + CDbl(txtAusz50vonSaldo.Text) & vbNewLine & "ÜS gesamt: " & gesamt, vbYesNo)
|
||||
|
||||
If aksAuszahlung = vbYes Then
|
||||
Dim dtsetEntries As New DataTable
|
||||
|
||||
dtsetEntries.Columns.Add("accountid", GetType(Integer))
|
||||
dtsetEntries.Columns.Add("value", GetType(String))
|
||||
|
||||
If sum100 >= 0 Then
|
||||
Dim row = dtsetEntries.NewRow
|
||||
row.Item("accountid") = 1550
|
||||
row.Item("value") = sum100.ToString.Replace(",", ".")
|
||||
dtsetEntries.Rows.InsertAt(row, dtsetEntries.Rows.Count)
|
||||
End If
|
||||
|
||||
If sum50 >= 0 Then
|
||||
Dim row = dtsetEntries.NewRow
|
||||
row.Item("accountid") = 1551
|
||||
row.Item("value") = sum50.ToString.Replace(",", ".")
|
||||
dtsetEntries.Rows.InsertAt(row, dtsetEntries.Rows.Count)
|
||||
End If
|
||||
|
||||
If sum0 >= 0 Then
|
||||
Dim row = dtsetEntries.NewRow
|
||||
row.Item("accountid") = 1551
|
||||
row.Item("value") = sum0.ToString.Replace(",", ".")
|
||||
dtsetEntries.Rows.InsertAt(row, dtsetEntries.Rows.Count)
|
||||
End If
|
||||
|
||||
If gesamt >= 0 Then 'vom ldf Saldo, ev. über API Möglich monatliche Korrektur direkt zu befüllen, dann muss dieser If Zweig überarbeitet werden!!!!!!!!!!!!!!
|
||||
Dim row = dtsetEntries.NewRow
|
||||
row.Item("accountid") = 993
|
||||
row.Item("value") = gesamt.ToString.Replace(",", ".")
|
||||
dtsetEntries.Rows.InsertAt(row, dtsetEntries.Rows.Count)
|
||||
End If
|
||||
|
||||
Dim ues As New cUeberstunden(MA.mit_id, auszahlugsdatum.ToShortDateString, Now())
|
||||
ues.uest_timasId = MA.mit_timasId
|
||||
ues.uest_100 = sum100
|
||||
ues.uest_50 = sum50
|
||||
ues.uest_0 = sum0
|
||||
ues.uest_systemuser = VERAG_PROG_ALLGEMEIN.cAllgemein.USRKURZNAME
|
||||
ues.uest_ignoreLimit = Not maxUberstundenpruefung
|
||||
ues.uest_maxUE = CDbl(txtSummeAuszb.Text)
|
||||
|
||||
|
||||
Dim info As String = ""
|
||||
If timas.setTimeAccountEntries(MA, dtsetEntries, auszahlugsdatum, info) AndAlso ues.SAVE() Then
|
||||
|
||||
MsgBox("Erfolgreich in Timas eingetragen")
|
||||
Else
|
||||
MsgBox(info)
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub picDel_Click(sender As Object, e As EventArgs) Handles picDel.Click
|
||||
Dim aksAuszahlung As MsgBoxResult = MsgBox("Ausbezahlte Überstunden für " & MA.mit_vname & " " & MA.mit_nname & " mit " & auszahlugsdatum.ToShortDateString() & " zurücksetzen?" & vbNewLine & "100% ÜS: " & txtberAusz100.Text & vbNewLine & "50% ÜS: " & txtberAusz50.Text & vbNewLine & "ÜS gesamt: " & CDbl(txtberAusz100.Text) + CDbl(txtberAusz50.Text), vbYesNo)
|
||||
If aksAuszahlung = vbYes Then
|
||||
Dim dtdeleteEntries As New DataTable
|
||||
|
||||
dtdeleteEntries.Columns.Add("accountid", GetType(Integer))
|
||||
|
||||
|
||||
Dim rowNew = dtdeleteEntries.NewRow
|
||||
rowNew.Item("accountid") = 993
|
||||
dtdeleteEntries.Rows.InsertAt(rowNew, dtdeleteEntries.Rows.Count)
|
||||
|
||||
If txtAusz100.Text <> "" AndAlso IsNumeric(txtAusz100.Text) Then
|
||||
Dim row = dtdeleteEntries.NewRow
|
||||
row.Item("accountid") = 1550
|
||||
dtdeleteEntries.Rows.InsertAt(row, dtdeleteEntries.Rows.Count)
|
||||
End If
|
||||
|
||||
If txtAusz50.Text <> "" AndAlso IsNumeric(txtAusz50.Text) Then
|
||||
Dim row = dtdeleteEntries.NewRow
|
||||
row.Item("accountid") = 1551
|
||||
dtdeleteEntries.Rows.InsertAt(row, dtdeleteEntries.Rows.Count)
|
||||
End If
|
||||
|
||||
If timas.deleteTimeAccounts(auszahlugsdatum, auszahlugsdatum, MA.mit_timasId, dtdeleteEntries) Then
|
||||
Dim ues As New cUeberstunden(MA.mit_id, auszahlugsdatum.ToShortDateString)
|
||||
ues.uest_deleted = True
|
||||
ues.uest_lastChanged = Now()
|
||||
ues.uest_systemuser = VERAG_PROG_ALLGEMEIN.cAllgemein.USRKURZNAME
|
||||
ues.SAVE()
|
||||
|
||||
MsgBox("Erfolgreich aus Timas zurückgesetzt!")
|
||||
picDel.Visible = False
|
||||
Thread.Sleep(1000) 'warten bis Eintrag in Timas-DB
|
||||
getUeberstunden(cbxabwDatum.Checked)
|
||||
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Public Function RoundOfDigits(ByVal Value As Decimal, ByVal Digits As Integer) As Decimal
|
||||
If Digits < 0 Then Return Math.Round(Value * CDec(Math.Pow(10, Digits)), 0, MidpointRounding.AwayFromZero) / CDec(Math.Pow(10, Digits))
|
||||
Return Math.Round(Value, Digits)
|
||||
End Function
|
||||
End Class
|
||||
@@ -370,6 +370,7 @@ Public Class cCreditSafeAPI
|
||||
company.csDFoundingDate = dateTime.GetAsTimestamp(getAsLocal)
|
||||
Debug.WriteLine(dateTime)
|
||||
|
||||
company.vatNo = basicInfoObj.StringOf("vatRegistrationNumber")
|
||||
|
||||
Dim principalActivityObj As Chilkat.JsonObject = basicInfoObj.ObjectOf("principalActivity")
|
||||
If (basicInfoObj.LastMethodSuccess = True) And company.csBusinessPurpose = "" Then
|
||||
@@ -608,9 +609,7 @@ Public Class cCreditSafeAPI
|
||||
Public Property csBusinessPurpose As String
|
||||
Public Property csShareholder As String
|
||||
Public Property csCEO As String
|
||||
|
||||
Public Property csTurnover As String
|
||||
|
||||
Public Property language As String
|
||||
|
||||
Public Property csBank As String
|
||||
|
||||
@@ -4,6 +4,7 @@ Imports System.Runtime.Remoting
|
||||
Imports System.Text
|
||||
Imports System.Threading
|
||||
Imports System.Windows.Forms
|
||||
Imports Microsoft.Office.Interop.Outlook
|
||||
|
||||
Public Class cTimasAPI
|
||||
|
||||
@@ -49,18 +50,19 @@ Public Class cTimasAPI
|
||||
|
||||
End Function
|
||||
|
||||
Public Sub getTimeSaldo(maid As Integer, ByRef info As String, ByRef Optional isEndpointRunning As Boolean = True)
|
||||
Public Function getTimeSaldo(maid As Integer, ByRef info As String, kindofbalance As String, ByRef Optional isEndpointRunning As Boolean = True) As Double
|
||||
Try
|
||||
Dim returnText As String = ""
|
||||
Dim failureText As String = ""
|
||||
Dim timesaldo As Double = -1
|
||||
|
||||
|
||||
If maid < 1 Then
|
||||
Exit Sub
|
||||
Return timesaldo
|
||||
End If
|
||||
|
||||
If Not checkConnectionTImas(failureText) Then
|
||||
Exit Sub
|
||||
Return timesaldo
|
||||
End If
|
||||
|
||||
|
||||
@@ -72,13 +74,13 @@ Public Class cTimasAPI
|
||||
Debug.WriteLine(rest.LastErrorText)
|
||||
isEndpointRunning = rest.LastMethodSuccess
|
||||
rest.IdleTimeoutMs = 30000 'defualt
|
||||
Exit Sub
|
||||
Return timesaldo
|
||||
End If
|
||||
|
||||
If (rest.ResponseStatusCode <> 200) Then
|
||||
Debug.WriteLine(rest.ResponseHeader)
|
||||
'lblTimas.Text = rest.ResponseStatusCode & " " & rest.ResponseStatusText
|
||||
Exit Sub
|
||||
Return timesaldo
|
||||
End If
|
||||
|
||||
Debug.WriteLine(responseJson)
|
||||
@@ -97,27 +99,30 @@ Public Class cTimasAPI
|
||||
'"monthlyBalance": -328380,
|
||||
'"actualTimeOfDay": 4260,
|
||||
|
||||
|
||||
Dim saldo = json.StringOf("dailyBalanceYesterday") 'Tagessaldo (gestern) in Sekunden
|
||||
|
||||
If saldo IsNot Nothing Then
|
||||
Dim saldoAsDouble = CDbl(saldo)
|
||||
saldoAsDouble = Math.Round(saldoAsDouble / 3600, 2)
|
||||
Dim infoBuilder As New StringBuilder
|
||||
'infoBuilder.Append("Vortag ")
|
||||
infoBuilder.Append(saldoAsDouble)
|
||||
infoBuilder.Append(" h")
|
||||
info = infoBuilder.ToString()
|
||||
If kindofbalance = "" Then
|
||||
info = "kindOfBalance nicht definiert! "
|
||||
Return timesaldo
|
||||
Else
|
||||
Dim saldo = json.StringOf(kindofbalance) 'Tagessaldo (gestern) in Sekunden
|
||||
If saldo IsNot Nothing Then
|
||||
Dim saldoAsDouble = CDbl(saldo)
|
||||
saldoAsDouble = Math.Round(saldoAsDouble / 3600, 2)
|
||||
Dim infoBuilder As New StringBuilder
|
||||
'infoBuilder.Append("Vortag ")
|
||||
infoBuilder.Append(saldoAsDouble)
|
||||
infoBuilder.Append(" h")
|
||||
info = infoBuilder.ToString()
|
||||
timesaldo = saldoAsDouble
|
||||
Return timesaldo
|
||||
End If
|
||||
Return timesaldo
|
||||
End If
|
||||
|
||||
|
||||
|
||||
|
||||
Catch ex As WebException
|
||||
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name)
|
||||
End Try
|
||||
|
||||
End Sub
|
||||
End Function
|
||||
|
||||
Public Function getTimeEntries(ByVal maid As Integer, ByRef dtZeiten As DataTable, Optional ByRef entryExistingToday As Boolean = True, Optional ByRef requestDone As Boolean = False, Optional ByRef isEndpointRunning As Boolean = True) As Boolean
|
||||
Try
|
||||
@@ -186,7 +191,7 @@ Public Class cTimasAPI
|
||||
Dim timeEntry As Chilkat.JsonObject = jsonArray.ObjectAt(j)
|
||||
|
||||
If IsDate(timeEntry.StringOf("stamp")) Then
|
||||
If CDate(timeEntry.StringOf("stamp")) >= CDate(Today()) Then
|
||||
If CDate(timeEntry.StringOf("stamp")) >= CDate(Today()) Or CDate(timeEntry.StringOf("stamp")) >= CDate(Today().AddDays(-1)) AndAlso CDate(timeEntry.StringOf("stamp")).Hour >= 16 Then 'entweder heute keine Stempelung oder gestern > 16 Uhr (wegen Nachtschicht!)
|
||||
|
||||
|
||||
Dim R As DataRow = dt.NewRow
|
||||
@@ -256,7 +261,7 @@ Public Class cTimasAPI
|
||||
success = json.UpdateString("importSign", "Import from Aviso")
|
||||
success = json.UpdateString("login", mitarbeiter.mit_username)
|
||||
success = json.UpdateBool("loginActive", 1)
|
||||
success = json.UpdateString("email", mitarbeiter.mit_email)
|
||||
success = json.UpdateString("email", IIf(mitarbeiter.mit_emailprivat <> "", mitarbeiter.mit_emailprivat, mitarbeiter.mit_email))
|
||||
success = json.UpdateString("street", mitarbeiter.mit_strasse)
|
||||
success = json.UpdateString("city", mitarbeiter.mit_ort)
|
||||
success = json.UpdateString("zipcode", mitarbeiter.mit_plz)
|
||||
@@ -902,7 +907,7 @@ Public Class cTimasAPI
|
||||
|
||||
If dt IsNot Nothing AndAlso Not dt.Columns.Contains("Id") Then
|
||||
dt.Columns.Add("Id", GetType(Integer))
|
||||
'dt.Columns.Add("externid", GetType(String))
|
||||
'dt.Columns.Add("Login", GetType(String))
|
||||
dt.Columns.Add("Personal-Nr (Lohn)", GetType(String))
|
||||
dt.Columns.Add("Vorname", GetType(String))
|
||||
dt.Columns.Add("Nachname", GetType(String))
|
||||
@@ -910,24 +915,22 @@ Public Class cTimasAPI
|
||||
dt.Columns.Add("Ausweis-Nr", GetType(Integer))
|
||||
dt.Columns.Add("Info", GetType(String))
|
||||
End If
|
||||
|
||||
dt.Clear()
|
||||
|
||||
Dim j As Integer = 0
|
||||
While j < num
|
||||
Dim j As Integer = 0
|
||||
While j < num
|
||||
|
||||
Dim employee As Chilkat.JsonObject = jsonArray.ObjectAt(j)
|
||||
|
||||
Dim R As DataRow = dt.NewRow
|
||||
R("Id") = employee.IntOf("id")
|
||||
'("externid") = employee.StringOf("externid")
|
||||
R("Personal-Nr (Lohn)") = employee.StringOf("pnr1")
|
||||
R("Vorname") = employee.StringOf("firstname")
|
||||
R("Nachname") = employee.StringOf("lastname")
|
||||
R("Geschlecht") = employee.StringOf("gender")
|
||||
R("Ausweis-Nr") = employee.IntOf("card")
|
||||
R("Info") = employee.StringOf("info")
|
||||
dt.Rows.Add(R)
|
||||
Dim employee As Chilkat.JsonObject = jsonArray.ObjectAt(j)
|
||||
Dim R As DataRow = dt.NewRow
|
||||
R("Id") = employee.IntOf("id")
|
||||
'R("Login") = employee.StringOf("login")
|
||||
R("Personal-Nr (Lohn)") = employee.StringOf("pnr1")
|
||||
R("Vorname") = employee.StringOf("firstname")
|
||||
R("Nachname") = employee.StringOf("lastname")
|
||||
R("Geschlecht") = employee.StringOf("gender")
|
||||
R("Ausweis-Nr") = employee.IntOf("card")
|
||||
R("Info") = employee.StringOf("info")
|
||||
dt.Rows.Add(R)
|
||||
j = j + 1
|
||||
End While
|
||||
|
||||
@@ -937,6 +940,274 @@ Public Class cTimasAPI
|
||||
End Try
|
||||
End Function
|
||||
|
||||
Public Sub getTimeAccounts(ByRef from As Date, ByRef toDate As Date, ByRef employeeNr As Integer, ByRef accountsdt As DataTable, ByRef dt As DataTable)
|
||||
|
||||
Try
|
||||
|
||||
Dim failureText As String = ""
|
||||
If Not checkConnectionTImas(failureText) Then
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
Dim success As Boolean
|
||||
|
||||
rest.ClearAllQueryParams()
|
||||
rest.AddQueryParam("from", from.Date.ToString("yyyy-MM-dd"))
|
||||
rest.AddQueryParam("to", toDate.Date.ToString("yyyy-MM-dd"))
|
||||
|
||||
Dim id As String = ""
|
||||
For Each row As DataRow In accountsdt.Rows
|
||||
id &= row("accountid") & ","
|
||||
Next
|
||||
rest.AddQueryParam("accounts", id)
|
||||
rest.AddQueryParam("employees", employeeNr)
|
||||
|
||||
Dim sbResponseBody As String
|
||||
|
||||
sbResponseBody = rest.FullRequestNoBody("GET", API_STRING & "/rest/web-api/accounts/values")
|
||||
If (rest.LastMethodSuccess <> True) Then
|
||||
Debug.WriteLine(rest.LastErrorText)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
If (rest.ResponseStatusCode <> 200) Then
|
||||
Debug.WriteLine(rest.ResponseStatusCode & " " & rest.ResponseStatusText & sbResponseBody.ToString)
|
||||
End If
|
||||
|
||||
Debug.WriteLine(sbResponseBody)
|
||||
|
||||
Dim jsonArray As New Chilkat.JsonArray
|
||||
success = jsonArray.Load(sbResponseBody)
|
||||
If (success <> True) Then
|
||||
Debug.WriteLine(jsonArray.LastErrorText)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
|
||||
Dim num As Integer = jsonArray.Size
|
||||
If num = -1 Then
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
If dt IsNot Nothing And Not dt.Columns.Contains("accountid") Then
|
||||
|
||||
dt.Columns.Add("accountid", GetType(Integer))
|
||||
dt.Columns.Add("date", GetType(String))
|
||||
dt.Columns.Add("value", GetType(Double))
|
||||
dt.Columns.Add("multiplier", GetType(String))
|
||||
Else
|
||||
dt.Clear()
|
||||
|
||||
End If
|
||||
|
||||
Dim j As Integer = 0
|
||||
While j < num
|
||||
|
||||
|
||||
Dim accounts As Chilkat.JsonObject = jsonArray.ObjectAt(j)
|
||||
If accounts.StringOf("value") <> "" Then
|
||||
Dim R As DataRow = dt.NewRow
|
||||
R("accountid") = accounts.IntOf("accountid")
|
||||
R("date") = accounts.StringOf("date")
|
||||
Dim timeToDouble = accounts.StringOf("value").Replace("-", "")
|
||||
Dim ts As TimeSpan = New TimeSpan(Integer.Parse(timeToDouble.Split(":"c)(0)), Integer.Parse(timeToDouble.Split(":"c)(1)), 0)
|
||||
R("value") = Math.Round(ts.TotalHours, 2)
|
||||
R("multiplier") = IIf(accounts.StringOf("value").Contains("-"), "-", "+")
|
||||
dt.Rows.Add(R)
|
||||
End If
|
||||
j = j + 1
|
||||
|
||||
End While
|
||||
|
||||
dt.DefaultView.Sort = " accountid asc, date asc"
|
||||
dt = dt.DefaultView.ToTable()
|
||||
|
||||
|
||||
Catch ex As WebException
|
||||
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name)
|
||||
End Try
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Public Function getTimeaccountList(ByRef dt As DataTable) As String
|
||||
|
||||
Dim failureText As String = ""
|
||||
|
||||
Try
|
||||
|
||||
If Not checkConnectionTImas(failureText) Then
|
||||
Return failureText
|
||||
|
||||
End If
|
||||
|
||||
Dim responseJson As String = rest.FullRequestNoBody("GET", "/rest/web-api/accounts/")
|
||||
If (rest.LastMethodSuccess <> True) Then
|
||||
Debug.WriteLine(rest.LastErrorText)
|
||||
Return rest.LastErrorText
|
||||
End If
|
||||
|
||||
If (rest.ResponseStatusCode <> 200) Then
|
||||
Debug.WriteLine(rest.ResponseHeader)
|
||||
failureText = rest.ResponseStatusCode & " " & rest.ResponseStatusText
|
||||
Return rest.ResponseStatusCode & " " & rest.ResponseStatusText
|
||||
End If
|
||||
|
||||
Debug.WriteLine(responseJson)
|
||||
|
||||
Dim jsonArray As New Chilkat.JsonArray
|
||||
Dim success As Boolean = jsonArray.Load(responseJson)
|
||||
If (success <> True) Then
|
||||
Debug.WriteLine(jsonArray.LastErrorText)
|
||||
Return jsonArray.LastErrorText
|
||||
End If
|
||||
|
||||
|
||||
Dim num As Integer = jsonArray.Size
|
||||
If num = -1 Then
|
||||
Return "Array Failure"
|
||||
End If
|
||||
|
||||
If dt IsNot Nothing AndAlso Not dt.Columns.Contains("accountid") Then
|
||||
dt.Columns.Add("accountid", GetType(Integer))
|
||||
dt.Columns.Add("name", GetType(String))
|
||||
dt.Columns.Add("accountType", GetType(String))
|
||||
dt.Columns.Add("info", GetType(String))
|
||||
dt.Columns.Add("number", GetType(Integer))
|
||||
End If
|
||||
|
||||
dt.Clear()
|
||||
|
||||
Dim j As Integer = 0
|
||||
While j < num
|
||||
|
||||
Dim R As DataRow = dt.NewRow
|
||||
R("accountid") = jsonArray.ObjectAt(j).IntOf("id")
|
||||
R("name") = jsonArray.ObjectAt(j).StringOf("name")
|
||||
R("accountType") = jsonArray.ObjectAt(j).StringOf("accountType")
|
||||
R("info") = jsonArray.ObjectAt(j).StringOf("info")
|
||||
R("number") = jsonArray.ObjectAt(j).IntOf("number")
|
||||
dt.Rows.Add(R)
|
||||
j = j + 1
|
||||
End While
|
||||
|
||||
|
||||
Catch ex As WebException
|
||||
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name)
|
||||
End Try
|
||||
End Function
|
||||
|
||||
|
||||
|
||||
|
||||
Public Function setTimeAccountEntries(ByVal mitarbeiter As cMitarbeiter, ByVal accountEntrys As DataTable, ByVal accountdate As Date, ByRef info As String)
|
||||
Dim failureText As String = ""
|
||||
Dim timeEntryCreated As Boolean = False
|
||||
|
||||
If Not checkConnectionTImas(failureText) Then
|
||||
Return timeEntryCreated
|
||||
End If
|
||||
|
||||
If Not mitarbeiter.mit_timasId > 0 Then
|
||||
info = "Mitarbeiter besitzt keine Timas-Zuordnung"
|
||||
Return timeEntryCreated
|
||||
End If
|
||||
|
||||
Dim jsonArr As New Chilkat.JsonArray
|
||||
|
||||
For Each ae As DataRow In accountEntrys.Rows
|
||||
|
||||
jsonArr.AddObjectAt(-1)
|
||||
Dim Json As Chilkat.JsonObject = jsonArr.ObjectAt(jsonArr.Size - 1)
|
||||
Json.UpdateInt("accountid", ae.Item("accountid"))
|
||||
json.UpdateInt("employeeid", mitarbeiter.mit_timasId)
|
||||
json.UpdateString("date", accountdate.ToString("yyyy-MM-dd"))
|
||||
json.UpdateString("value", ae.Item("value"))
|
||||
|
||||
Next
|
||||
|
||||
|
||||
Dim sbRequestBody As New Chilkat.StringBuilder
|
||||
jsonArr.EmitSb(sbRequestBody)
|
||||
|
||||
Dim sbResponseBody As New Chilkat.StringBuilder
|
||||
Dim success = rest.FullRequestSb("POST", "/rest/web-api/accounts/values", sbRequestBody, sbResponseBody)
|
||||
If (success <> True) Then
|
||||
Debug.WriteLine(rest.LastErrorText)
|
||||
Return timeEntryCreated
|
||||
End If
|
||||
|
||||
|
||||
If (rest.LastMethodSuccess <> True) Then
|
||||
Debug.WriteLine(rest.LastErrorText)
|
||||
info = rest.LastErrorText
|
||||
Return timeEntryCreated
|
||||
End If
|
||||
|
||||
If (rest.ResponseStatusCode <> 200) Then
|
||||
Debug.WriteLine(rest.ResponseHeader)
|
||||
info = rest.ResponseStatusCode & " " & rest.ResponseStatusText
|
||||
If sbResponseBody.GetAsString <> "" Then
|
||||
info &= vbNewLine & sbResponseBody.GetAsString
|
||||
End If
|
||||
Return timeEntryCreated
|
||||
Else
|
||||
|
||||
timeEntryCreated = True
|
||||
|
||||
End If
|
||||
|
||||
Return timeEntryCreated
|
||||
|
||||
|
||||
End Function
|
||||
|
||||
Public Function deleteTimeAccounts(ByRef from As Date, ByRef toDate As Date, ByRef employeeNr As Integer, ByRef accountsdt As DataTable) As Boolean
|
||||
Dim timeEntryDeleted As Boolean = False
|
||||
Try
|
||||
|
||||
Dim failureText As String = ""
|
||||
If Not checkConnectionTImas(failureText) Then
|
||||
Return timeEntryDeleted
|
||||
End If
|
||||
|
||||
Dim success As Boolean
|
||||
|
||||
rest.ClearAllQueryParams()
|
||||
rest.AddQueryParam("from", from.Date.ToString("yyyy-MM-dd"))
|
||||
rest.AddQueryParam("to", toDate.Date.ToString("yyyy-MM-dd"))
|
||||
|
||||
Dim id As String = ""
|
||||
For Each row As DataRow In accountsdt.Rows
|
||||
id &= row("accountid") & ","
|
||||
Next
|
||||
rest.AddQueryParam("accounts", id)
|
||||
rest.AddQueryParam("employees", employeeNr)
|
||||
|
||||
Dim sbResponseBody As String
|
||||
|
||||
sbResponseBody = rest.FullRequestNoBody("DELETE", API_STRING & "/rest/web-api/accounts/values")
|
||||
If (rest.LastMethodSuccess <> True) Then
|
||||
Debug.WriteLine(rest.LastErrorText)
|
||||
Return timeEntryDeleted
|
||||
End If
|
||||
|
||||
If (rest.ResponseStatusCode <> 200) Then
|
||||
Debug.WriteLine(rest.ResponseStatusCode & " " & rest.ResponseStatusText & sbResponseBody.ToString)
|
||||
Return timeEntryDeleted
|
||||
Else
|
||||
timeEntryDeleted = True
|
||||
End If
|
||||
|
||||
Return timeEntryDeleted
|
||||
|
||||
Catch ex As WebException
|
||||
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name)
|
||||
End Try
|
||||
|
||||
End Function
|
||||
|
||||
|
||||
|
||||
End Class
|
||||
|
||||
@@ -988,6 +1259,4 @@ Public Class cTimasGruppe
|
||||
Me.empID = empId
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
End Class
|
||||
@@ -16,7 +16,7 @@
|
||||
<TargetFrameworkProfile />
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<PlatformTarget>x64</PlatformTarget>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<DefineDebug>true</DefineDebug>
|
||||
@@ -73,67 +73,70 @@
|
||||
<AssemblyOriginatorKeyFile>ProgAllg.pfx</AssemblyOriginatorKeyFile>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="ChilkatDotNet47, Version=9.5.0.88, Culture=neutral, PublicKeyToken=eb5fc1fc52ef09bd, processorArchitecture=AMD64">
|
||||
<Reference Include="ChilkatDotNet47, Version=9.5.0.96, Culture=neutral, PublicKeyToken=eb5fc1fc52ef09bd, processorArchitecture=AMD64">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\dll\ChillKat64\neu 2023\chilkatdotnet47-9.5.0-x64\ChilkatDotNet47.dll</HintPath>
|
||||
<HintPath>F:\PROGRAMMIERUNG\dll\ChillKat64\neu 2023\chilkatdotnet47-9.5.0-x64\ChilkatDotNet47.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="ClosedXML, Version=0.76.0.0, Culture=neutral, PublicKeyToken=fd1eb21b62ae805b, processorArchitecture=MSIL">
|
||||
<Reference Include="ClosedXML, Version=0.68.0.0, Culture=neutral, PublicKeyToken=fd1eb21b62ae805b, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\AVISO\Aviso\packages\ClosedXML.0.95.4\lib\net46\ClosedXML.dll</HintPath>
|
||||
<HintPath>F:\PROGRAMMIERUNG\dll\closedxml\Neuer Ordner\ClosedXML.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Dynamsoft.Forms.Viewer, Version=8.0.0.510, Culture=neutral, PublicKeyToken=298ad97013b423eb, processorArchitecture=MSIL">
|
||||
<Reference Include="Dynamsoft.Forms.Viewer, Version=8.3.3.726, Culture=neutral, PublicKeyToken=298ad97013b423eb, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\dll\Dynamsoft\8.3.3\Dynamsoft.Forms.Viewer.dll</HintPath>
|
||||
<HintPath>F:\PROGRAMMIERUNG\dll\Dynamsoft\8.3.3\Dynamsoft.Forms.Viewer.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Dynamsoft.ImageCore, Version=8.0.0.510, Culture=neutral, PublicKeyToken=298ad97013b423eb, processorArchitecture=MSIL">
|
||||
<Reference Include="Dynamsoft.ImageCore, Version=8.3.3.726, Culture=neutral, PublicKeyToken=298ad97013b423eb, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\dll\Dynamsoft\8.3.3\Dynamsoft.ImageCore.dll</HintPath>
|
||||
<HintPath>F:\PROGRAMMIERUNG\dll\Dynamsoft\8.3.3\Dynamsoft.ImageCore.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Dynamsoft.PDF, Version=7.0.0.320, Culture=neutral, PublicKeyToken=298ad97013b423eb, processorArchitecture=MSIL">
|
||||
<Reference Include="Dynamsoft.PDF, Version=8.3.3.726, Culture=neutral, PublicKeyToken=298ad97013b423eb, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\dll\Dynamsoft\8.3.3\Dynamsoft.PDF.dll</HintPath>
|
||||
<HintPath>F:\PROGRAMMIERUNG\dll\Dynamsoft\8.3.3\Dynamsoft.PDF.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Dynamsoft.Twain, Version=8.0.0.510, Culture=neutral, PublicKeyToken=298ad97013b423eb, processorArchitecture=MSIL">
|
||||
<Reference Include="Dynamsoft.Twain, Version=8.3.3.726, Culture=neutral, PublicKeyToken=298ad97013b423eb, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\dll\Dynamsoft\8.3.3\Dynamsoft.Twain.dll</HintPath>
|
||||
<HintPath>F:\PROGRAMMIERUNG\dll\Dynamsoft\8.3.3\Dynamsoft.Twain.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Dynamsoft.WPF.Viewer, Version=8.0.0.510, Culture=neutral, PublicKeyToken=298ad97013b423eb, processorArchitecture=MSIL">
|
||||
<Reference Include="Dynamsoft.WPF.Viewer, Version=8.3.3.726, Culture=neutral, PublicKeyToken=298ad97013b423eb, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\dll\Dynamsoft\8.3.3\Dynamsoft.WPF.Viewer.dll</HintPath>
|
||||
<HintPath>F:\PROGRAMMIERUNG\dll\Dynamsoft\8.3.3\Dynamsoft.WPF.Viewer.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Ghostscript.NET">
|
||||
<HintPath>..\..\..\dll\Ghostscript.NET.dll</HintPath>
|
||||
<Reference Include="Ghostscript.NET, Version=1.2.1.0, Culture=neutral, PublicKeyToken=f85051de34525b59, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>F:\PROGRAMMIERUNG\dll\Ghostscript.NET.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Interop.Therefore.API">
|
||||
<HintPath>F:\PROGRAMMIERUNG\dll\Interop.Therefore.API.dll</HintPath>
|
||||
<EmbedInteropTypes>True</EmbedInteropTypes>
|
||||
</Reference>
|
||||
<Reference Include="itextsharp, Version=5.5.5.0, Culture=neutral, PublicKeyToken=8354ae6d2174ddca, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\dll\itextsharp.dll</HintPath>
|
||||
<HintPath>F:\PROGRAMMIERUNG\dll\itextsharp.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="McDull.Windows.Forms">
|
||||
<HintPath>..\..\..\dll\McDull.Windows.Forms.dll</HintPath>
|
||||
<Reference Include="McDull.Windows.Forms, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>F:\PROGRAMMIERUNG\dll\McDull.Windows.Forms.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Office.Interop.Outlook, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c, processorArchitecture=MSIL">
|
||||
<Reference Include="Microsoft.Office.Interop.Outlook, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<EmbedInteropTypes>True</EmbedInteropTypes>
|
||||
<HintPath>F:\PROGRAMMIERUNG\dll\Microsoft.Office.Interop.Outlook.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="NetSpell.SpellChecker">
|
||||
<HintPath>..\..\..\dll\NetSpell.SpellChecker.DLL</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="NumericBox">
|
||||
<HintPath>..\..\..\dll\NumericBox.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="RichTextBoxEx">
|
||||
<HintPath>..\..\..\dll\RichTextBoxEx.dll</HintPath>
|
||||
<Reference Include="NetSpell.SpellChecker, Version=2.1.7.41329, Culture=neutral, PublicKeyToken=318b389f0db66e46">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>F:\PROGRAMMIERUNG\dll\NetSpell.SpellChecker.DLL</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Spire.License, Version=1.4.0.46, Culture=neutral, PublicKeyToken=b1144360237c8b3f, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\dll\Spire.PDF\2023\Spire.License.dll</HintPath>
|
||||
<HintPath>F:\PROGRAMMIERUNG\dll\Spire.PDF\2023\Spire.License.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Spire.Pdf, Version=8.1.4.0, Culture=neutral, PublicKeyToken=663f351905198cb3, processorArchitecture=MSIL">
|
||||
<Reference Include="Spire.Pdf, Version=8.10.2.0, Culture=neutral, PublicKeyToken=663f351905198cb3, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\dll\Spire.PDF\2023\Spire.Pdf.dll</HintPath>
|
||||
<HintPath>F:\PROGRAMMIERUNG\dll\Spire.PDF\2023\Spire.Pdf.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Spire.PdfViewer.Forms, Version=7.1.4.0, Culture=neutral, PublicKeyToken=663f351905198cb3, processorArchitecture=MSIL">
|
||||
<Reference Include="Spire.PdfViewer.Forms, Version=7.10.3.0, Culture=neutral, PublicKeyToken=663f351905198cb3, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\dll\Spire.PDF\2023\Spire.PdfViewer.Forms.dll</HintPath>
|
||||
<HintPath>F:\PROGRAMMIERUNG\dll\Spire.PDF\2023\Spire.PdfViewer.Forms.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.ComponentModel.DataAnnotations" />
|
||||
@@ -372,12 +375,19 @@
|
||||
<Compile Include="Classes\cOffene_Posten_DVO.vb" />
|
||||
<Compile Include="Classes\cOriginalATR.vb" />
|
||||
<Compile Include="Classes\cParkzeiten.vb" />
|
||||
<Compile Include="Classes\cUeberstunden.vb" />
|
||||
<Compile Include="frmErrorMeldung.Designer.vb">
|
||||
<DependentUpon>frmErrorMeldung.vb</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="frmErrorMeldung.vb">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Mitarbeiterverzeichnis\frmUeberstundenauszahlen.Designer.vb">
|
||||
<DependentUpon>frmUeberstundenauszahlen.vb</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Mitarbeiterverzeichnis\frmUeberstundenauszahlen.vb">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="My Project\Resources.Designer.vb">
|
||||
<DesignTime>True</DesignTime>
|
||||
<AutoGen>True</AutoGen>
|
||||
@@ -765,6 +775,9 @@
|
||||
<EmbeddedResource Include="Mitarbeiterverzeichnis\frmMitarbeitersuche.resx">
|
||||
<DependentUpon>frmMitarbeitersuche.vb</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Mitarbeiterverzeichnis\frmUeberstundenauszahlen.resx">
|
||||
<DependentUpon>frmUeberstundenauszahlen.vb</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="My Project\Resources.resx">
|
||||
<Generator>VbMyResourcesResXFileCodeGenerator</Generator>
|
||||
<CustomToolNamespace>My.Resources</CustomToolNamespace>
|
||||
@@ -1207,17 +1220,6 @@
|
||||
<ItemGroup>
|
||||
<None Include="Resources\aviso.ico" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<COMReference Include="Therefore.API">
|
||||
<Guid>{37687F89-8603-4E42-A5F4-4FBAB011D5F3}</Guid>
|
||||
<VersionMajor>3</VersionMajor>
|
||||
<VersionMinor>0</VersionMinor>
|
||||
<Lcid>0</Lcid>
|
||||
<WrapperTool>tlbimp</WrapperTool>
|
||||
<Isolated>False</Isolated>
|
||||
<EmbedInteropTypes>True</EmbedInteropTypes>
|
||||
</COMReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\docAllgemein.png" />
|
||||
</ItemGroup>
|
||||
|
||||
Reference in New Issue
Block a user