This commit is contained in:
2023-09-25 16:13:07 +02:00
34 changed files with 10599 additions and 26 deletions

View File

@@ -342,7 +342,7 @@ Public Class KdSearchBox
SQLstr &= " INNER JOIN Filialen on Filialen.FilialenNr=isnull(Kunden.FilialenNr,4803) "
SQLstr &= " WHERE 1=1 "
SQLstr &= " AND ( "
SQLstr &= " Ordnungsbegriff LIKE '" & srch & "%' "
SQLstr &= " Ordnungsbegriff COLLATE Latin1_General_CI_AI LIKE '" & srch & "%' COLLATE Latin1_General_CI_AI "
If IsNumeric(srch) Then SQLstr &= " OR AdressenNr LIKE '" & srch & "%' "
If _searchName1 Then SQLstr &= " OR Adressen.[Name 1] LIKE '" & srch & "%' "
SQLstr &= " ) "
@@ -426,7 +426,7 @@ Public Class KdSearchBox
SQLstr &= " INNER JOIN Filialen on Filialen.FilialenNr=isnull(Kunden.FilialenNr,4803) "
SQLstr &= " WHERE 1=1 "
SQLstr &= " AND ( "
SQLstr &= " Ordnungsbegriff LIKE '" & srch & "%' "
SQLstr &= " Ordnungsbegriff COLLATE Latin1_General_CI_AI LIKE '" & srch & "%' COLLATE Latin1_General_CI_AI "
If IsNumeric(srch) Then SQLstr &= " OR AdressenNr LIKE '" & srch & "%' "
If _searchName1 Then SQLstr &= " OR Adressen.[Name 1] LIKE '" & srch & "%' "
SQLstr &= " ) "

View File

@@ -247,6 +247,6 @@ Public Class cAvisoBenachrichtigungenCodes
Public Shared ZOLL_Dokumentenbeschau As Integer = 7
Public Shared ZOLL_Rueckweisung As Integer = 8
Public Shared ZOLL_Mitteilung As Integer = 9
Public Shared AAE_Benachrichtigung As Integer = 10
End Class

View File

@@ -77,6 +77,8 @@ Public Class cMitarbeiter
Property mit_MAVerzeichnis_Spitzname As Object = Nothing
Property mit_foto_DocId As Object = Nothing
Property mit_fotoHover1_DocId As Object = Nothing
Property mit_fotoHover2_DocId As Object = Nothing
Property mit_sprache As String = "DE"
Property mit_fakturierungsgruppe As String = ""
Property mit_CSuser As Object = Nothing
@@ -183,6 +185,8 @@ Public Class cMitarbeiter
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("mit_MAVerzeichnis_Motto", mit_MAVerzeichnis_Motto))
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("mit_MAVerzeichnis_Spitzname", mit_MAVerzeichnis_Spitzname))
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("mit_foto_DocId", mit_foto_DocId))
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("mit_fotoHover1_DocId", mit_fotoHover1_DocId))
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("mit_fotoHover2_DocId", mit_fotoHover2_DocId))
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("mit_sprache", mit_sprache))
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("mit_fakturierungsgruppe", mit_fakturierungsgruppe))
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("mit_CSuser", mit_CSuser))
@@ -375,6 +379,8 @@ Public Class cMitarbeiter
Me.mit_MAVerzeichnis_allowFoto = dr.Item("mit_MAVerzeichnis_allowFoto")
If Not dr.Item("mit_foto_DocId") Is DBNull.Value Then Me.mit_foto_DocId = dr.Item("mit_foto_DocId")
If Not dr.Item("mit_fotoHover1_DocId") Is DBNull.Value Then Me.mit_fotoHover1_DocId = dr.Item("mit_fotoHover1_DocId")
If Not dr.Item("mit_fotoHover2_DocId") Is DBNull.Value Then Me.mit_fotoHover2_DocId = dr.Item("mit_fotoHover2_DocId")
If Not dr.Item("mit_MAVerzeichnis_Spitzname") Is DBNull.Value Then Me.mit_MAVerzeichnis_Spitzname = dr.Item("mit_MAVerzeichnis_Spitzname")
If Not dr.Item("mit_MAVerzeichnis_Motto") Is DBNull.Value Then Me.mit_MAVerzeichnis_Motto = dr.Item("mit_MAVerzeichnis_Motto")
If Not dr.Item("mit_sprache") Is DBNull.Value Then Me.mit_sprache = dr.Item("mit_sprache")

