Mitarbeitersprache

This commit is contained in:
2023-09-20 10:18:22 +02:00
parent c4a68cd19b
commit 021e459bdc
2 changed files with 63 additions and 7 deletions

View File

@@ -31,6 +31,8 @@ Partial Class frmMitarbeitersucheEinstellungen
Me.btn = New System.Windows.Forms.Button() Me.btn = New System.Windows.Forms.Button()
Me.lblName = New System.Windows.Forms.Label() Me.lblName = New System.Windows.Forms.Label()
Me.pic = New System.Windows.Forms.PictureBox() Me.pic = New System.Windows.Forms.PictureBox()
Me.Label2 = New System.Windows.Forms.Label()
Me.lbSprachen = New VERAG_PROG_ALLGEMEIN.MyListBox()
Me.pnlSrch.SuspendLayout() Me.pnlSrch.SuspendLayout()
Me.pnlMain.SuspendLayout() Me.pnlMain.SuspendLayout()
CType(Me.pic, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.pic, System.ComponentModel.ISupportInitialize).BeginInit()
@@ -67,6 +69,8 @@ Partial Class frmMitarbeitersucheEinstellungen
'pnlMain 'pnlMain
' '
Me.pnlMain.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle Me.pnlMain.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
Me.pnlMain.Controls.Add(Me.lbSprachen)
Me.pnlMain.Controls.Add(Me.Label2)
Me.pnlMain.Controls.Add(Me.cboTeam) Me.pnlMain.Controls.Add(Me.cboTeam)
Me.pnlMain.Controls.Add(Me.Label1) Me.pnlMain.Controls.Add(Me.Label1)
Me.pnlMain.Controls.Add(Me.btn) Me.pnlMain.Controls.Add(Me.btn)
@@ -85,7 +89,7 @@ Partial Class frmMitarbeitersucheEinstellungen
Me.cboTeam._value = "" Me.cboTeam._value = ""
Me.cboTeam.Font = New System.Drawing.Font("Microsoft Sans Serif", 14.0!) Me.cboTeam.Font = New System.Drawing.Font("Microsoft Sans Serif", 14.0!)
Me.cboTeam.FormattingEnabled = True Me.cboTeam.FormattingEnabled = True
Me.cboTeam.Location = New System.Drawing.Point(264, 96) Me.cboTeam.Location = New System.Drawing.Point(270, 61)
Me.cboTeam.Name = "cboTeam" Me.cboTeam.Name = "cboTeam"
Me.cboTeam.Size = New System.Drawing.Size(421, 32) Me.cboTeam.Size = New System.Drawing.Size(421, 32)
Me.cboTeam.TabIndex = 35 Me.cboTeam.TabIndex = 35
@@ -93,7 +97,7 @@ Partial Class frmMitarbeitersucheEinstellungen
'Label1 'Label1
' '
Me.Label1.Font = New System.Drawing.Font("Microsoft Sans Serif", 14.0!) Me.Label1.Font = New System.Drawing.Font("Microsoft Sans Serif", 14.0!)
Me.Label1.Location = New System.Drawing.Point(182, 100) Me.Label1.Location = New System.Drawing.Point(174, 65)
Me.Label1.Name = "Label1" Me.Label1.Name = "Label1"
Me.Label1.Size = New System.Drawing.Size(76, 28) Me.Label1.Size = New System.Drawing.Size(76, 28)
Me.Label1.TabIndex = 34 Me.Label1.TabIndex = 34
@@ -103,9 +107,9 @@ Partial Class frmMitarbeitersucheEinstellungen
' '
Me.btn.FlatStyle = System.Windows.Forms.FlatStyle.Flat Me.btn.FlatStyle = System.Windows.Forms.FlatStyle.Flat
Me.btn.Font = New System.Drawing.Font("Microsoft Sans Serif", 14.0!) Me.btn.Font = New System.Drawing.Font("Microsoft Sans Serif", 14.0!)
Me.btn.Location = New System.Drawing.Point(264, 222) Me.btn.Location = New System.Drawing.Point(503, 222)
Me.btn.Name = "btn" Me.btn.Name = "btn"
Me.btn.Size = New System.Drawing.Size(421, 51) Me.btn.Size = New System.Drawing.Size(182, 51)
Me.btn.TabIndex = 32 Me.btn.TabIndex = 32
Me.btn.Text = "Speichern" Me.btn.Text = "Speichern"
Me.btn.UseVisualStyleBackColor = True Me.btn.UseVisualStyleBackColor = True
@@ -132,7 +136,28 @@ Partial Class frmMitarbeitersucheEinstellungen
Me.pic.TabIndex = 0 Me.pic.TabIndex = 0
Me.pic.TabStop = False Me.pic.TabStop = False
' '
'frmMitarbeitersucheBearbeiten 'Label2
'
Me.Label2.Font = New System.Drawing.Font("Microsoft Sans Serif", 14.0!)
Me.Label2.Location = New System.Drawing.Point(174, 98)
Me.Label2.Name = "Label2"
Me.Label2.Size = New System.Drawing.Size(90, 28)
Me.Label2.TabIndex = 36
Me.Label2.Text = "Sprache:"
'
'lbSprachen
'
Me.lbSprachen._value = ""
Me.lbSprachen.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.lbSprachen.FormattingEnabled = True
Me.lbSprachen.Location = New System.Drawing.Point(270, 98)
Me.lbSprachen.MultiColumn = True
Me.lbSprachen.Name = "lbSprachen"
Me.lbSprachen.SelectionMode = System.Windows.Forms.SelectionMode.MultiSimple
Me.lbSprachen.Size = New System.Drawing.Size(192, 121)
Me.lbSprachen.TabIndex = 98
'
'frmMitarbeitersucheEinstellungen
' '
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
@@ -142,7 +167,7 @@ Partial Class frmMitarbeitersucheEinstellungen
Me.Controls.Add(Me.pnlSrch) Me.Controls.Add(Me.pnlSrch)
Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None
Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon) Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon)
Me.Name = "frmMitarbeitersucheBearbeiten" Me.Name = "frmMitarbeitersucheEinstellungen"
Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen
Me.Text = "frmMitarbeitersuche" Me.Text = "frmMitarbeitersuche"
Me.pnlSrch.ResumeLayout(False) Me.pnlSrch.ResumeLayout(False)
@@ -160,4 +185,6 @@ Partial Class frmMitarbeitersucheEinstellungen
Friend WithEvents btn As Windows.Forms.Button Friend WithEvents btn As Windows.Forms.Button
Friend WithEvents cboTeam As MyComboBox Friend WithEvents cboTeam As MyComboBox
Friend WithEvents Label1 As Windows.Forms.Label Friend WithEvents Label1 As Windows.Forms.Label
Friend WithEvents Label2 As Windows.Forms.Label
Friend WithEvents lbSprachen As MyListBox
End Class End Class

