Mitarbeiter-Logik, Abrechnung AMBAR
This commit is contained in:
@@ -62,11 +62,12 @@ Public Class frmMitarbeitersuche
|
||||
|
||||
|
||||
Private Sub sbMitarbeiter_PropertyChanged() Handles sbMitarbeiter.VALUE_CHANGED
|
||||
requestDone = False
|
||||
initMA(False)
|
||||
End Sub
|
||||
|
||||
Sub initMA(Optional callTimasSaldo As Boolean = True)
|
||||
btn.Visible = False
|
||||
btnEdit.Visible = False
|
||||
pnl.Visible = False
|
||||
'lblTimasZeiten.Visible = False
|
||||
lblTimasSaldo.Visible = False
|
||||
@@ -166,13 +167,7 @@ Public Class frmMitarbeitersuche
|
||||
PictureBox3.BackgroundImage = Nothing
|
||||
End Select
|
||||
|
||||
If VERAG_PROG_ALLGEMEIN.cBerechtignunen.CHECK_BERECHTIGUNG_bool("ADMINFUNCTIONS", "SDL") Then
|
||||
'pnlZeiten.Visible = True
|
||||
btn.Visible = True
|
||||
btnSettings.Visible = True
|
||||
End If
|
||||
|
||||
requestDone = Not callTimasSaldo
|
||||
'requestDone = Not callTimasSaldo
|
||||
initTimasData()
|
||||
|
||||
If VERAG_PROG_ALLGEMEIN.cAllgemein.USRID = MA.mit_id AndAlso VERAG_PROG_ALLGEMEIN.cAllgemein.MITARBEITER.mit_timasId IsNot Nothing Then
|
||||
@@ -181,6 +176,11 @@ Public Class frmMitarbeitersuche
|
||||
pnlZeiten.Visible = False
|
||||
End If
|
||||
|
||||
If VERAG_PROG_ALLGEMEIN.cBerechtignunen.CHECK_BERECHTIGUNG_bool("ADMINFUNCTIONS", "SDL") Then
|
||||
btnEdit.Visible = True
|
||||
btnSettings.Visible = True
|
||||
End If
|
||||
|
||||
If VERAG_PROG_ALLGEMEIN.cBerechtignunen.CHECK_BERECHTIGUNG_bool("MA_TeamBearbeiten", "SDL") Then
|
||||
If MA.getFirma = VERAG_PROG_ALLGEMEIN.cAllgemein.FIRMA Then 'MA derselben Firma bearbeiten
|
||||
btnSettings.Visible = True
|
||||
@@ -222,14 +222,14 @@ Public Class frmMitarbeitersuche
|
||||
pnlMotto.Visible = False
|
||||
pic.BackgroundImage = My.Resources.personGray_m
|
||||
picGeschlecht.Visible = False
|
||||
'pnlZeiten.Visible = False
|
||||
pnlZeiten.Visible = False
|
||||
End Sub
|
||||
|
||||
Private Sub btnClose_Click(sender As Object, e As EventArgs) Handles btnClose.Click
|
||||
Me.Close()
|
||||
End Sub
|
||||
|
||||
Private Sub btn_Click(sender As Object, e As EventArgs) Handles btn.Click
|
||||
Private Sub btn_Click(sender As Object, e As EventArgs) Handles btnEdit.Click
|
||||
If sbMitarbeiter._value = "" Then Exit Sub
|
||||
Dim f As New frmMitarbeitersucheBearbeiten(sbMitarbeiter._value)
|
||||
f.ShowDialog(Me)
|
||||
@@ -421,78 +421,85 @@ Public Class frmMitarbeitersuche
|
||||
|
||||
'normales kommen/gehen
|
||||
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, resultCode)
|
||||
MsgBox(info)
|
||||
Thread.Sleep(2000) 'warten bis Eintrag in Timas-DB
|
||||
requestDone = False
|
||||
initTimasData()
|
||||
End If
|
||||
If a = vbYes Then
|
||||
Dim info
|
||||
timas.setTimeEntry(cAllgemein.MITARBEITER, Now, info, art, resultCode)
|
||||
MsgBox(info)
|
||||
Thread.Sleep(2000) 'warten bis Eintrag in Timas-DB
|
||||
requestDone = False
|
||||
initTimasData()
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
Private Sub initTimasData()
|
||||
|
||||
lblStatusZE.Visible = False
|
||||
|
||||
btn.Visible = True
|
||||
'lblStatusZE.Visible = False
|
||||
'btnEdit.Visible = False
|
||||
'Eintrag für Zeitübersicht
|
||||
'lblTimasZeiten.Visible = True
|
||||
lblTimasSaldo.Visible = True
|
||||
|
||||
lblTimasSaldo.Visible = False
|
||||
lblTimasSaldo.Text = ""
|
||||
|
||||
If Not requestDone Then
|
||||
lblTimasSaldo.Text = ""
|
||||
|
||||
Dim dtZeiten As New DataTable
|
||||
If timas IsNot Nothing Then
|
||||
Dim isServiceRunning As Boolean = True
|
||||
timas.getTimeSaldo(MA.mit_timasId, lblTimasSaldo.Text, "dailyBalanceYesterday", isServiceRunning, "time")
|
||||
If Not isServiceRunning Then
|
||||
'Abfrage konnte nicht durchgeführt werden.
|
||||
MsgBox("Abfragefehler am Timas-Server!")
|
||||
'Exit Sub
|
||||
End If
|
||||
lblStatusZE.Visible = True
|
||||
|
||||
Dim checkEntry As Boolean = timas.getTimeEntries(MA.mit_timasId, dtZeiten,, requestDone)
|
||||
online = checkEntry
|
||||
If requestDone Then
|
||||
If checkEntry Then
|
||||
'PictureBox9.Image = VERAG_PROG_ALLGEMEIN.My.Resources.Resources.uhr_green
|
||||
lblStatusZE.BackColor = Color.Green
|
||||
lblStatusZE.Text = "ONLINE"
|
||||
|
||||
btnZEGehen.Enabled = True
|
||||
btnZEKommen.Enabled = False
|
||||
btnAkten.Enabled = False
|
||||
Else
|
||||
' PictureBox9.Image = VERAG_PROG_ALLGEMEIN.My.Resources.Resources.uhr_red
|
||||
lblStatusZE.Text = "OFFLINE"
|
||||
lblStatusZE.BackColor = Color.Firebrick
|
||||
|
||||
btnZEGehen.Enabled = False
|
||||
btnZEKommen.Enabled = True
|
||||
btnAkten.Enabled = True
|
||||
End If
|
||||
Else
|
||||
'Request wurde nicht verarbeitet -> Verbindungsfehler
|
||||
lblStatusZE.Text = "Serverfehler"
|
||||
|
||||
If MA.mit_timasId Is Nothing Then
|
||||
lblStatusZE.Text = "keine ZE"
|
||||
Else
|
||||
lblStatusZE.Text = "Serverfehler"
|
||||
End If
|
||||
lblStatusZE.BackColor = Color.Gray
|
||||
btnZEGehen.Enabled = False
|
||||
btnZEKommen.Enabled = False
|
||||
Button2.Enabled = False
|
||||
btnAkten.Enabled = False
|
||||
|
||||
|
||||
End If
|
||||
|
||||
If VERAG_PROG_ALLGEMEIN.cAllgemein.USRID = MA.mit_id Then
|
||||
|
||||
timas.getTimeSaldo(MA.mit_timasId, lblTimasSaldo.Text, "dailyBalanceYesterday", isServiceRunning, "time")
|
||||
If Not isServiceRunning Then
|
||||
MsgBox("Abfragefehler am Timas-Server!")
|
||||
End If
|
||||
lblStatusZE.Visible = True
|
||||
lblTimasSaldo.Visible = True
|
||||
|
||||
If dtZeiten.Rows.Count > 0 Then
|
||||
pnlZeiten.Visible = True
|
||||
Else
|
||||
pnlZeiten.Visible = False
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user