This commit is contained in:
2023-09-29 09:00:45 +02:00
4 changed files with 134 additions and 62 deletions

View File

@@ -151,10 +151,8 @@ Public Class frmMain
If a = vbYes Then If a = vbYes Then
Dim info Dim info
timas.setTimeEntry(cAllgemein.MITARBEITER, Now, info, "in") timas.setTimeEntry(cAllgemein.MITARBEITER, Now, info, "in")
MsgBox(info) MsgBox(info)
Else End If
End If
End If End If
End If End If

View File

@@ -30,11 +30,14 @@ Partial Class frmMitarbeitersuche
Me.PictureBox2 = New System.Windows.Forms.PictureBox() Me.PictureBox2 = New System.Windows.Forms.PictureBox()
Me.pnlMain = New System.Windows.Forms.Panel() Me.pnlMain = New System.Windows.Forms.Panel()
Me.pnl = New System.Windows.Forms.Panel() Me.pnl = New System.Windows.Forms.Panel()
Me.pnlZeiten = New System.Windows.Forms.Panel()
Me.Button2 = New System.Windows.Forms.Button()
Me.Button1 = New System.Windows.Forms.Button()
Me.PictureBox9 = New System.Windows.Forms.PictureBox()
Me.lblTimasSaldo = New System.Windows.Forms.Label()
Me.lblMAId = New System.Windows.Forms.Label() Me.lblMAId = New System.Windows.Forms.Label()
Me.Label5 = New System.Windows.Forms.Label() Me.Label5 = New System.Windows.Forms.Label()
Me.btnSettings = New System.Windows.Forms.Button() Me.btnSettings = New System.Windows.Forms.Button()
Me.PictureBox9 = New System.Windows.Forms.PictureBox()
Me.lblTimasSaldo = New System.Windows.Forms.Label()
Me.lblTimasZeiten = New System.Windows.Forms.Label() Me.lblTimasZeiten = New System.Windows.Forms.Label()
Me.pnlWohnadresse = New System.Windows.Forms.Panel() Me.pnlWohnadresse = New System.Windows.Forms.Panel()
Me.lblWohnadresse = New System.Windows.Forms.Label() Me.lblWohnadresse = New System.Windows.Forms.Label()
@@ -59,7 +62,6 @@ Partial Class frmMitarbeitersuche
Me.pnlGeburtstag = New System.Windows.Forms.Panel() Me.pnlGeburtstag = New System.Windows.Forms.Panel()
Me.lblGeburtstag = New System.Windows.Forms.Label() Me.lblGeburtstag = New System.Windows.Forms.Label()
Me.PictureBox1 = New System.Windows.Forms.PictureBox() Me.PictureBox1 = New System.Windows.Forms.PictureBox()
Me.pnlZeiten = New System.Windows.Forms.Panel()
Me.MyPanel1 = New VERAG_PROG_ALLGEMEIN.MyPanel(Me.components) Me.MyPanel1 = New VERAG_PROG_ALLGEMEIN.MyPanel(Me.components)
Me.Panel1 = New System.Windows.Forms.Panel() Me.Panel1 = New System.Windows.Forms.Panel()
Me.lblPosition = New System.Windows.Forms.Label() Me.lblPosition = New System.Windows.Forms.Label()
@@ -75,6 +77,7 @@ Partial Class frmMitarbeitersuche
CType(Me.PictureBox2, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.PictureBox2, System.ComponentModel.ISupportInitialize).BeginInit()
Me.pnlMain.SuspendLayout() Me.pnlMain.SuspendLayout()
Me.pnl.SuspendLayout() Me.pnl.SuspendLayout()
Me.pnlZeiten.SuspendLayout()
CType(Me.PictureBox9, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.PictureBox9, System.ComponentModel.ISupportInitialize).BeginInit()
Me.pnlWohnadresse.SuspendLayout() Me.pnlWohnadresse.SuspendLayout()
CType(Me.PictureBox3, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.PictureBox3, System.ComponentModel.ISupportInitialize).BeginInit()
@@ -83,7 +86,6 @@ Partial Class frmMitarbeitersuche
CType(Me.pic, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.pic, System.ComponentModel.ISupportInitialize).BeginInit()
Me.pnlGeburtstag.SuspendLayout() Me.pnlGeburtstag.SuspendLayout()
CType(Me.PictureBox1, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.PictureBox1, System.ComponentModel.ISupportInitialize).BeginInit()
Me.pnlZeiten.SuspendLayout()
Me.MyPanel1.SuspendLayout() Me.MyPanel1.SuspendLayout()
Me.SuspendLayout() Me.SuspendLayout()
' '
@@ -159,6 +161,7 @@ Partial Class frmMitarbeitersuche
Me.pnl.BackColor = System.Drawing.Color.FromArgb(CType(CType(250, Byte), Integer), CType(CType(254, Byte), Integer), CType(CType(255, Byte), Integer)) 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.pnlZeiten) Me.pnl.Controls.Add(Me.pnlZeiten)
Me.pnl.Controls.Add(Me.lblMAId) Me.pnl.Controls.Add(Me.lblMAId)
Me.pnl.Controls.Add(Me.PictureBox9)
Me.pnl.Controls.Add(Me.Label5) Me.pnl.Controls.Add(Me.Label5)
Me.pnl.Controls.Add(Me.btnSettings) Me.pnl.Controls.Add(Me.btnSettings)
Me.pnl.Controls.Add(Me.lblTimasZeiten) Me.pnl.Controls.Add(Me.lblTimasZeiten)
@@ -186,6 +189,58 @@ Partial Class frmMitarbeitersuche
Me.pnl.Size = New System.Drawing.Size(774, 454) Me.pnl.Size = New System.Drawing.Size(774, 454)
Me.pnl.TabIndex = 24 Me.pnl.TabIndex = 24
' '
'pnlZeiten
'
Me.pnlZeiten.Controls.Add(Me.Button2)
Me.pnlZeiten.Controls.Add(Me.Button1)
Me.pnlZeiten.Controls.Add(Me.lblTimasSaldo)
Me.pnlZeiten.Location = New System.Drawing.Point(58, 393)
Me.pnlZeiten.Name = "pnlZeiten"
Me.pnlZeiten.Size = New System.Drawing.Size(569, 40)
Me.pnlZeiten.TabIndex = 22
'
'Button2
'
Me.Button2.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom
Me.Button2.FlatStyle = System.Windows.Forms.FlatStyle.Flat
Me.Button2.ImageAlign = System.Drawing.ContentAlignment.TopLeft
Me.Button2.Location = New System.Drawing.Point(488, 3)
Me.Button2.Name = "Button2"
Me.Button2.Size = New System.Drawing.Size(68, 35)
Me.Button2.TabIndex = 124
Me.Button2.Text = "GEHEN"
Me.Button2.UseVisualStyleBackColor = True
'
'Button1
'
Me.Button1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom
Me.Button1.FlatStyle = System.Windows.Forms.FlatStyle.Flat
Me.Button1.ImageAlign = System.Drawing.ContentAlignment.TopLeft
Me.Button1.Location = New System.Drawing.Point(414, 3)
Me.Button1.Name = "Button1"
Me.Button1.Size = New System.Drawing.Size(68, 35)
Me.Button1.TabIndex = 123
Me.Button1.Text = "KOMMEN"
Me.Button1.UseVisualStyleBackColor = True
'
'PictureBox9
'
Me.PictureBox9.Image = Global.VERAG_PROG_ALLGEMEIN.My.Resources.Resources.uhr_green
Me.PictureBox9.Location = New System.Drawing.Point(18, 400)
Me.PictureBox9.Name = "PictureBox9"
Me.PictureBox9.Size = New System.Drawing.Size(34, 27)
Me.PictureBox9.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage
Me.PictureBox9.TabIndex = 120
Me.PictureBox9.TabStop = False
'
'lblTimasSaldo
'
Me.lblTimasSaldo.Font = New System.Drawing.Font("Microsoft Sans Serif", 12.0!)
Me.lblTimasSaldo.Location = New System.Drawing.Point(7, 9)
Me.lblTimasSaldo.Name = "lblTimasSaldo"
Me.lblTimasSaldo.Size = New System.Drawing.Size(223, 24)
Me.lblTimasSaldo.TabIndex = 30
'
'lblMAId 'lblMAId
' '
Me.lblMAId.AutoSize = True Me.lblMAId.AutoSize = True
@@ -223,25 +278,6 @@ Partial Class frmMitarbeitersuche
Me.btnSettings.UseVisualStyleBackColor = True Me.btnSettings.UseVisualStyleBackColor = True
Me.btnSettings.Visible = False Me.btnSettings.Visible = False
' '
'PictureBox9
'
Me.PictureBox9.Image = Global.VERAG_PROG_ALLGEMEIN.My.Resources.Resources.uhr_green
Me.PictureBox9.Location = New System.Drawing.Point(10, 7)
Me.PictureBox9.Name = "PictureBox9"
Me.PictureBox9.Size = New System.Drawing.Size(34, 27)
Me.PictureBox9.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage
Me.PictureBox9.TabIndex = 120
Me.PictureBox9.TabStop = False
'
'lblTimasSaldo
'
Me.lblTimasSaldo.Font = New System.Drawing.Font("Microsoft Sans Serif", 12.0!)
Me.lblTimasSaldo.Location = New System.Drawing.Point(50, 7)
Me.lblTimasSaldo.Name = "lblTimasSaldo"
Me.lblTimasSaldo.Size = New System.Drawing.Size(189, 24)
Me.lblTimasSaldo.TabIndex = 30
Me.lblTimasSaldo.Visible = False
'
'lblTimasZeiten 'lblTimasZeiten
' '
Me.lblTimasZeiten.Font = New System.Drawing.Font("Microsoft Sans Serif", 12.0!) Me.lblTimasZeiten.Font = New System.Drawing.Font("Microsoft Sans Serif", 12.0!)
@@ -410,7 +446,7 @@ Partial Class frmMitarbeitersuche
'lblHandyNr 'lblHandyNr
' '
Me.lblHandyNr.Font = New System.Drawing.Font("Microsoft Sans Serif", 12.0!, System.Drawing.FontStyle.Bold) Me.lblHandyNr.Font = New System.Drawing.Font("Microsoft Sans Serif", 12.0!, System.Drawing.FontStyle.Bold)
Me.lblHandyNr.Location = New System.Drawing.Point(350, 164) Me.lblHandyNr.Location = New System.Drawing.Point(360, 164)
Me.lblHandyNr.Name = "lblHandyNr" Me.lblHandyNr.Name = "lblHandyNr"
Me.lblHandyNr.Size = New System.Drawing.Size(411, 25) Me.lblHandyNr.Size = New System.Drawing.Size(411, 25)
Me.lblHandyNr.TabIndex = 22 Me.lblHandyNr.TabIndex = 22
@@ -431,7 +467,7 @@ Partial Class frmMitarbeitersuche
'lblTelefon 'lblTelefon
' '
Me.lblTelefon.Font = New System.Drawing.Font("Microsoft Sans Serif", 12.0!, System.Drawing.FontStyle.Bold) Me.lblTelefon.Font = New System.Drawing.Font("Microsoft Sans Serif", 12.0!, System.Drawing.FontStyle.Bold)
Me.lblTelefon.Location = New System.Drawing.Point(350, 138) Me.lblTelefon.Location = New System.Drawing.Point(360, 138)
Me.lblTelefon.Name = "lblTelefon" Me.lblTelefon.Name = "lblTelefon"
Me.lblTelefon.Size = New System.Drawing.Size(411, 25) Me.lblTelefon.Size = New System.Drawing.Size(411, 25)
Me.lblTelefon.TabIndex = 16 Me.lblTelefon.TabIndex = 16
@@ -479,15 +515,6 @@ Partial Class frmMitarbeitersuche
Me.PictureBox1.TabIndex = 13 Me.PictureBox1.TabIndex = 13
Me.PictureBox1.TabStop = False Me.PictureBox1.TabStop = False
' '
'pnlZeiten
'
Me.pnlZeiten.Controls.Add(Me.PictureBox9)
Me.pnlZeiten.Controls.Add(Me.lblTimasSaldo)
Me.pnlZeiten.Location = New System.Drawing.Point(8, 393)
Me.pnlZeiten.Name = "pnlZeiten"
Me.pnlZeiten.Size = New System.Drawing.Size(619, 40)
Me.pnlZeiten.TabIndex = 22
'
'MyPanel1 'MyPanel1
' '
Me.MyPanel1.BackColor = System.Drawing.Color.FromArgb(CType(CType(250, Byte), Integer), CType(CType(254, Byte), Integer), CType(CType(255, Byte), Integer)) Me.MyPanel1.BackColor = System.Drawing.Color.FromArgb(CType(CType(250, Byte), Integer), CType(CType(254, Byte), Integer), CType(CType(255, Byte), Integer))
@@ -647,6 +674,7 @@ Partial Class frmMitarbeitersuche
Me.pnlMain.ResumeLayout(False) Me.pnlMain.ResumeLayout(False)
Me.pnl.ResumeLayout(False) Me.pnl.ResumeLayout(False)
Me.pnl.PerformLayout() Me.pnl.PerformLayout()
Me.pnlZeiten.ResumeLayout(False)
CType(Me.PictureBox9, System.ComponentModel.ISupportInitialize).EndInit() CType(Me.PictureBox9, System.ComponentModel.ISupportInitialize).EndInit()
Me.pnlWohnadresse.ResumeLayout(False) Me.pnlWohnadresse.ResumeLayout(False)
CType(Me.PictureBox3, System.ComponentModel.ISupportInitialize).EndInit() CType(Me.PictureBox3, System.ComponentModel.ISupportInitialize).EndInit()
@@ -656,7 +684,6 @@ Partial Class frmMitarbeitersuche
Me.pnlGeburtstag.ResumeLayout(False) Me.pnlGeburtstag.ResumeLayout(False)
Me.pnlGeburtstag.PerformLayout() Me.pnlGeburtstag.PerformLayout()
CType(Me.PictureBox1, System.ComponentModel.ISupportInitialize).EndInit() CType(Me.PictureBox1, System.ComponentModel.ISupportInitialize).EndInit()
Me.pnlZeiten.ResumeLayout(False)
Me.MyPanel1.ResumeLayout(False) Me.MyPanel1.ResumeLayout(False)
Me.ResumeLayout(False) Me.ResumeLayout(False)
@@ -709,4 +736,6 @@ Partial Class frmMitarbeitersuche
Friend WithEvents lblMAId As Windows.Forms.Label Friend WithEvents lblMAId As Windows.Forms.Label
Friend WithEvents Label5 As Windows.Forms.Label Friend WithEvents Label5 As Windows.Forms.Label
Friend WithEvents pnlZeiten As Windows.Forms.Panel Friend WithEvents pnlZeiten As Windows.Forms.Panel
Friend WithEvents Button2 As Windows.Forms.Button
Friend WithEvents Button1 As Windows.Forms.Button
End Class End Class

