timasabfrage inkl. Schalter.

This commit is contained in:
2025-10-22 12:18:45 +02:00
parent d95899945e
commit 0eb68d12d9
4 changed files with 81 additions and 4 deletions

View File

@@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices
' übernehmen, indem Sie "*" eingeben: ' übernehmen, indem Sie "*" eingeben:
' <Assembly: AssemblyVersion("1.0.*")> ' <Assembly: AssemblyVersion("1.0.*")>
<Assembly: AssemblyVersion("1.4.7.2")> <Assembly: AssemblyVersion("1.4.7.3")>
<Assembly: AssemblyFileVersion("1.4.7.2")> <Assembly: AssemblyFileVersion("1.4.7.3")>

View File

@@ -101,6 +101,7 @@ Public Class cMitarbeiter
Property mit_Notfall_Name As Object = Nothing Property mit_Notfall_Name As Object = Nothing
Property mit_Notfall_Handy As Object = Nothing Property mit_Notfall_Handy As Object = Nothing
Property mit_Notfall_Mail As Object = Nothing Property mit_Notfall_Mail As Object = Nothing
Property mit_SchalterID As Object = Nothing
@@ -219,6 +220,7 @@ Public Class cMitarbeiter
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("mit_Notfall_Name", mit_Notfall_Name)) list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("mit_Notfall_Name", mit_Notfall_Name))
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("mit_Notfall_Handy", mit_Notfall_Handy)) list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("mit_Notfall_Handy", mit_Notfall_Handy))
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("mit_Notfall_Mail", mit_Notfall_Mail)) list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("mit_Notfall_Mail", mit_Notfall_Mail))
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("mit_SchalterID", mit_SchalterID))
@@ -428,6 +430,7 @@ Public Class cMitarbeiter
If Not dr.Item("mit_Notfall_Handy") Is DBNull.Value Then Me.mit_Notfall_Handy = dr.Item("mit_Notfall_Handy") If Not dr.Item("mit_Notfall_Handy") Is DBNull.Value Then Me.mit_Notfall_Handy = dr.Item("mit_Notfall_Handy")
If Not dr.Item("mit_Notfall_Name") Is DBNull.Value Then Me.mit_Notfall_Name = dr.Item("mit_Notfall_Name") If Not dr.Item("mit_Notfall_Name") Is DBNull.Value Then Me.mit_Notfall_Name = dr.Item("mit_Notfall_Name")
If Not dr.Item("mit_Notfall_Mail") Is DBNull.Value Then Me.mit_Notfall_Mail = dr.Item("mit_Notfall_Mail") If Not dr.Item("mit_Notfall_Mail") Is DBNull.Value Then Me.mit_Notfall_Mail = dr.Item("mit_Notfall_Mail")
If Not dr.Item("mit_SchalterID") Is DBNull.Value Then Me.mit_SchalterID = dr.Item("mit_SchalterID")
Catch ex As Exception Catch ex As Exception

View File

