From b99759151f2cb6c0a19ddf4cb7fb4997c9c45181 Mon Sep 17 00:00:00 2001 From: "d.breimaier" Date: Fri, 29 Sep 2023 08:54:47 +0200 Subject: [PATCH] mitarbeiter-Zeiterfassung --- .../frmMitarbeitersuche.Designer.vb | 18 +++---- .../frmMitarbeitersuche.vb | 54 +++++++++++-------- 2 files changed, 40 insertions(+), 32 deletions(-) diff --git a/VERAG_PROG_ALLGEMEIN/Mitarbeiterverzeichnis/frmMitarbeitersuche.Designer.vb b/VERAG_PROG_ALLGEMEIN/Mitarbeiterverzeichnis/frmMitarbeitersuche.Designer.vb index 3d384760..611982a1 100644 --- a/VERAG_PROG_ALLGEMEIN/Mitarbeiterverzeichnis/frmMitarbeitersuche.Designer.vb +++ b/VERAG_PROG_ALLGEMEIN/Mitarbeiterverzeichnis/frmMitarbeitersuche.Designer.vb @@ -161,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.Controls.Add(Me.pnlZeiten) Me.pnl.Controls.Add(Me.lblMAId) + Me.pnl.Controls.Add(Me.PictureBox9) Me.pnl.Controls.Add(Me.Label5) Me.pnl.Controls.Add(Me.btnSettings) Me.pnl.Controls.Add(Me.lblTimasZeiten) @@ -192,11 +193,10 @@ Partial Class frmMitarbeitersuche ' Me.pnlZeiten.Controls.Add(Me.Button2) Me.pnlZeiten.Controls.Add(Me.Button1) - Me.pnlZeiten.Controls.Add(Me.PictureBox9) Me.pnlZeiten.Controls.Add(Me.lblTimasSaldo) - Me.pnlZeiten.Location = New System.Drawing.Point(8, 393) + Me.pnlZeiten.Location = New System.Drawing.Point(58, 393) Me.pnlZeiten.Name = "pnlZeiten" - Me.pnlZeiten.Size = New System.Drawing.Size(619, 40) + Me.pnlZeiten.Size = New System.Drawing.Size(569, 40) Me.pnlZeiten.TabIndex = 22 ' 'Button2 @@ -204,7 +204,7 @@ Partial Class frmMitarbeitersuche 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(548, 3) + 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 @@ -216,7 +216,7 @@ Partial Class frmMitarbeitersuche 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(474, 3) + 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 @@ -226,7 +226,7 @@ Partial Class frmMitarbeitersuche 'PictureBox9 ' Me.PictureBox9.Image = Global.VERAG_PROG_ALLGEMEIN.My.Resources.Resources.uhr_green - Me.PictureBox9.Location = New System.Drawing.Point(10, 7) + 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 @@ -236,7 +236,7 @@ Partial Class frmMitarbeitersuche 'lblTimasSaldo ' Me.lblTimasSaldo.Font = New System.Drawing.Font("Microsoft Sans Serif", 12.0!) - Me.lblTimasSaldo.Location = New System.Drawing.Point(50, 7) + 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 @@ -446,7 +446,7 @@ Partial Class frmMitarbeitersuche 'lblHandyNr ' 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.Size = New System.Drawing.Size(411, 25) Me.lblHandyNr.TabIndex = 22 @@ -467,7 +467,7 @@ Partial Class frmMitarbeitersuche 'lblTelefon ' 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.Size = New System.Drawing.Size(411, 25) Me.lblTelefon.TabIndex = 16 diff --git a/VERAG_PROG_ALLGEMEIN/Mitarbeiterverzeichnis/frmMitarbeitersuche.vb b/VERAG_PROG_ALLGEMEIN/Mitarbeiterverzeichnis/frmMitarbeitersuche.vb index 436bf043..aebd8aa8 100644 --- a/VERAG_PROG_ALLGEMEIN/Mitarbeiterverzeichnis/frmMitarbeitersuche.vb +++ b/VERAG_PROG_ALLGEMEIN/Mitarbeiterverzeichnis/frmMitarbeitersuche.vb @@ -162,12 +162,20 @@ Public Class frmMitarbeitersuche 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 = False initTimasSaldo() + If VERAG_PROG_ALLGEMEIN.cAllgemein.USRID = MA.mit_id AndAlso VERAG_PROG_ALLGEMEIN.cAllgemein.MITARBEITER.mit_timasId IsNot Nothing Then + pnlZeiten.Visible = True + Else + pnlZeiten.Visible = False + 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 @@ -313,35 +321,35 @@ Public Class frmMitarbeitersuche Private Sub initTimasSaldo() - 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 - 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 + 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 - If dtZeiten.Rows.Count > 0 Then - pnlZeiten.Visible = True - Else - pnlZeiten.Visible = False - End If + 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