View File

@@ -1,7 +1,9 @@
Imports System.ComponentModel Imports System.ComponentModel
Imports System.Drawing Imports System.Drawing
Imports System.Net Imports System.Net
Imports System.Threading
Imports System.Windows.Forms Imports System.Windows.Forms
Imports Therefore.API
Imports VERAG_PROG_ALLGEMEIN.cCreditSafeAPI Imports VERAG_PROG_ALLGEMEIN.cCreditSafeAPI
Public Class frmMitarbeitersuche Public Class frmMitarbeitersuche
@@ -160,33 +162,18 @@ Public Class frmMitarbeitersuche
End Select End Select
If VERAG_PROG_ALLGEMEIN.cBerechtignunen.CHECK_BERECHTIGUNG_bool("ADMINFUNCTIONS", "SDL") Then If VERAG_PROG_ALLGEMEIN.cBerechtignunen.CHECK_BERECHTIGUNG_bool("ADMINFUNCTIONS", "SDL") Then
'pnlZeiten.Visible = True
btn.Visible = True btn.Visible = True
btnSettings.Visible = True btnSettings.Visible = True
End If End If
If VERAG_PROG_ALLGEMEIN.cAllgemein.USRID = MA.mit_id Then
btn.Visible = True
'Eintrag für Zeitübersicht
'lblTimasZeiten.Visible = True
lblTimasSaldo.Visible = True
If Not requestDone Then
Dim dtZeiten As New DataTable
If timas IsNot Nothing Then
timas.getTimeSaldo(MA.mit_timasId, lblTimasSaldo.Text)
If timas.getTimeEntries(MA.mit_timasId, dtZeiten, requestDone) Then
PictureBox9.Image = VERAG_PROG_ALLGEMEIN.My.Resources.Resources.uhr_green
Else
PictureBox9.Image = VERAG_PROG_ALLGEMEIN.My.Resources.Resources.uhr_red
End If
If dtZeiten.Rows.Count > 0 Then requestDone = False
pnlZeiten.Visible = True initTimasSaldo()
Else
pnlZeiten.Visible = False
End If
End If If VERAG_PROG_ALLGEMEIN.cAllgemein.USRID = MA.mit_id AndAlso VERAG_PROG_ALLGEMEIN.cAllgemein.MITARBEITER.mit_timasId IsNot Nothing Then
pnlZeiten.Visible = True
End If Else
pnlZeiten.Visible = False
End If End If
If VERAG_PROG_ALLGEMEIN.cBerechtignunen.CHECK_BERECHTIGUNG_bool("MA_TeamBearbeiten", "SDL") Then If VERAG_PROG_ALLGEMEIN.cBerechtignunen.CHECK_BERECHTIGUNG_bool("MA_TeamBearbeiten", "SDL") Then
@@ -308,4 +295,62 @@ Public Class frmMitarbeitersuche
End If End If
End Sub End Sub
Private Sub Button1_Click_1(sender As Object, e As EventArgs) Handles Button1.Click, Button2.Click
Dim art As String
If sender Is Button1 Then
art = "in"
Else
art = "out"
End If
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)
If a = vbYes Then
Dim info
timas.setTimeEntry(cAllgemein.MITARBEITER, Now, info, art)
MsgBox(info)
Thread.Sleep(2000) 'warten bis Eintrag in Timas-DB
requestDone = False
initTimasSaldo()
End If
End If
End Sub
Private Sub initTimasSaldo()
btn.Visible = True
'Eintrag für Zeitübersicht
'lblTimasZeiten.Visible = True
lblTimasSaldo.Visible = True
If Not requestDone Then
lblTimasSaldo.Text = ""
Dim dtZeiten As New DataTable
If timas IsNot Nothing Then
timas.getTimeSaldo(MA.mit_timasId, lblTimasSaldo.Text)
If timas.getTimeEntries(MA.mit_timasId, dtZeiten, requestDone) Then
PictureBox9.Image = VERAG_PROG_ALLGEMEIN.My.Resources.Resources.uhr_green
Button2.Enabled = True
Button1.Enabled = False
Else
PictureBox9.Image = VERAG_PROG_ALLGEMEIN.My.Resources.Resources.uhr_red
Button2.Enabled = False
Button1.Enabled = True
End If
If dtZeiten.Rows.Count > 0 AndAlso VERAG_PROG_ALLGEMEIN.cAllgemein.USRID = MA.mit_id Then
pnlZeiten.Visible = True
Else
pnlZeiten.Visible = False
End If
End If
End If
End Sub
End Class End Class

View File

@@ -242,7 +242,7 @@ Public Class cTimasAPI
success = json.UpdateString("entry", CDate(mitarbeiter.mit_einstiegsdatum).ToString("yyyy-MM-dd")) success = json.UpdateString("entry", CDate(mitarbeiter.mit_einstiegsdatum).ToString("yyyy-MM-dd"))
success = json.UpdateNull("exit") success = json.UpdateNull("exit")
success = json.UpdateString("importSign", "Import from Aviso") success = json.UpdateString("importSign", "Import from Aviso")
success = json.UpdateString("login", mitarbeiter.mit_AliasAD_Username) success = json.UpdateString("login", mitarbeiter.mit_username)
success = json.UpdateBool("loginActive", 1) success = json.UpdateBool("loginActive", 1)
success = json.UpdateString("email", mitarbeiter.mit_email) success = json.UpdateString("email", mitarbeiter.mit_email)
success = json.UpdateString("street", mitarbeiter.mit_strasse) success = json.UpdateString("street", mitarbeiter.mit_strasse)