View File

@@ -1,6 +1,7 @@
Imports System.ComponentModel
Imports System.Drawing
Imports System.Net
Imports System.Windows.Forms
Imports VERAG_PROG_ALLGEMEIN.cCreditSafeAPI
Public Class frmMitarbeitersuche
@@ -8,6 +9,8 @@ Public Class frmMitarbeitersuche
Dim SQL As New VERAG_PROG_ALLGEMEIN.SQL
Dim timas As New cTimasAPI
Dim requestDone As Boolean = False
Dim MA As cMitarbeiter = Nothing
Sub New()
' Dieser Aufruf ist für den Designer erforderlich.
@@ -65,9 +68,11 @@ Public Class frmMitarbeitersuche
lblTimasSaldo.Visible = False
Panel1.Visible = False
btnSettings.Visible = False
Dim MA As cMitarbeiter = Nothing
' Dim MA As cMitarbeiter = Nothing
If sbMitarbeiter._value <> "" Then
MA = New cMitarbeiter(sbMitarbeiter._value)
Else
MA = Nothing
End If
If MA Is Nothing Then
@@ -152,6 +157,7 @@ Public Class frmMitarbeitersuche
Case Else
PictureBox3.BackgroundImage = Nothing
End Select
If VERAG_PROG_ALLGEMEIN.cBerechtignunen.CHECK_BERECHTIGUNG_bool("ADMINFUNCTIONS", "SDL") Then
btn.Visible = True
btnSettings.Visible = True
@@ -387,4 +393,64 @@ Public Class frmMitarbeitersuche
Dim webAddress As String = "https://zeit.verag.ag/webterminal/"
Process.Start(webAddress)
End Sub
Sub setBGPic(art, MA)
HOVER_ART = art
If art = "" Or MA Is Nothing Then
pic.BackgroundImage = My.Resources.personGray_m
picGeschlecht.Visible = True
If MA.mit_geschlecht = "w" Then
pic.BackgroundImage = My.Resources.personGray_w
picGeschlecht.BackgroundImage = My.Resources.weiblich
Else
pic.BackgroundImage = My.Resources.personGray_m
picGeschlecht.BackgroundImage = My.Resources.männlich
End If
If MA Is Nothing Then Exit Sub
End If
If MA.mit_MAVerzeichnis_allowFoto Then
Try
Select Case art
Case "HOVER1" : If MA.mit_fotoHover1_DocId IsNot Nothing Then pic.BackgroundImage = Image.FromFile(cDATENSERVER.GET_PDFPath_BY_DocID(MA.mit_fotoHover1_DocId))
Case "HOVER2" : If MA.mit_fotoHover2_DocId IsNot Nothing Then pic.BackgroundImage = Image.FromFile(cDATENSERVER.GET_PDFPath_BY_DocID(MA.mit_fotoHover2_DocId))
Case Else : If MA.mit_foto_DocId IsNot Nothing Then pic.BackgroundImage = Image.FromFile(cDATENSERVER.GET_PDFPath_BY_DocID(MA.mit_foto_DocId))
End Select
Catch ex As Exception
pic.BackgroundImage = My.Resources.personGray_m
End Try
End If
End Sub
Private Sub pic_MouseHover(sender As Object, e As EventArgs) Handles pic.MouseHover
Dim point
pic.PointToClient(point)
End Sub
Dim HOVER_ART = ""
Private Sub pic_MouseMove(sender As Object, e As MouseEventArgs) Handles pic.MouseMove
Dim art = ""
If e.X < pic.Size.Width / 2 Then
art = "HOVER1"
Else
art = "HOVER2"
End If
If art <> HOVER_ART Then
setBGPic(art, MA)
End If
End Sub
Private Sub pic_MouseLeave(sender As Object, e As EventArgs) Handles pic.MouseLeave
If HOVER_ART <> "" Then
setBGPic("", MA)
End If
End Sub
End Class

View File

