Homeoffice

This commit is contained in:
2023-10-23 14:41:35 +02:00
parent 511fb02a8d
commit 791c4fb31e
3 changed files with 19 additions and 4 deletions

View File

@@ -73,6 +73,7 @@ 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.cbxHomeoffice = New System.Windows.Forms.CheckBox()
Me.pnlSrch.SuspendLayout()
CType(Me.PictureBox2, System.ComponentModel.ISupportInitialize).BeginInit()
Me.pnlMain.SuspendLayout()
@@ -217,6 +218,7 @@ Partial Class frmMitarbeitersuche
'
'pnlZeiten
'
Me.pnlZeiten.Controls.Add(Me.cbxHomeoffice)
Me.pnlZeiten.Controls.Add(Me.btnZEGehen)
Me.pnlZeiten.Controls.Add(Me.btnZEKommen)
Me.pnlZeiten.Controls.Add(Me.lblTimasSaldo)
@@ -658,6 +660,17 @@ Partial Class frmMitarbeitersuche
Me.Label3.Text = "Niederlassung:"
Me.Label3.TextAlign = System.Drawing.ContentAlignment.MiddleLeft
'
'cbxHomeoffice
'
Me.cbxHomeoffice.AutoSize = True
Me.cbxHomeoffice.ForeColor = System.Drawing.Color.Black
Me.cbxHomeoffice.Location = New System.Drawing.Point(262, 7)
Me.cbxHomeoffice.Name = "cbxHomeoffice"
Me.cbxHomeoffice.Size = New System.Drawing.Size(80, 17)
Me.cbxHomeoffice.TabIndex = 125
Me.cbxHomeoffice.Text = "Homeoffice"
Me.cbxHomeoffice.UseVisualStyleBackColor = True
'
'frmMitarbeitersuche
'
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
@@ -679,6 +692,7 @@ Partial Class frmMitarbeitersuche
Me.pnl.ResumeLayout(False)
Me.pnl.PerformLayout()
Me.pnlZeiten.ResumeLayout(False)
Me.pnlZeiten.PerformLayout()
CType(Me.PictureBox9, System.ComponentModel.ISupportInitialize).EndInit()
Me.pnlWohnadresse.ResumeLayout(False)
CType(Me.PictureBox3, System.ComponentModel.ISupportInitialize).EndInit()
@@ -742,4 +756,5 @@ Partial Class frmMitarbeitersuche
Friend WithEvents pnlZeiten As Windows.Forms.Panel
Friend WithEvents btnZEGehen As Windows.Forms.Button
Friend WithEvents btnZEKommen As Windows.Forms.Button
Friend WithEvents cbxHomeoffice As Windows.Forms.CheckBox
End Class

View File

@@ -305,10 +305,10 @@ Public Class frmMitarbeitersuche
If VERAG_PROG_ALLGEMEIN.cAllgemein.MITARBEITER.mit_timasId IsNot Nothing Then
Dim timas As New cTimasAPI
Dim a As MsgBoxResult = MsgBox(sender.text & " für " & VERAG_PROG_ALLGEMEIN.cAllgemein.USRKURZNAME & vbNewLine & Now.ToString(), vbYesNo)
Dim a As MsgBoxResult = MsgBox(IIf(cbxHomeoffice.Checked, "Homeoffice", "Büro") & vbNewLine & sender.text & " für " & VERAG_PROG_ALLGEMEIN.cAllgemein.USRKURZNAME & vbNewLine & Now.ToString(), vbYesNo)
If a = vbYes Then
Dim info
timas.setTimeEntry(cAllgemein.MITARBEITER, Now, info, art)
timas.setTimeEntry(cAllgemein.MITARBEITER, Now, info, art, IIf(cbxHomeoffice.Checked, 3, 0))
MsgBox(info)
Thread.Sleep(2000) 'warten bis Eintrag in Timas-DB
requestDone = False

View File

@@ -774,7 +774,7 @@ Public Class cTimasAPI
Public Function setTimeEntry(ByVal mitarbeiter As cMitarbeiter, ByVal timeEntry As DateTime, ByRef info As String, ByRef inout As String)
Public Function setTimeEntry(ByVal mitarbeiter As cMitarbeiter, ByVal timeEntry As DateTime, ByRef info As String, ByRef inout As String, Optional ByRef art As Integer = 0)
Dim failureText As String = ""
Dim timeEntryCreated As Boolean = False
@@ -805,7 +805,7 @@ Public Class cTimasAPI
Dim json As New Chilkat.JsonObject
json.UpdateString("stamp", timeEntry.ToString("yyyy-MM-ddTHH:mm:ss"))
json.UpdateInt("statusnumber", 0) '
json.UpdateInt("statusnumber", art) '0 Standardanwesenheit, 3 Homeoffice
json.UpdateString("type", inout)
json.UpdateString("employeeid", mitarbeiter.mit_timasId)