@@ -24,8 +24,8 @@ Partial Class frmTimasabfrage
'Das Bearbeiten mit dem Code-Editor ist nicht möglich. 'Das Bearbeiten mit dem Code-Editor ist nicht möglich.
<System.Diagnostics.DebuggerStepThrough()> <System.Diagnostics.DebuggerStepThrough()>
Private Sub InitializeComponent() Private Sub InitializeComponent()
Me.components = New System.ComponentModel.Container() Me.MyPanel1 = New VERAG_PROG_ALLGEMEIN.MyPanel()
Me.MyPanel1 = New VERAG_PROG_ALLGEMEIN.MyPanel(Me.components) Me.cbxSchalterID = New VERAG_PROG_ALLGEMEIN.MyComboBox()
Me.rbHO = New System.Windows.Forms.RadioButton() Me.rbHO = New System.Windows.Forms.RadioButton()
Me.rbBuero = New System.Windows.Forms.RadioButton() Me.rbBuero = New System.Windows.Forms.RadioButton()
Me.Button1 = New System.Windows.Forms.Button() Me.Button1 = New System.Windows.Forms.Button()
@@ -33,6 +33,7 @@ Partial Class frmTimasabfrage
Me.btnClose = New System.Windows.Forms.Button() Me.btnClose = New System.Windows.Forms.Button()
Me.btn = New System.Windows.Forms.Button() Me.btn = New System.Windows.Forms.Button()
Me.Label1 = New System.Windows.Forms.Label() Me.Label1 = New System.Windows.Forms.Label()
Me.lblSchalter = New System.Windows.Forms.Label()
Me.MyPanel1.SuspendLayout() Me.MyPanel1.SuspendLayout()
Me.SuspendLayout() Me.SuspendLayout()
' '
@@ -40,6 +41,8 @@ Partial Class frmTimasabfrage
' '
Me.MyPanel1.BackColor = System.Drawing.Color.White Me.MyPanel1.BackColor = System.Drawing.Color.White
Me.MyPanel1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle Me.MyPanel1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
Me.MyPanel1.Controls.Add(Me.lblSchalter)
Me.MyPanel1.Controls.Add(Me.cbxSchalterID)
Me.MyPanel1.Controls.Add(Me.rbHO) Me.MyPanel1.Controls.Add(Me.rbHO)
Me.MyPanel1.Controls.Add(Me.rbBuero) Me.MyPanel1.Controls.Add(Me.rbBuero)
Me.MyPanel1.Controls.Add(Me.Button1) Me.MyPanel1.Controls.Add(Me.Button1)
@@ -53,6 +56,24 @@ Partial Class frmTimasabfrage
Me.MyPanel1.Size = New System.Drawing.Size(264, 103) Me.MyPanel1.Size = New System.Drawing.Size(264, 103)
Me.MyPanel1.TabIndex = 3 Me.MyPanel1.TabIndex = 3
' '
'cbxSchalterID
'
Me.cbxSchalterID._allowedValuesFreiText = Nothing
Me.cbxSchalterID._allowFreiText = False
Me.cbxSchalterID._value = ""
Me.cbxSchalterID.BackColor = System.Drawing.Color.FromArgb(CType(CType(224, Byte), Integer), CType(CType(224, Byte), Integer), CType(CType(224, Byte), Integer))
Me.cbxSchalterID.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
Me.cbxSchalterID.DropDownWidth = 50
Me.cbxSchalterID.FlatStyle = System.Windows.Forms.FlatStyle.Flat
Me.cbxSchalterID.Font = New System.Drawing.Font("Microsoft Sans Serif", 12.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.cbxSchalterID.FormattingEnabled = True
Me.cbxSchalterID.Items.AddRange(New Object() {"", "100000-199999: XXXXXX", "200000-299999: XXXXXX", "300000-399999: XXXXXX", "400000-499999: XXXXXX", "500000-599999: XXXXXX", "600000-699999: XXXXXX", "700000-799999: XXXXXX", "800000-899999: XXXXXX", "900000-999999: XXXXXX"})
Me.cbxSchalterID.Location = New System.Drawing.Point(3, 34)
Me.cbxSchalterID.Name = "cbxSchalterID"
Me.cbxSchalterID.Size = New System.Drawing.Size(58, 28)
Me.cbxSchalterID.TabIndex = 10
Me.cbxSchalterID.Visible = False
'
'rbHO 'rbHO
' '
Me.rbHO.AutoSize = True Me.rbHO.AutoSize = True
@@ -145,6 +166,16 @@ Partial Class frmTimasabfrage
Me.Label1.Size = New System.Drawing.Size(222, 18) Me.Label1.Size = New System.Drawing.Size(222, 18)
Me.Label1.TabIndex = 6 Me.Label1.TabIndex = 6
' '
'lblSchalter
'
Me.lblSchalter.AutoSize = True
Me.lblSchalter.Location = New System.Drawing.Point(3, 20)
Me.lblSchalter.Name = "lblSchalter"
Me.lblSchalter.Size = New System.Drawing.Size(46, 13)
Me.lblSchalter.TabIndex = 11
Me.lblSchalter.Text = "Schalter"
Me.lblSchalter.Visible = False
'
'frmTimasabfrage 'frmTimasabfrage
' '
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
@@ -169,4 +200,6 @@ Partial Class frmTimasabfrage
Friend WithEvents Button1 As Button Friend WithEvents Button1 As Button
Friend WithEvents rbHO As RadioButton Friend WithEvents rbHO As RadioButton
Friend WithEvents rbBuero As RadioButton Friend WithEvents rbBuero As RadioButton
Public WithEvents cbxSchalterID As MyComboBox
Friend WithEvents lblSchalter As Label
End Class End Class

View File

@@ -2,6 +2,7 @@
Dim mit As VERAG_PROG_ALLGEMEIN.cMitarbeiter Dim mit As VERAG_PROG_ALLGEMEIN.cMitarbeiter
Public Datum As Date = CDate(Now.ToShortDateString) Public Datum As Date = CDate(Now.ToShortDateString)
Public typ As Integer = -1 Public typ As Integer = -1
Public Schalter As Integer = -1
Sub New() Sub New()
' Dieser Aufruf ist für den Designer erforderlich. ' Dieser Aufruf ist für den Designer erforderlich.
@@ -20,6 +21,12 @@
cboTyp.Items.Add(New VERAG_PROG_ALLGEMEIN.MyListItem("Büro", "0")) cboTyp.Items.Add(New VERAG_PROG_ALLGEMEIN.MyListItem("Büro", "0"))
cboTyp.Items.Add(New VERAG_PROG_ALLGEMEIN.MyListItem("Homeoffice", "3")) cboTyp.Items.Add(New VERAG_PROG_ALLGEMEIN.MyListItem("Homeoffice", "3"))
cbxSchalterID.Items.Clear()
cbxSchalterID.Items.Add(New VERAG_PROG_ALLGEMEIN.MyListItem("", ""))
cbxSchalterID.Items.Add(New VERAG_PROG_ALLGEMEIN.MyListItem("1", "1"))
cbxSchalterID.Items.Add(New VERAG_PROG_ALLGEMEIN.MyListItem("2", "2"))
cbxSchalterID.changeItem("")
If mit IsNot Nothing Then If mit IsNot Nothing Then
Label1.Text = "Zeit erfassen für: " & mit.mit_nname & " " & mit.mit_vname Label1.Text = "Zeit erfassen für: " & mit.mit_nname & " " & mit.mit_vname
If mit.mit_homeoffice Then If mit.mit_homeoffice Then
@@ -29,10 +36,23 @@
rbHO.Checked = False rbHO.Checked = False
cboTyp.changeItem("Büro") cboTyp.changeItem("Büro")
End If End If
If mit.mit_niederlassung = "NKD" Then
cbxSchalterID.Visible = True
Else
cbxSchalterID.Visible = False
End If
lblSchalter.Visible = cbxSchalterID.Visible
End If End If
End Sub End Sub
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
@@ -40,10 +60,24 @@
If typ = -1 Then If typ = -1 Then
MsgBox("Bitte Typ auswählen") MsgBox("Bitte Typ auswählen")
DialogResult = Windows.Forms.DialogResult.None DialogResult = Windows.Forms.DialogResult.None
Else Else
DialogResult = Windows.Forms.DialogResult.OK DialogResult = Windows.Forms.DialogResult.OK
End If End If
If mit.mit_niederlassung = "NKD" AndAlso Schalter = -1 Then
MsgBox("Bitte Schalter auswählen")
DialogResult = Windows.Forms.DialogResult.None
Else
If Schalter > 0 Then
mit.mit_SchalterID = Schalter
mit.SAVE()
End If
DialogResult = Windows.Forms.DialogResult.OK
End If
End Sub End Sub
Private Sub rbBuero_CheckedChanged(sender As Object, e As EventArgs) Handles rbBuero.CheckedChanged, rbHO.CheckedChanged Private Sub rbBuero_CheckedChanged(sender As Object, e As EventArgs) Handles rbBuero.CheckedChanged, rbHO.CheckedChanged
@@ -58,4 +92,11 @@
End Sub End Sub
Private Sub cbxSchalterID_SelectedValueChanged(sender As Object, e As EventArgs) Handles cbxSchalterID.SelectedValueChanged
If cbxSchalterID._value <> "" AndAlso IsNumeric(cbxSchalterID._value) AndAlso CInt(cbxSchalterID._value) > 0 Then
Schalter = cbxSchalterID._value
Else
Schalter = -1
End If
End Sub
End Class End Class