@@ -26,6 +26,10 @@ Partial Class frmMitarbeitersucheBearbeiten
Me.pnlSrch = New System.Windows.Forms.Panel()
Me.btnClose = New System.Windows.Forms.Button()
Me.pnlMain = New System.Windows.Forms.Panel()
Me.Label1 = New System.Windows.Forms.Label()
Me.PictureBox2 = New System.Windows.Forms.PictureBox()
Me.PictureBox1 = New System.Windows.Forms.PictureBox()
Me.cbxAllowFoto = New System.Windows.Forms.CheckBox()
Me.btn = New System.Windows.Forms.Button()
Me.txtMotto = New System.Windows.Forms.TextBox()
Me.cbxMotto = New System.Windows.Forms.CheckBox()
@@ -40,10 +44,13 @@ Partial Class frmMitarbeitersucheBearbeiten
Me.lblWohnadresse = New System.Windows.Forms.Label()
Me.lblName = New System.Windows.Forms.Label()
Me.pic = New System.Windows.Forms.PictureBox()
Me.cbxAllowFoto = New System.Windows.Forms.CheckBox()
Me.pnlHoverPic = New System.Windows.Forms.Panel()
Me.pnlSrch.SuspendLayout()
Me.pnlMain.SuspendLayout()
CType(Me.PictureBox2, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.PictureBox1, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.pic, System.ComponentModel.ISupportInitialize).BeginInit()
Me.pnlHoverPic.SuspendLayout()
Me.SuspendLayout()
'
'pnlSrch
@@ -92,12 +99,56 @@ Partial Class frmMitarbeitersucheBearbeiten
Me.pnlMain.Controls.Add(Me.lblWohnadresse)
Me.pnlMain.Controls.Add(Me.lblName)
Me.pnlMain.Controls.Add(Me.pic)
Me.pnlMain.Controls.Add(Me.pnlHoverPic)
Me.pnlMain.Dock = System.Windows.Forms.DockStyle.Fill
Me.pnlMain.Location = New System.Drawing.Point(0, 29)
Me.pnlMain.Name = "pnlMain"
Me.pnlMain.Size = New System.Drawing.Size(703, 335)
Me.pnlMain.TabIndex = 1
'
'Label1
'
Me.Label1.AutoSize = True
Me.Label1.Font = New System.Drawing.Font("Microsoft Sans Serif", 14.0!)
Me.Label1.Location = New System.Drawing.Point(4, 1)
Me.Label1.Name = "Label1"
Me.Label1.Size = New System.Drawing.Size(98, 24)
Me.Label1.TabIndex = 36
Me.Label1.Text = "Hover-Pic:"
'
'PictureBox2
'
Me.PictureBox2.BackgroundImage = Global.VERAG_PROG_ALLGEMEIN.My.Resources.Resources.personGray_m
Me.PictureBox2.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom
Me.PictureBox2.Cursor = System.Windows.Forms.Cursors.Hand
Me.PictureBox2.Location = New System.Drawing.Point(77, 29)
Me.PictureBox2.Name = "PictureBox2"
Me.PictureBox2.Size = New System.Drawing.Size(63, 59)
Me.PictureBox2.TabIndex = 35
Me.PictureBox2.TabStop = False
'
'PictureBox1
'
Me.PictureBox1.BackgroundImage = Global.VERAG_PROG_ALLGEMEIN.My.Resources.Resources.personGray_m
Me.PictureBox1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom
Me.PictureBox1.Cursor = System.Windows.Forms.Cursors.Hand
Me.PictureBox1.Location = New System.Drawing.Point(8, 29)
Me.PictureBox1.Name = "PictureBox1"
Me.PictureBox1.Size = New System.Drawing.Size(63, 59)
Me.PictureBox1.TabIndex = 34
Me.PictureBox1.TabStop = False
'
'cbxAllowFoto
'
Me.cbxAllowFoto.AutoSize = True
Me.cbxAllowFoto.Font = New System.Drawing.Font("Microsoft Sans Serif", 14.0!)
Me.cbxAllowFoto.Location = New System.Drawing.Point(7, 187)
Me.cbxAllowFoto.Name = "cbxAllowFoto"
Me.cbxAllowFoto.Size = New System.Drawing.Size(150, 28)
Me.cbxAllowFoto.TabIndex = 33
Me.cbxAllowFoto.Text = "Foto anzeigen"
Me.cbxAllowFoto.UseVisualStyleBackColor = True
'
'btn
'
Me.btn.FlatStyle = System.Windows.Forms.FlatStyle.Flat
@@ -241,16 +292,16 @@ Partial Class frmMitarbeitersucheBearbeiten
Me.pic.TabIndex = 0
Me.pic.TabStop = False
'
'cbxAllowFoto
'pnlHoverPic
'
Me.cbxAllowFoto.AutoSize = True
Me.cbxAllowFoto.Font = New System.Drawing.Font("Microsoft Sans Serif", 14.0!)
Me.cbxAllowFoto.Location = New System.Drawing.Point(7, 187)
Me.cbxAllowFoto.Name = "cbxAllowFoto"
Me.cbxAllowFoto.Size = New System.Drawing.Size(150, 28)
Me.cbxAllowFoto.TabIndex = 33
Me.cbxAllowFoto.Text = "Foto anzeigen"
Me.cbxAllowFoto.UseVisualStyleBackColor = True
Me.pnlHoverPic.Controls.Add(Me.Label1)
Me.pnlHoverPic.Controls.Add(Me.PictureBox2)
Me.pnlHoverPic.Controls.Add(Me.PictureBox1)
Me.pnlHoverPic.Location = New System.Drawing.Point(-1, 232)
Me.pnlHoverPic.Name = "pnlHoverPic"
Me.pnlHoverPic.Size = New System.Drawing.Size(181, 100)
Me.pnlHoverPic.TabIndex = 37
Me.pnlHoverPic.Visible = False
'
'frmMitarbeitersucheBearbeiten
'
@@ -268,7 +319,11 @@ Partial Class frmMitarbeitersucheBearbeiten
Me.pnlSrch.ResumeLayout(False)
Me.pnlMain.ResumeLayout(False)
Me.pnlMain.PerformLayout()
CType(Me.PictureBox2, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.PictureBox1, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.pic, System.ComponentModel.ISupportInitialize).EndInit()
Me.pnlHoverPic.ResumeLayout(False)
Me.pnlHoverPic.PerformLayout()
Me.ResumeLayout(False)
End Sub
@@ -291,4 +346,8 @@ Partial Class frmMitarbeitersucheBearbeiten
Friend WithEvents cbxGeburtsdatum As Windows.Forms.CheckBox
Friend WithEvents cbxWohnort As Windows.Forms.CheckBox
Friend WithEvents cbxAllowFoto As Windows.Forms.CheckBox
Friend WithEvents Label1 As Windows.Forms.Label
Friend WithEvents PictureBox2 As Windows.Forms.PictureBox
Friend WithEvents PictureBox1 As Windows.Forms.PictureBox
Friend WithEvents pnlHoverPic As Windows.Forms.Panel
End Class