View File

@@ -21,6 +21,8 @@ Public Class frmMitarbeitersucheEinstellungen
cboTeam.fillWithSQL("SELECT team_id, team_bezeichnung FROM tblTeams WHERE team_firma='" & MA.mit_firma & "'", False, "ADMIN", True) cboTeam.fillWithSQL("SELECT team_id, team_bezeichnung FROM tblTeams WHERE team_firma='" & MA.mit_firma & "'", False, "ADMIN", True)
lbSprachen.fillWithSQL("SELECT [wert], [bezeichnung] FROM [dbo].[tblSprachen]", False, "ADMIN")
initMA() initMA()
End Sub End Sub
@@ -49,6 +51,20 @@ Public Class frmMitarbeitersucheEinstellungen
pic.BackgroundImage = My.Resources.personGray_m pic.BackgroundImage = My.Resources.personGray_m
End If End If
If MA.mit_Sprachkentnisse IsNot Nothing AndAlso MA.mit_Sprachkentnisse <> "" Then
For Each f In MA.mit_Sprachkentnisse.ToString.Split(",")
For i = 0 To lbSprachen.Items.Count - 1
If DirectCast(lbSprachen.Items(i), VERAG_PROG_ALLGEMEIN.MyListItem).Value.ToString = f.ToString Then
lbSprachen.SetSelected(i, True)
End If
Next
Next
End If
End Sub End Sub
Private Sub btnClose_Click(sender As Object, e As EventArgs) Handles btnClose.Click Private Sub btnClose_Click(sender As Object, e As EventArgs) Handles btnClose.Click
@@ -63,6 +79,19 @@ Public Class frmMitarbeitersucheEinstellungen
If MA.mit_id <= 0 Then MsgBox("Fehler ID!") : Exit Sub If MA.mit_id <= 0 Then MsgBox("Fehler ID!") : Exit Sub
MA.mit_Sprachkentnisse = ""
If MA.mit_Sprachkentnisse = "" Then
For Each i In lbSprachen.SelectedItems
MA.mit_Sprachkentnisse &= DirectCast(i, VERAG_PROG_ALLGEMEIN.MyListItem).Value & ","
Next
End If
If MA.mit_Sprachkentnisse <> "" And MA.mit_Sprachkentnisse.ToString.EndsWith(",") Then
MA.mit_Sprachkentnisse = MA.mit_Sprachkentnisse.ToString.Substring(0, MA.mit_Sprachkentnisse.ToString.Length - 1)
End If
If MA.SAVE Then If MA.SAVE Then
Me.DialogResult = Windows.Forms.DialogResult.OK Me.DialogResult = Windows.Forms.DialogResult.OK
Me.Close() Me.Close()