View File

@@ -19,6 +19,11 @@ Public Class frmMitarbeitersucheBearbeiten
Private Sub frmMitarbeitersuche_Load(sender As Object, e As EventArgs) Handles Me.Load
If MA Is Nothing Then Me.Close()
initMA()
If VERAG_PROG_ALLGEMEIN.cBerechtignunen.CHECK_BERECHTIGUNG_bool("ADMIN", "SDL") Then
pnlHoverPic.Visible = True
End If
End Sub
@@ -59,6 +64,29 @@ Public Class frmMitarbeitersucheBearbeiten
pic.BackgroundImage = My.Resources.personGray_m
End If
If MA.mit_fotoHover1_DocId IsNot Nothing Then
Try
PictureBox1.BackgroundImage = Image.FromFile(cDATENSERVER.GET_PDFPath_BY_DocID(MA.mit_fotoHover1_DocId))
Catch ex As Exception
PictureBox1.BackgroundImage = My.Resources.personGray_m
End Try
ElseIf MA.mit_geschlecht = "w" Then
PictureBox1.BackgroundImage = My.Resources.personGray_w
Else
PictureBox1.BackgroundImage = My.Resources.personGray_m
End If
If MA.mit_fotoHover2_DocId IsNot Nothing Then
Try
PictureBox2.BackgroundImage = Image.FromFile(cDATENSERVER.GET_PDFPath_BY_DocID(MA.mit_fotoHover2_DocId))
Catch ex As Exception
PictureBox2.BackgroundImage = My.Resources.personGray_m
End Try
ElseIf MA.mit_geschlecht = "w" Then
PictureBox2.BackgroundImage = My.Resources.personGray_w
Else
PictureBox2.BackgroundImage = My.Resources.personGray_m
End If
End Sub
Private Sub btnClose_Click(sender As Object, e As EventArgs) Handles btnClose.Click
@@ -129,7 +157,7 @@ Public Class frmMitarbeitersucheBearbeiten
Dim Extension = New IO.FileInfo(fd.FileName).Extension
Dim docId = -1
If saveToDS(Extension, fd.FileName, docId) Then
If saveToDS(Extension, fd.FileName, "FRONT", docId) Then
MA.mit_foto_DocId = docId
Try
@@ -141,13 +169,13 @@ Public Class frmMitarbeitersucheBearbeiten
End If
End Sub
Public Function saveToDS(Extension, sourcePath, Optional ByRef da_id = -1) As Boolean
Public Function saveToDS(Extension, sourcePath, art, Optional ByRef da_id = -1) As Boolean
Dim DS As VERAG_PROG_ALLGEMEIN.cDATENSERVER = Nothing
If da_id > 0 Then
DS = New cDATENSERVER(da_id)
Else
DS = New VERAG_PROG_ALLGEMEIN.cDATENSERVER("DOKUMENTE", "MITARBEITER", "PERSONAL_FOTOS", "", "", MA.mit_nname & "_" & MA.mit_id & Extension, -1, False)
DS = New VERAG_PROG_ALLGEMEIN.cDATENSERVER("DOKUMENTE", "MITARBEITER", "PERSONAL_FOTOS", "", "", MA.mit_nname & "_" & MA.mit_id & "_" & art & Extension, -1, False)
End If
' Dim DS As New VERAG_PROG_ALLGEMEIN.cDATENSERVER("DOKUMENTE", "MITARBEITER", "PERSONAL_FOTOS", "", "", MA.mit_nname & "_" & MA.mit_id, -1, False)
@@ -159,4 +187,53 @@ Public Class frmMitarbeitersucheBearbeiten
Return True
End Function
Private Sub PictureBox1_Click(sender As Object, e As EventArgs) Handles PictureBox1.Click
Dim fd As Windows.Forms.OpenFileDialog = New Windows.Forms.OpenFileDialog()
fd.Title = "Bild auswählen"
' fd.InitialDirectory = "F:\PROGRAMME\ADMIN_DATA\Fotos_Mitarbeiter\"
fd.Filter = "Image Files(*.BMP;*.JPG;*.GIF;*.PNG)|*.BMP;*.JPG;*.GIF;*.PNG"
fd.FilterIndex = 2
fd.RestoreDirectory = True
If fd.ShowDialog() = DialogResult.OK AndAlso fd.FileName <> "" Then
Dim Extension = New IO.FileInfo(fd.FileName).Extension
Dim docId = -1
If saveToDS(Extension, fd.FileName, "HOVER1", docId) Then
MA.mit_fotoHover1_DocId = docId
Try
PictureBox1.BackgroundImage = Image.FromFile(cDATENSERVER.GET_PDFPath_BY_DocID(MA.mit_fotoHover1_DocId))
Catch ex As Exception
MsgBox(ex.Message & ex.StackTrace)
End Try
End If
End If
End Sub
Private Sub PictureBox2_Click(sender As Object, e As EventArgs) Handles PictureBox2.Click
Dim fd As Windows.Forms.OpenFileDialog = New Windows.Forms.OpenFileDialog()
fd.Title = "Bild auswählen"
' fd.InitialDirectory = "F:\PROGRAMME\ADMIN_DATA\Fotos_Mitarbeiter\"
fd.Filter = "Image Files(*.BMP;*.JPG;*.GIF;*.PNG)|*.BMP;*.JPG;*.GIF;*.PNG"
fd.FilterIndex = 2
fd.RestoreDirectory = True
If fd.ShowDialog() = DialogResult.OK AndAlso fd.FileName <> "" Then
Dim Extension = New IO.FileInfo(fd.FileName).Extension
Dim docId = -1
If saveToDS(Extension, fd.FileName, "HOVER2", docId) Then
MA.mit_fotoHover2_DocId = docId
Try
PictureBox2.BackgroundImage = Image.FromFile(cDATENSERVER.GET_PDFPath_BY_DocID(MA.mit_fotoHover2_DocId))
Catch ex As Exception
MsgBox(ex.Message & ex.StackTrace)
End Try
End If
End If
End Sub
End Class