This commit is contained in:
2023-01-10 10:08:51 +01:00
13 changed files with 1097 additions and 484 deletions

View File

@@ -25,6 +25,8 @@
Property dedet_ExcelMonatFarbe As Object
Property dedet_ExcelMonatBezeichnung As String = ""
Property dedet_Splitschicht As Boolean = False
Property dedet_Hauptsplitschicht As Boolean = False
Property dedet_Aktiv As Boolean = True
Property ZEITEN As New List(Of cDienstplanSchichtZeiten)
@@ -71,6 +73,8 @@
Me.dedet_ExcelMonatFarbe = If(row("dedet_ExcelMonatFarbe") IsNot DBNull.Value, row("dedet_ExcelMonatFarbe"), Nothing)
Me.dedet_ExcelMonatBezeichnung = If(row("dedet_ExcelMonatBezeichnung") IsNot DBNull.Value, row("dedet_ExcelMonatBezeichnung"), "")
Me.dedet_Aktiv = CBool(row("dedet_Aktiv"))
Me.dedet_Splitschicht = CBool(row("dedet_Splitschicht"))
Me.dedet_Hauptsplitschicht = CBool(row("dedet_Hauptsplitschicht"))
LOAD_ZEITEN(Me.dedet_id)
End If

View File

@@ -1,9 +1,9 @@
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()>
Partial Class frmDienstplanVariabel
Inherits System.Windows.Forms.Form
'Das Formular überschreibt den Löschvorgang, um die Komponentenliste zu bereinigen.
<System.Diagnostics.DebuggerNonUserCode()> _
<System.Diagnostics.DebuggerNonUserCode()>
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
Try
If disposing AndAlso components IsNot Nothing Then
@@ -20,7 +20,7 @@ Partial Class frmDienstplanVariabel
'Hinweis: Die folgende Prozedur ist für den Windows Form-Designer erforderlich.
'Das Bearbeiten ist mit dem Windows Form-Designer möglich.
'Das Bearbeiten mit dem Code-Editor ist nicht möglich.
<System.Diagnostics.DebuggerStepThrough()> _
<System.Diagnostics.DebuggerStepThrough()>
Private Sub InitializeComponent()
Me.components = New System.ComponentModel.Container()
Dim ListViewItem1 As System.Windows.Forms.ListViewItem = New System.Windows.Forms.ListViewItem("KW 1")
@@ -39,6 +39,7 @@ Partial Class frmDienstplanVariabel
Me.ctiBemWo = New System.Windows.Forms.ToolStripMenuItem()
Me.NormaldienstToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
Me.GanzeWocheToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
Me.ToolStripMenuSplitschicht = New System.Windows.Forms.ToolStripMenuItem()
Me.TabPage1 = New System.Windows.Forms.TabPage()
Me.PictureBox1 = New System.Windows.Forms.PictureBox()
Me.Button2 = New System.Windows.Forms.Button()
@@ -60,6 +61,8 @@ Partial Class frmDienstplanVariabel
Me.cboQSSpaet = New System.Windows.Forms.ComboBox()
Me.Label23 = New System.Windows.Forms.Label()
Me.GroupBox1 = New System.Windows.Forms.GroupBox()
Me.txtSchichtstd = New System.Windows.Forms.TextBox()
Me.Label1 = New System.Windows.Forms.Label()
Me.Label2 = New System.Windows.Forms.Label()
Me.txtWoStd = New System.Windows.Forms.TextBox()
Me.TabControl1 = New System.Windows.Forms.TabControl()
@@ -151,9 +154,10 @@ Partial Class frmDienstplanVariabel
Me.Button4 = New System.Windows.Forms.Button()
Me.Button3 = New System.Windows.Forms.Button()
Me.ContextMenuStrip1 = New System.Windows.Forms.ContextMenuStrip(Me.components)
Me.SchichtLöcshenToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
Me.Panel4 = New System.Windows.Forms.Panel()
Me.Button19 = New System.Windows.Forms.Button()
Me.pnlOptions = New System.Windows.Forms.Panel()
Me.Button19 = New System.Windows.Forms.Button()
Me.UsrcntlAuswertungWocheAuslastung1 = New ADMIN.usrcntlAuswertungWocheAuslastung()
Me.UsrCntlAuswertungAuslastungMA1 = New ADMIN.usrCntlAuswertungAuslastungMA()
Me.ctxtDgv.SuspendLayout()
@@ -211,15 +215,16 @@ Partial Class frmDienstplanVariabel
CType(Me.dgvUrl_Do, System.ComponentModel.ISupportInitialize).BeginInit()
Me.tbAuswertung.SuspendLayout()
Me.tbTagesverteilung.SuspendLayout()
Me.ContextMenuStrip1.SuspendLayout()
Me.Panel4.SuspendLayout()
Me.pnlOptions.SuspendLayout()
Me.SuspendLayout()
'
'ctxtDgv
'
Me.ctxtDgv.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.ctiFrei, Me.ctiUrlaub, Me.ctiKrankenstand, Me.ctiDienstreise, Me.ZeitausgleichToolStripMenuItem, Me.ctiDbl, Me.ctiWocheSchichtWechsel, Me.ctiBemWo, Me.NormaldienstToolStripMenuItem, Me.GanzeWocheToolStripMenuItem})
Me.ctxtDgv.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.ctiFrei, Me.ctiUrlaub, Me.ctiKrankenstand, Me.ctiDienstreise, Me.ZeitausgleichToolStripMenuItem, Me.ctiDbl, Me.ctiWocheSchichtWechsel, Me.ctiBemWo, Me.NormaldienstToolStripMenuItem, Me.GanzeWocheToolStripMenuItem, Me.ToolStripMenuSplitschicht})
Me.ctxtDgv.Name = "ctxtDgvSchicht1"
Me.ctxtDgv.Size = New System.Drawing.Size(229, 224)
Me.ctxtDgv.Size = New System.Drawing.Size(229, 246)
'
'ctiFrei
'
@@ -288,6 +293,12 @@ Partial Class frmDienstplanVariabel
Me.GanzeWocheToolStripMenuItem.Size = New System.Drawing.Size(228, 22)
Me.GanzeWocheToolStripMenuItem.Text = "--> Ganze Woche"
'
'ToolStripMenuSplitschicht
'
Me.ToolStripMenuSplitschicht.Name = "ToolStripMenuSplitschicht"
Me.ToolStripMenuSplitschicht.Size = New System.Drawing.Size(228, 22)
Me.ToolStripMenuSplitschicht.Text = "--> Splitschicht hinzufügen"
'
'TabPage1
'
Me.TabPage1.Controls.Add(Me.PictureBox1)
@@ -493,6 +504,8 @@ Partial Class frmDienstplanVariabel
'GroupBox1
'
Me.GroupBox1.BackColor = System.Drawing.Color.White
Me.GroupBox1.Controls.Add(Me.txtSchichtstd)
Me.GroupBox1.Controls.Add(Me.Label1)
Me.GroupBox1.Controls.Add(Me.Label2)
Me.GroupBox1.Controls.Add(Me.txtWoStd)
Me.GroupBox1.Controls.Add(Me.TabControl1)
@@ -518,11 +531,34 @@ Partial Class frmDienstplanVariabel
Me.GroupBox1.TabStop = False
Me.GroupBox1.Text = "Details zum aktuellen Eintrag"
'
'txtSchichtstd
'
Me.txtSchichtstd.BackColor = System.Drawing.Color.White
Me.txtSchichtstd.BorderStyle = System.Windows.Forms.BorderStyle.None
Me.txtSchichtstd.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.txtSchichtstd.Location = New System.Drawing.Point(194, 117)
Me.txtSchichtstd.MaxLength = 1
Me.txtSchichtstd.Name = "txtSchichtstd"
Me.txtSchichtstd.ReadOnly = True
Me.txtSchichtstd.Size = New System.Drawing.Size(38, 13)
Me.txtSchichtstd.TabIndex = 99
'
'Label1
'
Me.Label1.AutoSize = True
Me.Label1.ForeColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(54, Byte), Integer), CType(CType(128, Byte), Integer))
Me.Label1.Location = New System.Drawing.Point(120, 118)
Me.Label1.Name = "Label1"
Me.Label1.Size = New System.Drawing.Size(68, 13)
Me.Label1.TabIndex = 98
Me.Label1.Text = "Std. Schicht:"
Me.Label1.Visible = False
'
'Label2
'
Me.Label2.AutoSize = True
Me.Label2.ForeColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(54, Byte), Integer), CType(CType(128, Byte), Integer))
Me.Label2.Location = New System.Drawing.Point(133, 117)
Me.Label2.Location = New System.Drawing.Point(238, 118)
Me.Label2.Name = "Label2"
Me.Label2.Size = New System.Drawing.Size(51, 13)
Me.Label2.TabIndex = 97
@@ -533,7 +569,7 @@ Partial Class frmDienstplanVariabel
Me.txtWoStd.BackColor = System.Drawing.Color.White
Me.txtWoStd.BorderStyle = System.Windows.Forms.BorderStyle.None
Me.txtWoStd.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.txtWoStd.Location = New System.Drawing.Point(190, 117)
Me.txtWoStd.Location = New System.Drawing.Point(302, 118)
Me.txtWoStd.MaxLength = 1
Me.txtWoStd.Name = "txtWoStd"
Me.txtWoStd.ReadOnly = True
@@ -566,7 +602,7 @@ Partial Class frmDienstplanVariabel
'
Me.Button17.FlatStyle = System.Windows.Forms.FlatStyle.Flat
Me.Button17.ForeColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(54, Byte), Integer), CType(CType(128, Byte), Integer))
Me.Button17.Location = New System.Drawing.Point(234, 112)
Me.Button17.Location = New System.Drawing.Point(231, 154)
Me.Button17.Name = "Button17"
Me.Button17.Size = New System.Drawing.Size(115, 23)
Me.Button17.TabIndex = 95
@@ -1586,8 +1622,15 @@ Partial Class frmDienstplanVariabel
'
'ContextMenuStrip1
'
Me.ContextMenuStrip1.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.SchichtLöcshenToolStripMenuItem})
Me.ContextMenuStrip1.Name = "ContextMenuStrip1"
Me.ContextMenuStrip1.Size = New System.Drawing.Size(61, 4)
Me.ContextMenuStrip1.Size = New System.Drawing.Size(181, 48)
'
'SchichtLöcshenToolStripMenuItem
'
Me.SchichtLöcshenToolStripMenuItem.Name = "SchichtLöcshenToolStripMenuItem"
Me.SchichtLöcshenToolStripMenuItem.Size = New System.Drawing.Size(180, 22)
Me.SchichtLöcshenToolStripMenuItem.Text = "Schicht löschen"
'
'Panel4
'
@@ -1607,23 +1650,6 @@ Partial Class frmDienstplanVariabel
Me.Panel4.Size = New System.Drawing.Size(1545, 42)
Me.Panel4.TabIndex = 3
'
'Button19
'
Me.Button19.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom
Me.Button19.FlatAppearance.BorderSize = 0
Me.Button19.FlatStyle = System.Windows.Forms.FlatStyle.Flat
Me.Button19.ForeColor = System.Drawing.Color.Black
Me.Button19.Image = Global.ADMIN.My.Resources.Resources.Excel_2013_logo_155x110
Me.Button19.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft
Me.Button19.Location = New System.Drawing.Point(234, 7)
Me.Button19.Name = "Button19"
Me.Button19.Size = New System.Drawing.Size(98, 27)
Me.Button19.TabIndex = 107
Me.Button19.Tag = "Dienstplan erstellen"
Me.Button19.Text = "Monat"
Me.Button19.TextAlign = System.Drawing.ContentAlignment.MiddleRight
Me.Button19.UseVisualStyleBackColor = True
'
'pnlOptions
'
Me.pnlOptions.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _
@@ -1643,6 +1669,23 @@ Partial Class frmDienstplanVariabel
Me.pnlOptions.Size = New System.Drawing.Size(1088, 41)
Me.pnlOptions.TabIndex = 108
'
'Button19
'
Me.Button19.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom
Me.Button19.FlatAppearance.BorderSize = 0
Me.Button19.FlatStyle = System.Windows.Forms.FlatStyle.Flat
Me.Button19.ForeColor = System.Drawing.Color.Black
Me.Button19.Image = Global.ADMIN.My.Resources.Resources.Excel_2013_logo_155x110
Me.Button19.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft
Me.Button19.Location = New System.Drawing.Point(234, 7)
Me.Button19.Name = "Button19"
Me.Button19.Size = New System.Drawing.Size(98, 27)
Me.Button19.TabIndex = 107
Me.Button19.Tag = "Dienstplan erstellen"
Me.Button19.Text = "Monat"
Me.Button19.TextAlign = System.Drawing.ContentAlignment.MiddleRight
Me.Button19.UseVisualStyleBackColor = True
'
'UsrcntlAuswertungWocheAuslastung1
'
Me.UsrcntlAuswertungWocheAuslastung1.BackColor = System.Drawing.Color.FromArgb(CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer))
@@ -1733,6 +1776,7 @@ Partial Class frmDienstplanVariabel
CType(Me.dgvUrl_Do, System.ComponentModel.ISupportInitialize).EndInit()
Me.tbAuswertung.ResumeLayout(False)
Me.tbTagesverteilung.ResumeLayout(False)
Me.ContextMenuStrip1.ResumeLayout(False)
Me.Panel4.ResumeLayout(False)
Me.Panel4.PerformLayout()
Me.pnlOptions.ResumeLayout(False)
@@ -1868,4 +1912,8 @@ Partial Class frmDienstplanVariabel
Friend WithEvents Button18 As System.Windows.Forms.Button
Friend WithEvents Button19 As System.Windows.Forms.Button
Friend WithEvents pnlOptions As Panel
Friend WithEvents ToolStripMenuSplitschicht As ToolStripMenuItem
Friend WithEvents Label1 As Label
Friend WithEvents txtSchichtstd As TextBox
Friend WithEvents SchichtLöcshenToolStripMenuItem As ToolStripMenuItem
End Class

File diff suppressed because it is too large Load Diff

View File

@@ -279,6 +279,8 @@ Partial Class frmDiestAddMa
Me.Label57 = New System.Windows.Forms.Label()
Me.txtStdFeiertagTZ = New System.Windows.Forms.TextBox()
Me.Label58 = New System.Windows.Forms.Label()
Me.lblLand = New System.Windows.Forms.Label()
Me.cboLand = New System.Windows.Forms.ComboBox()
Me.grpTeilzeit.SuspendLayout()
Me.TabControl1.SuspendLayout()
Me.TabPage1.SuspendLayout()
@@ -2839,12 +2841,33 @@ Partial Class frmDiestAddMa
Me.Label58.TabIndex = 27
Me.Label58.Text = "Abweichende WochenStd.:"
'
'lblLand
'
Me.lblLand.AutoSize = True
Me.lblLand.Location = New System.Drawing.Point(411, 63)
Me.lblLand.Name = "lblLand"
Me.lblLand.Size = New System.Drawing.Size(66, 13)
Me.lblLand.TabIndex = 28
Me.lblLand.Text = "Land-Kürzel:"
'
'cboLand
'
Me.cboLand.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
Me.cboLand.FormattingEnabled = True
Me.cboLand.Items.AddRange(New Object() {"", "ZOLL 1", "ZOLL 2", "ZOLL TAG", "QS"})
Me.cboLand.Location = New System.Drawing.Point(408, 79)
Me.cboLand.Name = "cboLand"
Me.cboLand.Size = New System.Drawing.Size(72, 21)
Me.cboLand.TabIndex = 29
'
'frmDiestAddMa
'
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
Me.BackColor = System.Drawing.Color.White
Me.ClientSize = New System.Drawing.Size(503, 626)
Me.Controls.Add(Me.cboLand)
Me.Controls.Add(Me.lblLand)
Me.Controls.Add(Me.Label58)
Me.Controls.Add(Me.dgvAbwWStd)
Me.Controls.Add(Me.Label57)
@@ -3151,4 +3174,6 @@ Partial Class frmDiestAddMa
Friend WithEvents txtStdFeiertagTZ As TextBox
Friend WithEvents dgvAbwWStd As VERAG_PROG_ALLGEMEIN.MyDatagridview
Friend WithEvents Label58 As Label
Friend WithEvents lblLand As Label
Friend WithEvents cboLand As ComboBox
End Class

View File

@@ -20,7 +20,7 @@ Public Class frmDiestAddMa
End If
End Sub
Private Sub frmDiestAddMa_Load(sender As Object, e As EventArgs) Handles Me.Load
Dim dt As DataTable = ADMIN.AnzeigeTabelle(" SELECT * FROM [tblDienstplanEintraegeDetails] WHERE [dedet_niederlassung]='" & niederlassung & "' AND dedet_benutzerdefinierteSchicht=1 ")
Dim dt As DataTable = ADMIN.AnzeigeTabelle(" SELECT * FROM [tblDienstplanEintraegeDetails] WHERE [dedet_niederlassung]='" & niederlassung & "' AND dedet_benutzerdefinierteSchicht=1 AND dedet_splitschicht=0 ")
cboStammSchicht.Items.Clear()
cboStammSchicht.Items.Add(New VERAG_PROG_ALLGEMEIN.MyListItem("", ""))
For Each r As DataRow In dt.Rows
@@ -55,6 +55,10 @@ Public Class frmDiestAddMa
cboFunktion.Items.Add(New VERAG_PROG_ALLGEMEIN.MyListItem("Ferialpraktikant", "Ferialpraktikant"))
cboFunktion.SelectedIndex = 0
cboLand.Items.Clear()
cboLand.Items.Add(New VERAG_PROG_ALLGEMEIN.MyListItem("AT", "AT"))
cboLand.Items.Add(New VERAG_PROG_ALLGEMEIN.MyListItem("DE", "DE"))
@@ -107,6 +111,11 @@ Public Class frmDiestAddMa
' MsgBox(txtRotVonMo.Text)
MusterErr = False
If checkValues() Then
If cboLand.Text = "" Then
MsgBox("Bitte das Land eintragen")
cboLand.Focus()
Exit Sub
End If
If initMA() Then
Dim tz As List(Of cDienstTeilzeit) = initArbVerh()
If MusterErr Then MsgBox("Bei der Prüfung der Daten für die Muster-Vorlage ist ein Fehler aufgetreten! Bitte um Prüfung!") : Exit Sub
@@ -375,11 +384,13 @@ Public Class frmDiestAddMa
cboMyItemSelect(cboAbt, MA.dstma_abteilung)
cboMyItemSelect(cboFunktion, MA.dstma_funktion)
cboMyItemSelect(cboArbVerh, MA.dstma_arbvh)
cboMyItemSelect(cboLand, MA.dstma_land)
txtWoStd.Text = MA.dstma_wochenStunden
cboStammSchicht.Text = MA.dstma_stammSchicht
txtKuerzel.Text = MA.dstma_kuerzel
txtReihenfolge.Text = MA.dstma_reihenfolge
'cboLand.Text = MA.dstma_land
Button1.BackColor = ColorTranslator.FromHtml(MA.dstma_farbe)
If MA.dstma_TageProWoche >= 0 Then
@@ -628,6 +639,7 @@ Public Class frmDiestAddMa
MA.dstma_inaktiv = cbxInaktiv.Checked
MA.dstma_4wo = cbx4WoRhythmus.Checked
MA.dstma_TzFeiertageStd = Nothing
MA.dstma_land = CType(cboLand.SelectedItem, VERAG_PROG_ALLGEMEIN.MyListItem).Value
If IsNumeric(txtStdFeiertagTZ.Text) And txtStdFeiertagTZ.Visible Then MA.dstma_TzFeiertageStd = txtStdFeiertagTZ.Text
If IsNumeric(cboDaysPerWeek.Text) Then
@@ -643,6 +655,7 @@ Public Class frmDiestAddMa
End Function
Private Sub cboMA_SelectedIndexChanged(sender As Object, e As EventArgs) Handles cboMA.SelectedIndexChanged
' Dim oItem As VERAG_PROG_ALLGEMEIN.MyListItem = CType(cboMA.SelectedItem, VERAG_PROG_ALLGEMEIN.MyListItem)
End Sub
Function cboMyItemSelect(cbo As ComboBox, value As String) As Boolean

View File

@@ -66,6 +66,8 @@ Partial Class frmSchichtenZeiten
Me.cbxRotMo = New System.Windows.Forms.CheckBox()
Me.cbxBenutzerdefinierteSchicht = New System.Windows.Forms.CheckBox()
Me.pnl = New System.Windows.Forms.Panel()
Me.cbxSplitschicht = New System.Windows.Forms.CheckBox()
Me.cbxHauptsplitschicht = New System.Windows.Forms.CheckBox()
Me.txtZusatzAL = New System.Windows.Forms.TextBox()
Me.Label9 = New System.Windows.Forms.Label()
Me.CheckBox2 = New System.Windows.Forms.CheckBox()
@@ -536,6 +538,8 @@ Partial Class frmSchichtenZeiten
'
'pnl
'
Me.pnl.Controls.Add(Me.cbxSplitschicht)
Me.pnl.Controls.Add(Me.cbxHauptsplitschicht)
Me.pnl.Controls.Add(Me.txtZusatzAL)
Me.pnl.Controls.Add(Me.Label9)
Me.pnl.Controls.Add(Me.CheckBox2)
@@ -566,6 +570,26 @@ Partial Class frmSchichtenZeiten
Me.pnl.Size = New System.Drawing.Size(362, 165)
Me.pnl.TabIndex = 109
'
'cbxSplitschicht
'
Me.cbxSplitschicht.AutoSize = True
Me.cbxSplitschicht.Location = New System.Drawing.Point(210, 143)
Me.cbxSplitschicht.Name = "cbxSplitschicht"
Me.cbxSplitschicht.Size = New System.Drawing.Size(80, 17)
Me.cbxSplitschicht.TabIndex = 125
Me.cbxSplitschicht.Text = "Splitschicht"
Me.cbxSplitschicht.UseVisualStyleBackColor = True
'
'cbxHauptsplitschicht
'
Me.cbxHauptsplitschicht.AutoSize = True
Me.cbxHauptsplitschicht.Location = New System.Drawing.Point(210, 121)
Me.cbxHauptsplitschicht.Name = "cbxHauptsplitschicht"
Me.cbxHauptsplitschicht.Size = New System.Drawing.Size(107, 17)
Me.cbxHauptsplitschicht.TabIndex = 124
Me.cbxHauptsplitschicht.Text = "Hauptsplitschicht"
Me.cbxHauptsplitschicht.UseVisualStyleBackColor = True
'
'txtZusatzAL
'
Me.txtZusatzAL.Location = New System.Drawing.Point(102, 143)
@@ -1005,4 +1029,6 @@ Partial Class frmSchichtenZeiten
Friend WithEvents CheckBox3 As System.Windows.Forms.CheckBox
Friend WithEvents ColorDialog3 As System.Windows.Forms.ColorDialog
Friend WithEvents cbxAktiv As CheckBox
Friend WithEvents cbxSplitschicht As CheckBox
Friend WithEvents cbxHauptsplitschicht As CheckBox
End Class

View File

@@ -1,4 +1,7 @@
Public Class frmSchichtenZeiten
Imports System.Windows
Imports Hardcodet.Wpf.TaskbarNotification.Interop
Public Class frmSchichtenZeiten
Dim ADMIN As New cOptionenDAL
Dim DP As New cDienstplan
Public niederlassung As String = ""
@@ -109,9 +112,14 @@
CheckBox1.Checked = False
End If
txtExcelMonat.Text = SCHICHT.dedet_ExcelMonatBezeichnung
txtExcelMonat.Text = SCHICHT.dedet_ExcelMonatBezeichnung
cbxAktiv.Checked = SCHICHT.dedet_Aktiv
txtZusatzAL.Text = SCHICHT.dedet_bezLeiter
cbxSplitschicht.Checked = SCHICHT.dedet_Splitschicht
cbxHauptsplitschicht.Checked = SCHICHT.dedet_Hauptsplitschicht
cbxHauptsplitschicht.Checked = SCHICHT.dedet_Hauptsplitschicht
cbxSplitschicht.Checked = SCHICHT.dedet_Splitschicht
If SCHICHT.dedet_ExcelBgFarbe IsNot Nothing Then
btnExcelColor.BackColor = ColorTranslator.FromHtml(SCHICHT.dedet_ExcelBgFarbe)
@@ -167,8 +175,9 @@
bgExcelMonat = DBNull.Value
End If
DP.updateEintraegeDetails_Benuterdef(dgvSchihten.SelectedRows(0).Cells("dedet_id").Value, txtDPBezeichnung.Text, txtProzent.Text, txtExcelBezeichnung.Text, txtExcelBezeichnung2.Text, txtExcelBezeichnung3.Text, txtExcelZeilen.Text, cbxBenutzerdefinierteSchicht.Checked, cbxSchichtArbeitszeit.Checked,
IIf(IsNumeric(txtReihenfolge.Text), txtReihenfolge.Text, 50), cbxTagesSchichtWechsel.Checked, txtSchichtWechselZu.Text, txtHotKey.Text, bg, bgExcel, txtZusatzAL.Text, bgExcelMonat, txtExcelMonat.Text, cbxAktiv.Checked)
IIf(IsNumeric(txtReihenfolge.Text), txtReihenfolge.Text, 50), cbxTagesSchichtWechsel.Checked, txtSchichtWechselZu.Text, txtHotKey.Text, bg, bgExcel, txtZusatzAL.Text, bgExcelMonat, txtExcelMonat.Text, cbxAktiv.Checked, cbxSplitschicht.Checked, cbxHauptsplitschicht.Checked)
End If
' d.dedet_bezeichnungDP = dr.Item("dedet_bezeichnungDP")
@@ -191,11 +200,30 @@
End Sub
Private Sub btn_Click(sender As Object, e As EventArgs) Handles btn.Click
MsgBox("Funktion noch nicht verfügbar!")
Dim input = InputBox("Bitte geben Sie die Bezeichnung der neuen Schicht ein:", "Schicht anlegen")
If input <> "" Then
If checkNameIsValid(input) Then
DP.insertEintraegeDetails(input, niederlassung, True)
initSchichten()
Else
MsgBox("Für die Niederlassung" & niederlassung.ToString & " existiert bereits eine Schicht " & input)
End If
Else
MsgBox("Keine Bezeichnung angegeben!")
End If
End Sub
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
MsgBox("Funktion noch nicht verfügbar!")
If dgvSchihten.SelectedRows.Count > 0 Then
If vbYes = MsgBox("Möchten Sie die Schicht " & dgvSchihten.SelectedRows(0).Cells("dedet_info").Value & " wirklich löschen?", vbYesNo) Then
DP.delEintraegeDetails(dgvSchihten.SelectedRows(0).Cells("dedet_id").Value)
initSchichten()
End If
End If
End Sub
Private Sub CheckBox1_CheckedChanged(sender As Object, e As EventArgs) Handles CheckBox1.CheckedChanged
@@ -227,4 +255,38 @@
frbBGExcelMonat.BackColor = ColorDialog3.Color
End If
End Sub
Private Sub cbxHauptsplitschicht_CheckedChanged(sender As Object, e As EventArgs) Handles cbxHauptsplitschicht.CheckedChanged
If cbxHauptsplitschicht.Checked Then
cbxSplitschicht.Checked = False
End If
End Sub
Private Sub cbxSplitschicht_CheckedChanged(sender As Object, e As EventArgs) Handles cbxSplitschicht.CheckedChanged
If cbxSplitschicht.Checked Then
cbxHauptsplitschicht.Checked = False
End If
End Sub
Private Function checkNameIsValid(name As String) As Boolean
If dgvSchihten.Rows.Count = 0 Then Return True
For Each row As DataGridViewRow In dgvSchihten.Rows
If Not IsDBNull(row.Cells("dedet_info").Value) Then
If row.Cells("dedet_info").Value.ToLower = name.ToLower Then
Return False
End If
End If
Next
Return True
End Function
End Class

View File

@@ -382,7 +382,7 @@ Public Class usrCntlDienstplan
End Select
rpt.txtTag.ForeColor = Color.Black
If FT.isFeiertag(datumKW, cDienstSettings.getLand(niederlassung)) Or datumKW.ToString("dd.MM.") = "31.12." Or datumKW.ToString("dd.MM.") = "24.12." Or datumKW.DayOfWeek = 0 Then 'Feiertag oder 1/2 Tag
If FT.isFeiertag(datumKW, IIf(MA_DST.dstma_land <> "", MA_DST.dstma_land, cDienstSettings.getLand(niederlassung))) Or datumKW.ToString("dd.MM.") = "31.12." Or datumKW.ToString("dd.MM.") = "24.12." Or datumKW.DayOfWeek = 0 Then 'Feiertag oder 1/2 Tag
rpt.txtTag.ForeColor = Color.Red
rpt.Detail.BackColor = Color.FromArgb(220, 220, 220)
End If

View File

@@ -22,10 +22,10 @@ Namespace My.Resources
'''<summary>
''' Eine stark typisierte Ressourcenklasse zum Suchen von lokalisierten Zeichenfolgen usw.
'''</summary>
<Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0"), _
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
Global.Microsoft.VisualBasic.HideModuleNameAttribute()> _
<Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0"),
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(),
Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(),
Global.Microsoft.VisualBasic.HideModuleNameAttribute()>
Friend Module Resources
Private resourceMan As Global.System.Resources.ResourceManager
@@ -35,7 +35,7 @@ Namespace My.Resources
'''<summary>
''' Gibt die zwischengespeicherte ResourceManager-Instanz zurück, die von dieser Klasse verwendet wird.
'''</summary>
<Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
<Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)>
Friend ReadOnly Property ResourceManager() As Global.System.Resources.ResourceManager
Get
If Object.ReferenceEquals(resourceMan, Nothing) Then
@@ -50,13 +50,13 @@ Namespace My.Resources
''' Überschreibt die CurrentUICulture-Eigenschaft des aktuellen Threads für alle
''' Ressourcenzuordnungen, die diese stark typisierte Ressourcenklasse verwenden.
'''</summary>
<Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
<Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)>
Friend Property Culture() As Global.System.Globalization.CultureInfo
Get
Return resourceCulture
End Get
Set
resourceCulture = value
resourceCulture = Value
End Set
End Property
@@ -66,7 +66,7 @@ Namespace My.Resources
Friend ReadOnly Property admin() As System.Drawing.Bitmap
Get
Dim obj As Object = ResourceManager.GetObject("admin", resourceCulture)
Return CType(obj,System.Drawing.Bitmap)
Return CType(obj, System.Drawing.Bitmap)
End Get
End Property
@@ -76,7 +76,7 @@ Namespace My.Resources
Friend ReadOnly Property admin_logo() As System.Drawing.Bitmap
Get
Dim obj As Object = ResourceManager.GetObject("admin_logo", resourceCulture)
Return CType(obj,System.Drawing.Bitmap)
Return CType(obj, System.Drawing.Bitmap)
End Get
End Property
@@ -86,7 +86,7 @@ Namespace My.Resources
Friend ReadOnly Property admin_monitoring() As System.Drawing.Bitmap
Get
Dim obj As Object = ResourceManager.GetObject("admin_monitoring", resourceCulture)
Return CType(obj,System.Drawing.Bitmap)
Return CType(obj, System.Drawing.Bitmap)
End Get
End Property
@@ -96,7 +96,7 @@ Namespace My.Resources
Friend ReadOnly Property admin1() As System.Drawing.Bitmap
Get
Dim obj As Object = ResourceManager.GetObject("admin1", resourceCulture)
Return CType(obj,System.Drawing.Bitmap)
Return CType(obj, System.Drawing.Bitmap)
End Get
End Property
@@ -106,7 +106,7 @@ Namespace My.Resources
Friend ReadOnly Property admin2() As System.Drawing.Bitmap
Get
Dim obj As Object = ResourceManager.GetObject("admin2", resourceCulture)
Return CType(obj,System.Drawing.Bitmap)
Return CType(obj, System.Drawing.Bitmap)
End Get
End Property
@@ -125,7 +125,7 @@ Namespace My.Resources
Friend ReadOnly Property ATILLA_DURMAZ() As Byte()
Get
Dim obj As Object = ResourceManager.GetObject("ATILLA_DURMAZ", resourceCulture)
Return CType(obj,Byte())
Return CType(obj, Byte())
End Get
End Property
@@ -135,7 +135,7 @@ Namespace My.Resources
Friend ReadOnly Property Aviso() As System.Drawing.Bitmap
Get
Dim obj As Object = ResourceManager.GetObject("Aviso", resourceCulture)
Return CType(obj,System.Drawing.Bitmap)
Return CType(obj, System.Drawing.Bitmap)
End Get
End Property
@@ -145,7 +145,7 @@ Namespace My.Resources
Friend ReadOnly Property aviso_tv() As System.Drawing.Bitmap
Get
Dim obj As Object = ResourceManager.GetObject("aviso_tv", resourceCulture)
Return CType(obj,System.Drawing.Bitmap)
Return CType(obj, System.Drawing.Bitmap)
End Get
End Property
@@ -164,7 +164,7 @@ Namespace My.Resources
Friend ReadOnly Property Buergschaften_Jahresauswertung() As Byte()
Get
Dim obj As Object = ResourceManager.GetObject("Buergschaften_Jahresauswertung", resourceCulture)
Return CType(obj,Byte())
Return CType(obj, Byte())
End Get
End Property
@@ -174,7 +174,7 @@ Namespace My.Resources
Friend ReadOnly Property Buergschaften_JahresauswertungSplit() As Byte()
Get
Dim obj As Object = ResourceManager.GetObject("Buergschaften_JahresauswertungSplit", resourceCulture)
Return CType(obj,Byte())
Return CType(obj, Byte())
End Get
End Property
@@ -184,7 +184,7 @@ Namespace My.Resources
Friend ReadOnly Property Bürgschaften_Vorlage() As Byte()
Get
Dim obj As Object = ResourceManager.GetObject("Bürgschaften_Vorlage", resourceCulture)
Return CType(obj,Byte())
Return CType(obj, Byte())
End Get
End Property
@@ -194,7 +194,7 @@ Namespace My.Resources
Friend ReadOnly Property chain() As System.Drawing.Bitmap
Get
Dim obj As Object = ResourceManager.GetObject("chain", resourceCulture)
Return CType(obj,System.Drawing.Bitmap)
Return CType(obj, System.Drawing.Bitmap)
End Get
End Property
@@ -204,7 +204,7 @@ Namespace My.Resources
Friend ReadOnly Property CMR() As System.Drawing.Bitmap
Get
Dim obj As Object = ResourceManager.GetObject("CMR", resourceCulture)
Return CType(obj,System.Drawing.Bitmap)
Return CType(obj, System.Drawing.Bitmap)
End Get
End Property
@@ -214,7 +214,7 @@ Namespace My.Resources
Friend ReadOnly Property cmr_logo_klein() As System.Drawing.Bitmap
Get
Dim obj As Object = ResourceManager.GetObject("cmr_logo_klein", resourceCulture)
Return CType(obj,System.Drawing.Bitmap)
Return CType(obj, System.Drawing.Bitmap)
End Get
End Property
@@ -260,7 +260,7 @@ Namespace My.Resources
Friend ReadOnly Property del() As System.Drawing.Bitmap
Get
Dim obj As Object = ResourceManager.GetObject("del", resourceCulture)
Return CType(obj,System.Drawing.Bitmap)
Return CType(obj, System.Drawing.Bitmap)
End Get
End Property
@@ -270,7 +270,7 @@ Namespace My.Resources
Friend ReadOnly Property Dienstplan() As Byte()
Get
Dim obj As Object = ResourceManager.GetObject("Dienstplan", resourceCulture)
Return CType(obj,Byte())
Return CType(obj, Byte())
End Get
End Property
@@ -280,7 +280,7 @@ Namespace My.Resources
Friend ReadOnly Property dispo() As System.Drawing.Bitmap
Get
Dim obj As Object = ResourceManager.GetObject("dispo", resourceCulture)
Return CType(obj,System.Drawing.Bitmap)
Return CType(obj, System.Drawing.Bitmap)
End Get
End Property
@@ -290,7 +290,7 @@ Namespace My.Resources
Friend ReadOnly Property dispo_ico() As System.Drawing.Bitmap
Get
Dim obj As Object = ResourceManager.GetObject("dispo_ico", resourceCulture)
Return CType(obj,System.Drawing.Bitmap)
Return CType(obj, System.Drawing.Bitmap)
End Get
End Property
@@ -300,7 +300,7 @@ Namespace My.Resources
Friend ReadOnly Property doku_sym() As System.Drawing.Bitmap
Get
Dim obj As Object = ResourceManager.GetObject("doku_sym", resourceCulture)
Return CType(obj,System.Drawing.Bitmap)
Return CType(obj, System.Drawing.Bitmap)
End Get
End Property
@@ -310,7 +310,7 @@ Namespace My.Resources
Friend ReadOnly Property dp_tv() As System.Drawing.Bitmap
Get
Dim obj As Object = ResourceManager.GetObject("dp_tv", resourceCulture)
Return CType(obj,System.Drawing.Bitmap)
Return CType(obj, System.Drawing.Bitmap)
End Get
End Property
@@ -320,7 +320,7 @@ Namespace My.Resources
Friend ReadOnly Property DSC_0121() As System.Drawing.Bitmap
Get
Dim obj As Object = ResourceManager.GetObject("DSC_0121", resourceCulture)
Return CType(obj,System.Drawing.Bitmap)
Return CType(obj, System.Drawing.Bitmap)
End Get
End Property
@@ -330,7 +330,7 @@ Namespace My.Resources
Friend ReadOnly Property Excel_2013_logo_155x110() As System.Drawing.Bitmap
Get
Dim obj As Object = ResourceManager.GetObject("Excel_2013_logo-155x110", resourceCulture)
Return CType(obj,System.Drawing.Bitmap)
Return CType(obj, System.Drawing.Bitmap)
End Get
End Property
@@ -340,7 +340,7 @@ Namespace My.Resources
Friend ReadOnly Property fd() As System.Drawing.Bitmap
Get
Dim obj As Object = ResourceManager.GetObject("fd", resourceCulture)
Return CType(obj,System.Drawing.Bitmap)
Return CType(obj, System.Drawing.Bitmap)
End Get
End Property
@@ -350,7 +350,7 @@ Namespace My.Resources
Friend ReadOnly Property fd1() As System.Drawing.Bitmap
Get
Dim obj As Object = ResourceManager.GetObject("fd1", resourceCulture)
Return CType(obj,System.Drawing.Bitmap)
Return CType(obj, System.Drawing.Bitmap)
End Get
End Property
@@ -360,7 +360,7 @@ Namespace My.Resources
Friend ReadOnly Property gear() As System.Drawing.Bitmap
Get
Dim obj As Object = ResourceManager.GetObject("gear", resourceCulture)
Return CType(obj,System.Drawing.Bitmap)
Return CType(obj, System.Drawing.Bitmap)
End Get
End Property
@@ -370,7 +370,7 @@ Namespace My.Resources
Friend ReadOnly Property gear1() As System.Drawing.Bitmap
Get
Dim obj As Object = ResourceManager.GetObject("gear1", resourceCulture)
Return CType(obj,System.Drawing.Bitmap)
Return CType(obj, System.Drawing.Bitmap)
End Get
End Property
@@ -380,7 +380,7 @@ Namespace My.Resources
Friend ReadOnly Property gear2() As System.Drawing.Bitmap
Get
Dim obj As Object = ResourceManager.GetObject("gear2", resourceCulture)
Return CType(obj,System.Drawing.Bitmap)
Return CType(obj, System.Drawing.Bitmap)
End Get
End Property
@@ -390,7 +390,7 @@ Namespace My.Resources
Friend ReadOnly Property kalender() As System.Drawing.Bitmap
Get
Dim obj As Object = ResourceManager.GetObject("kalender", resourceCulture)
Return CType(obj,System.Drawing.Bitmap)
Return CType(obj, System.Drawing.Bitmap)
End Get
End Property
@@ -400,7 +400,7 @@ Namespace My.Resources
Friend ReadOnly Property krank() As System.Drawing.Bitmap
Get
Dim obj As Object = ResourceManager.GetObject("krank", resourceCulture)
Return CType(obj,System.Drawing.Bitmap)
Return CType(obj, System.Drawing.Bitmap)
End Get
End Property
@@ -410,7 +410,7 @@ Namespace My.Resources
Friend ReadOnly Property parkzeit() As System.Drawing.Bitmap
Get
Dim obj As Object = ResourceManager.GetObject("parkzeit", resourceCulture)
Return CType(obj,System.Drawing.Bitmap)
Return CType(obj, System.Drawing.Bitmap)
End Get
End Property
@@ -420,7 +420,7 @@ Namespace My.Resources
Friend ReadOnly Property personGray_m() As System.Drawing.Bitmap
Get
Dim obj As Object = ResourceManager.GetObject("personGray_m", resourceCulture)
Return CType(obj,System.Drawing.Bitmap)
Return CType(obj, System.Drawing.Bitmap)
End Get
End Property
@@ -430,7 +430,7 @@ Namespace My.Resources
Friend ReadOnly Property personGray_w() As System.Drawing.Bitmap
Get
Dim obj As Object = ResourceManager.GetObject("personGray_w", resourceCulture)
Return CType(obj,System.Drawing.Bitmap)
Return CType(obj, System.Drawing.Bitmap)
End Get
End Property
@@ -440,7 +440,7 @@ Namespace My.Resources
Friend ReadOnly Property plus() As System.Drawing.Bitmap
Get
Dim obj As Object = ResourceManager.GetObject("plus", resourceCulture)
Return CType(obj,System.Drawing.Bitmap)
Return CType(obj, System.Drawing.Bitmap)
End Get
End Property
@@ -450,7 +450,7 @@ Namespace My.Resources
Friend ReadOnly Property printer() As System.Drawing.Bitmap
Get
Dim obj As Object = ResourceManager.GetObject("printer", resourceCulture)
Return CType(obj,System.Drawing.Bitmap)
Return CType(obj, System.Drawing.Bitmap)
End Get
End Property
@@ -460,7 +460,7 @@ Namespace My.Resources
Friend ReadOnly Property refresh() As System.Drawing.Bitmap
Get
Dim obj As Object = ResourceManager.GetObject("refresh", resourceCulture)
Return CType(obj,System.Drawing.Bitmap)
Return CType(obj, System.Drawing.Bitmap)
End Get
End Property
@@ -470,7 +470,7 @@ Namespace My.Resources
Friend ReadOnly Property refresh1() As System.Drawing.Bitmap
Get
Dim obj As Object = ResourceManager.GetObject("refresh1", resourceCulture)
Return CType(obj,System.Drawing.Bitmap)
Return CType(obj, System.Drawing.Bitmap)
End Get
End Property
@@ -480,7 +480,7 @@ Namespace My.Resources
Friend ReadOnly Property reise() As System.Drawing.Bitmap
Get
Dim obj As Object = ResourceManager.GetObject("reise", resourceCulture)
Return CType(obj,System.Drawing.Bitmap)
Return CType(obj, System.Drawing.Bitmap)
End Get
End Property
@@ -490,7 +490,7 @@ Namespace My.Resources
Friend ReadOnly Property sanduhr() As System.Drawing.Bitmap
Get
Dim obj As Object = ResourceManager.GetObject("sanduhr", resourceCulture)
Return CType(obj,System.Drawing.Bitmap)
Return CType(obj, System.Drawing.Bitmap)
End Get
End Property
@@ -500,7 +500,7 @@ Namespace My.Resources
Friend ReadOnly Property save() As System.Drawing.Bitmap
Get
Dim obj As Object = ResourceManager.GetObject("save", resourceCulture)
Return CType(obj,System.Drawing.Bitmap)
Return CType(obj, System.Drawing.Bitmap)
End Get
End Property
@@ -510,7 +510,7 @@ Namespace My.Resources
Friend ReadOnly Property schule() As System.Drawing.Bitmap
Get
Dim obj As Object = ResourceManager.GetObject("schule", resourceCulture)
Return CType(obj,System.Drawing.Bitmap)
Return CType(obj, System.Drawing.Bitmap)
End Get
End Property
@@ -520,7 +520,7 @@ Namespace My.Resources
Friend ReadOnly Property sdl_ico() As System.Drawing.Bitmap
Get
Dim obj As Object = ResourceManager.GetObject("sdl_ico", resourceCulture)
Return CType(obj,System.Drawing.Bitmap)
Return CType(obj, System.Drawing.Bitmap)
End Get
End Property
@@ -530,7 +530,7 @@ Namespace My.Resources
Friend ReadOnly Property search() As System.Drawing.Bitmap
Get
Dim obj As Object = ResourceManager.GetObject("search", resourceCulture)
Return CType(obj,System.Drawing.Bitmap)
Return CType(obj, System.Drawing.Bitmap)
End Get
End Property
@@ -540,7 +540,7 @@ Namespace My.Resources
Friend ReadOnly Property spedbuch() As System.Drawing.Bitmap
Get
Dim obj As Object = ResourceManager.GetObject("spedbuch", resourceCulture)
Return CType(obj,System.Drawing.Bitmap)
Return CType(obj, System.Drawing.Bitmap)
End Get
End Property
@@ -550,7 +550,7 @@ Namespace My.Resources
Friend ReadOnly Property stift() As System.Drawing.Bitmap
Get
Dim obj As Object = ResourceManager.GetObject("stift", resourceCulture)
Return CType(obj,System.Drawing.Bitmap)
Return CType(obj, System.Drawing.Bitmap)
End Get
End Property
@@ -560,7 +560,7 @@ Namespace My.Resources
Friend ReadOnly Property uhr_green() As System.Drawing.Bitmap
Get
Dim obj As Object = ResourceManager.GetObject("uhr_green", resourceCulture)
Return CType(obj,System.Drawing.Bitmap)
Return CType(obj, System.Drawing.Bitmap)
End Get
End Property
@@ -570,7 +570,7 @@ Namespace My.Resources
Friend ReadOnly Property uhr_notime() As System.Drawing.Bitmap
Get
Dim obj As Object = ResourceManager.GetObject("uhr_notime", resourceCulture)
Return CType(obj,System.Drawing.Bitmap)
Return CType(obj, System.Drawing.Bitmap)
End Get
End Property
@@ -580,7 +580,7 @@ Namespace My.Resources
Friend ReadOnly Property uhr_red() As System.Drawing.Bitmap
Get
Dim obj As Object = ResourceManager.GetObject("uhr_red", resourceCulture)
Return CType(obj,System.Drawing.Bitmap)
Return CType(obj, System.Drawing.Bitmap)
End Get
End Property
@@ -590,7 +590,7 @@ Namespace My.Resources
Friend ReadOnly Property uid() As System.Drawing.Bitmap
Get
Dim obj As Object = ResourceManager.GetObject("uid", resourceCulture)
Return CType(obj,System.Drawing.Bitmap)
Return CType(obj, System.Drawing.Bitmap)
End Get
End Property
@@ -600,7 +600,7 @@ Namespace My.Resources
Friend ReadOnly Property uid_ico() As System.Drawing.Bitmap
Get
Dim obj As Object = ResourceManager.GetObject("uid_ico", resourceCulture)
Return CType(obj,System.Drawing.Bitmap)
Return CType(obj, System.Drawing.Bitmap)
End Get
End Property
@@ -619,7 +619,7 @@ Namespace My.Resources
Friend ReadOnly Property urlaub() As System.Drawing.Bitmap
Get
Dim obj As Object = ResourceManager.GetObject("urlaub", resourceCulture)
Return CType(obj,System.Drawing.Bitmap)
Return CType(obj, System.Drawing.Bitmap)
End Get
End Property
@@ -629,7 +629,7 @@ Namespace My.Resources
Friend ReadOnly Property urlaub1() As System.Drawing.Bitmap
Get
Dim obj As Object = ResourceManager.GetObject("urlaub1", resourceCulture)
Return CType(obj,System.Drawing.Bitmap)
Return CType(obj, System.Drawing.Bitmap)
End Get
End Property
@@ -639,7 +639,7 @@ Namespace My.Resources
Friend ReadOnly Property Verag_Academy_blue() As System.Drawing.Bitmap
Get
Dim obj As Object = ResourceManager.GetObject("Verag_Academy_blue", resourceCulture)
Return CType(obj,System.Drawing.Bitmap)
Return CType(obj, System.Drawing.Bitmap)
End Get
End Property
@@ -649,7 +649,7 @@ Namespace My.Resources
Friend ReadOnly Property Verag_AG_Logo() As System.Drawing.Bitmap
Get
Dim obj As Object = ResourceManager.GetObject("Verag_AG_Logo", resourceCulture)
Return CType(obj,System.Drawing.Bitmap)
Return CType(obj, System.Drawing.Bitmap)
End Get
End Property
@@ -659,7 +659,7 @@ Namespace My.Resources
Friend ReadOnly Property Verag_AG_Logopng() As System.Drawing.Bitmap
Get
Dim obj As Object = ResourceManager.GetObject("Verag_AG_Logopng", resourceCulture)
Return CType(obj,System.Drawing.Bitmap)
Return CType(obj, System.Drawing.Bitmap)
End Get
End Property
@@ -669,7 +669,7 @@ Namespace My.Resources
Friend ReadOnly Property wait() As System.Drawing.Bitmap
Get
Dim obj As Object = ResourceManager.GetObject("wait", resourceCulture)
Return CType(obj,System.Drawing.Bitmap)
Return CType(obj, System.Drawing.Bitmap)
End Get
End Property
End Module

View File

@@ -85,6 +85,7 @@ End Class
Public Class cDienstMA
Property dstma_id As Integer
Property dstma_mitId As Integer
Property dstma_land As String = ""
Property dstma_abteilung As String = ""
Property dstma_funktion As String = ""
Property dstma_arbvh As String = ""
@@ -96,7 +97,6 @@ Public Class cDienstMA
Property dstma_muster As Boolean = False
Property dstma_WEStdRegelAZ As Boolean = False
Property dstma_4wo As Boolean = False
Property dstma_TageProWoche As Integer = -1
Property dstma_inaktiv As Boolean = False
Property dstma_TzFeiertageStd As Object = Nothing
@@ -130,6 +130,10 @@ Public Class cDienstEintrag
Property dstetr_pause As Double = 0
Property dstetr_grund As String = ""
Property dstetr_info As String = ""
Property dstetr_splitschicht As Boolean = False
Property dstetr_hauptsplitschicht As Boolean = False
End Class
@@ -171,6 +175,7 @@ Public Class cDienstDGV
Property dgvAbteilung As String = ""
Property dgvVon As String = ""
Property dgvBis As String = ""
Property dgvIsHauptsplitschicht As Boolean = False
Property USRCNTL As usrCntlDienstWoche = Nothing
Public Sub New(ByVal dgvName As String, ByVal dgvDatum As Date, ByVal dgvAbteilung As String, ByVal dgvVon As String, ByVal dgvBis As String, Optional USRCNTL As Object = Nothing)
@@ -182,13 +187,14 @@ Public Class cDienstDGV
Me.USRCNTL = USRCNTL
End Sub
Public Sub New(ByVal dgvName As String, ByVal dgvDatum As Date, ByVal dgvAbteilung As String, Optional USRCNTL As Object = Nothing)
Public Sub New(ByVal dgvName As String, ByVal dgvDatum As Date, ByVal dgvAbteilung As String, Optional USRCNTL As Object = Nothing, Optional dgvIsHauptsplitschicht As Boolean = False)
Me.dgvName = dgvName
Me.dgvDatum = dgvDatum
Me.dgvAbteilung = dgvAbteilung
Me.dgvVon = "00:00"
Me.dgvBis = "00:00"
Me.USRCNTL = USRCNTL
Me.dgvIsHauptsplitschicht = dgvIsHauptsplitschicht
End Sub

View File

@@ -915,11 +915,14 @@ Public Class cProgramFunctions
Dim UrlStd As Double = 8
If StdFeiertag IsNot Nothing Then UrlStd = StdFeiertag
Dim dMa As cDienstMA = SQLDienst.getDstMAByDstMaId(dstma_id)
For i = 0 To 6
' Wochenstunden -= getWochenstundenTAG(datum, SCHICHT, dstma_id, dstma_muster, dstma_WEStdRegelAZ, dstma_arbvh, niederlassung)
Dim FT As New VERAG_PROG_ALLGEMEIN.cFeiertage(datum.Year)
If FT.isFeiertag(datum, cDienstSettings.getLand(niederlassung)) Or datum.ToString("dd.MM.") = "31.12." Or datum.ToString("dd.MM.") = "24.12." Then 'Feiertag oder 1/2 Tag
If FT.isFeiertag(datum, IIf(dMa.dstma_land <> "", dMa.dstma_land, cDienstSettings.getLand(niederlassung))) Or datum.ToString("dd.MM.") = "31.12." Or datum.ToString("dd.MM.") = "24.12." Then 'Feiertag oder 1/2 Tag
Dim woTag = datum.ToString("ddd", New CultureInfo("de-DE")).ToUpper
If dstma_muster Then 'Wenn Muster, dann muss Feiertag bei VZ und TZ berüchsichtigt werden....
@@ -976,7 +979,8 @@ Public Class cProgramFunctions
Dim FT As New VERAG_PROG_ALLGEMEIN.cFeiertage(datum.Year)
Dim woTag = datum.ToString("ddd", New CultureInfo("de-DE")).ToUpper
If FT.isFeiertag(datum, cDienstSettings.getLand(niederlassung)) Then 'Feiertag oder 1/2 Tag
Dim dMa As cDienstMA = SQLDienst.getDstMAByDstMaId(dstma_id)
If FT.isFeiertag(datum, IIf(dMa.dstma_land <> "", dMa.dstma_land, cDienstSettings.getLand(niederlassung))) Then 'Feiertag oder 1/2 Tag
getWochenstundenTAG = 0
ElseIf woTag = "SA" And woTag = "SO" Then
getWochenstundenTAG = 0

View File

@@ -1967,14 +1967,14 @@ Public Class cDienstplan
" if exists (select * from tblDienstMitarb with (updlock,serializable) where dstma_id = @dstma_id ) " &
" begin " &
" UPDATE tblDienstMitarb " &
" SET dstma_abteilung=@dstma_abteilung, dstma_funktion=@dstma_funktion, dstma_arbvh=@dstma_arbvh, dstma_wochenStunden=@dstma_wochenStunden, dstma_stammSchicht=@dstma_stammSchicht, dstma_kuerzel=@dstma_kuerzel, dstma_reihenfolge=@dstma_reihenfolge, dstma_farbe=@dstma_farbe, dstma_TageProWoche=@dstma_TageProWoche,dstma_niederlassung=@dstma_niederlassung,dstma_muster=@dstma_muster,dstma_4wo=@dstma_4wo,dstma_WEStdRegelAZ=@dstma_WEStdRegelAZ,dstma_inaktiv=@dstma_inaktiv,dstma_TzFeiertageStd=@dstma_TzFeiertageStd " &
" SET dstma_abteilung=@dstma_abteilung, dstma_funktion=@dstma_funktion, dstma_arbvh=@dstma_arbvh, dstma_wochenStunden=@dstma_wochenStunden, dstma_stammSchicht=@dstma_stammSchicht, dstma_kuerzel=@dstma_kuerzel, dstma_reihenfolge=@dstma_reihenfolge, dstma_farbe=@dstma_farbe, dstma_TageProWoche=@dstma_TageProWoche,dstma_niederlassung=@dstma_niederlassung,dstma_muster=@dstma_muster,dstma_4wo=@dstma_4wo,dstma_WEStdRegelAZ=@dstma_WEStdRegelAZ,dstma_inaktiv=@dstma_inaktiv,dstma_TzFeiertageStd=@dstma_TzFeiertageStd, dstma_land=@dstma_land " &
" WHERE dstma_id=@dstma_id " &
" End " &
" Else " &
" begin " &
"INSERT INTO tblDienstMitarb " &
"( dstma_mitId, dstma_abteilung, dstma_funktion, dstma_arbvh, dstma_wochenStunden, dstma_stammSchicht,dstma_kuerzel,dstma_reihenfolge,dstma_farbe,dstma_TageProWoche,dstma_niederlassung, dstma_muster,dstma_4wo,dstma_WEStdRegelAZ,dstma_inaktiv ,dstma_TzFeiertageStd) VALUES " &
"( @dstma_mitId, @dstma_abteilung, @dstma_funktion, @dstma_arbvh, @dstma_wochenStunden, @dstma_stammSchicht,@dstma_kuerzel,@dstma_reihenfolge,@dstma_farbe,@dstma_TageProWoche,@dstma_niederlassung, @dstma_muster ,@dstma_4wo,@dstma_WEStdRegelAZ,@dstma_inaktiv,@dstma_TzFeiertageStd) " &
"( dstma_mitId, dstma_abteilung, dstma_funktion, dstma_arbvh, dstma_wochenStunden, dstma_stammSchicht,dstma_kuerzel,dstma_reihenfolge,dstma_farbe,dstma_TageProWoche,dstma_niederlassung, dstma_muster,dstma_4wo,dstma_WEStdRegelAZ,dstma_inaktiv ,dstma_TzFeiertageStd, dstma_land) VALUES " &
"( @dstma_mitId, @dstma_abteilung, @dstma_funktion, @dstma_arbvh, @dstma_wochenStunden, @dstma_stammSchicht,@dstma_kuerzel,@dstma_reihenfolge,@dstma_farbe,@dstma_TageProWoche,@dstma_niederlassung, @dstma_muster ,@dstma_4wo,@dstma_WEStdRegelAZ,@dstma_inaktiv,@dstma_TzFeiertageStd, @dstma_land) " &
" End " &
" commit tran "
@@ -1998,6 +1998,7 @@ Public Class cDienstplan
cmd.Parameters.AddWithValue("@dstma_WEStdRegelAZ", ma.dstma_WEStdRegelAZ)
cmd.Parameters.AddWithValue("@dstma_inaktiv", ma.dstma_inaktiv)
cmd.Parameters.AddWithValue("@dstma_TzFeiertageStd", If(ma.dstma_TzFeiertageStd Is Nothing, DBNull.Value, ma.dstma_TzFeiertageStd))
cmd.Parameters.AddWithValue("@dstma_land", ma.dstma_land)
Try
cmd.ExecuteNonQuery()
@@ -2572,6 +2573,9 @@ Public Class cDienstplan
Return False
End Function
Public Function delDienstplanUeberSdtMa(ByVal kw As Integer, ByVal jahr As Integer, niederlassung As String) As Boolean
Dim sql = "DELETE FROM [tblDienstplanUeberSdtMa] WHERE [usma_idKW]=@kw AND [usma_idJahr]=@jahr AND usma_niederlassung=@niederlassung"
@@ -3003,13 +3007,39 @@ Public Class cDienstplan
Return False
End Function
Public Function insertEintraegeDetails(dedet_info, dedet_niederlassung, dedet_aktiv) As Boolean
Public Function updateEintraegeDetails_Benuterdef(dedet_id, dedet_bezeichnungDP, dedet_ProzentGrafik, dedet_bezeichnungExcel, dedet_bezeichnungExcel2, dedet_bezeichnungExcel3, dedet_ZeilenExcel, dedet_benutzerdefinierteSchicht, dedet_stdWieArbeitszeit, dedet_reihenfolge, dedet_TagesWechsel, dedet_WechselZuSchicht, dedet_HotKey, dedet_bgAlternativeFarbe, dedet_ExcelBgFarbe, dedet_bezLeiter, dedet_ExcelMonatFarbe, dedet_ExcelMonatBezeichnung, dedet_aktiv) As Boolean
Dim sql As String = "INSERT INTO [tblDienstplanEintraegeDetails] " &
"(dedet_info, dedet_niederlassung, dedet_aktiv ) VALUES " &
"(@dedet_info, @dedet_niederlassung, @dedet_aktiv) "
Using conn As SqlConnection = cSqlDb.GetNewOpenConnection()
Using cmd As New SqlCommand(sql, conn)
cmd.Parameters.AddWithValue("@dedet_info", dedet_info)
cmd.Parameters.AddWithValue("@dedet_niederlassung", dedet_niederlassung)
cmd.Parameters.AddWithValue("@dedet_aktiv", dedet_aktiv)
Try
cmd.ExecuteNonQuery()
Return True
Catch ex As SqlException
MsgBox(System.Reflection.MethodInfo.GetCurrentMethod.Name & ": Datensatz kann nicht gespeichert werden!" & vbCrLf & vbCrLf & ex.Message, vbExclamation, "Fehler beim Speichern Data")
End Try
End Using
End Using
Return False
End Function
Public Function updateEintraegeDetails_Benuterdef(dedet_id, dedet_bezeichnungDP, dedet_ProzentGrafik, dedet_bezeichnungExcel, dedet_bezeichnungExcel2, dedet_bezeichnungExcel3, dedet_ZeilenExcel, dedet_benutzerdefinierteSchicht, dedet_stdWieArbeitszeit, dedet_reihenfolge, dedet_TagesWechsel, dedet_WechselZuSchicht, dedet_HotKey, dedet_bgAlternativeFarbe, dedet_ExcelBgFarbe, dedet_bezLeiter, dedet_ExcelMonatFarbe, dedet_ExcelMonatBezeichnung, dedet_aktiv, dedet_splitschicht, dedet_hauptsplitschicht) As Boolean
Dim hAuswahl As String = ""
Dim sql As String = "UPDATE tblDienstplanEintraegeDetails " &
"SET dedet_bezeichnungDP=@dedet_bezeichnungDP,dedet_ProzentGrafik=@dedet_ProzentGrafik,dedet_bezeichnungExcel=@dedet_bezeichnungExcel,dedet_bezeichnungExcel2=@dedet_bezeichnungExcel2,dedet_bezeichnungExcel3=@dedet_bezeichnungExcel3,dedet_ZeilenExcel=@dedet_ZeilenExcel,dedet_benutzerdefinierteSchicht=@dedet_benutzerdefinierteSchicht,dedet_stdWieArbeitszeit=@dedet_stdWieArbeitszeit, " &
" dedet_reihenfolge=@dedet_reihenfolge,dedet_TagesWechsel=@dedet_TagesWechsel,dedet_WechselZuSchicht=@dedet_WechselZuSchicht,dedet_HotKey=@dedet_HotKey ,dedet_bgAlternativeFarbe=@dedet_bgAlternativeFarbe, dedet_ExcelBgFarbe=@dedet_ExcelBgFarbe,dedet_bezLeiter=@dedet_bezLeiter,dedet_ExcelMonatFarbe=@dedet_ExcelMonatFarbe,dedet_ExcelMonatBezeichnung=@dedet_ExcelMonatBezeichnung,dedet_aktiv=@dedet_aktiv " &
" dedet_reihenfolge=@dedet_reihenfolge,dedet_TagesWechsel=@dedet_TagesWechsel,dedet_WechselZuSchicht=@dedet_WechselZuSchicht,dedet_HotKey=@dedet_HotKey ,dedet_bgAlternativeFarbe=@dedet_bgAlternativeFarbe, dedet_ExcelBgFarbe=@dedet_ExcelBgFarbe,dedet_bezLeiter=@dedet_bezLeiter,dedet_ExcelMonatFarbe=@dedet_ExcelMonatFarbe,dedet_ExcelMonatBezeichnung=@dedet_ExcelMonatBezeichnung,dedet_aktiv=@dedet_aktiv, dedet_splitschicht=@dedet_splitschicht, dedet_hauptsplitschicht=@dedet_hauptsplitschicht " &
" WHERE dedet_id=@dedet_id "
@@ -3027,7 +3057,6 @@ Public Class cDienstplan
cmd.Parameters.AddWithValue("@dedet_ZeilenExcel", dedet_ZeilenExcel)
cmd.Parameters.AddWithValue("@dedet_benutzerdefinierteSchicht", dedet_benutzerdefinierteSchicht)
cmd.Parameters.AddWithValue("@dedet_stdWieArbeitszeit", dedet_stdWieArbeitszeit)
cmd.Parameters.AddWithValue("@dedet_reihenfolge", dedet_reihenfolge)
cmd.Parameters.AddWithValue("@dedet_TagesWechsel", dedet_TagesWechsel)
cmd.Parameters.AddWithValue("@dedet_WechselZuSchicht", dedet_WechselZuSchicht)
@@ -3038,6 +3067,8 @@ Public Class cDienstplan
cmd.Parameters.AddWithValue("@dedet_ExcelMonatFarbe", dedet_ExcelMonatFarbe)
cmd.Parameters.AddWithValue("@dedet_ExcelMonatBezeichnung", dedet_ExcelMonatBezeichnung)
cmd.Parameters.AddWithValue("@dedet_aktiv", dedet_aktiv)
cmd.Parameters.AddWithValue("@dedet_splitschicht", dedet_splitschicht)
cmd.Parameters.AddWithValue("@dedet_hauptsplitschicht", dedet_hauptsplitschicht)
Try
cmd.ExecuteNonQuery()
@@ -3050,6 +3081,24 @@ Public Class cDienstplan
Return False
End Function
Public Function delEintraegeDetails(ByVal dedet_id As Integer) As Boolean
Dim sql = "DELETE FROM tblDienstplanEintraegeDetails WHERE dedet_id=@dedet_id"
Using conn As SqlConnection = cSqlDb.GetNewOpenConnection()
Using cmd As New SqlCommand(sql, conn)
cmd.Parameters.AddWithValue("@dedet_id", dedet_id)
Try
cmd.ExecuteNonQuery()
Return True
Catch ex As SqlException
MsgBox(System.Reflection.MethodInfo.GetCurrentMethod.Name & ": Datensatz kann nicht gelöscht werden!" & vbCrLf & vbCrLf & ex.Message, vbExclamation, "Fehler beim Löschen")
End Try
End Using
End Using
Return False
End Function
Public Function delDienstNichtAnwesendKW_ByMaID(ByVal id As Integer) As Boolean
Dim hAuswahl As String = ""
'tblDienstNichtAnwesend
@@ -3135,6 +3184,7 @@ Public Class cDienstplan
d.dstma_muster = dr.Item("dstma_muster")
d.dstma_4wo = dr.Item("dstma_4wo")
d.dstma_WEStdRegelAZ = dr.Item("dstma_WEStdRegelAZ")
d.dstma_land = dr.Item("dstma_land")
If Not dr.Item("dstma_TageProWoche") Is DBNull.Value Then d.dstma_TageProWoche = dr.Item("dstma_TageProWoche")
@@ -3170,7 +3220,7 @@ Public Class cDienstplan
Dim data As New List(Of cDienstDetails)
Using conn As SqlConnection = cSqlDb.GetNewOpenConnection()
Using cmd As New SqlCommand("SELECT * FROM tblDienstplanEintraegeDetails as det INNER JOIN [tblDienstplanSchichtenZeiten] as sz ON det.dedet_id=sz.dsz_dedetId WHERE dedet_niederlassung=@dedet_niederlassung ", conn)
Using cmd As New SqlCommand("SELECT * FROM tblDienstplanEintraegeDetails as det INNER JOIN [tblDienstplanSchichtenZeiten] as sz ON det.dedet_id=sz.dsz_dedetId WHERE dedet_niederlassung=@dedet_niederlassung AND dedet_splitschicht=0 ", conn)
cmd.Parameters.AddWithValue("@dedet_niederlassung", niederlassung)
Dim dr = cmd.ExecuteReader()
While dr.Read
@@ -3416,7 +3466,7 @@ Public Class cDienstplan
Try
Dim d As New cDienstMA
Using conn As SqlConnection = cSqlDb.GetNewOpenConnection()
Using cmd As New SqlCommand(" SELECT dstma_id,dstma_mitId,dstma_kuerzel, dstma_abteilung,dstma_funktion,dstma_arbvh,dstma_wochenStunden,dstma_stammSchicht,dstma_reihenfolge,dstma_farbe,dstma_TageProWoche,dstma_muster,dstma_4wo,dstma_WEStdRegelAZ,dstma_inaktiv,dstma_TzFeiertageStd FROM tblDienstMitarb INNER JOIN tblMitarbeiter ON mit_id=dstma_mitId WHERE dstma_id=" & maId & " ", conn)
Using cmd As New SqlCommand(" SELECT dstma_id,dstma_mitId,dstma_kuerzel, dstma_abteilung,dstma_funktion,dstma_arbvh,dstma_wochenStunden,dstma_stammSchicht,dstma_reihenfolge,dstma_farbe,dstma_TageProWoche,dstma_muster,dstma_4wo,dstma_WEStdRegelAZ,dstma_inaktiv,dstma_TzFeiertageStd, dstma_land FROM tblDienstMitarb INNER JOIN tblMitarbeiter ON mit_id=dstma_mitId WHERE dstma_id=" & maId & " ", conn)
'cmd.Parameters.AddWithValue("@semi_id", id)
Dim dr = cmd.ExecuteReader()
While dr.Read
@@ -3432,6 +3482,7 @@ Public Class cDienstplan
d.dstma_muster = dr.Item("dstma_muster")
d.dstma_4wo = dr.Item("dstma_4wo")
d.dstma_WEStdRegelAZ = dr.Item("dstma_WEStdRegelAZ")
d.dstma_land = dr.Item("dstma_land")
If Not dr.Item("dstma_TageProWoche") Is DBNull.Value Then d.dstma_TageProWoche = dr.Item("dstma_TageProWoche")
@@ -3536,6 +3587,48 @@ Public Class cDienstplan
Return False
End Function
Public Function delOnlyDstEintraegeSplitschichtenMaId(datum, niederlassung, dstetr_dstmaId, Optional dstetr_id = -1) As Boolean
Dim sql = "DELETE FROM tblDienstplanEintraege " &
"WHERE dstetr_niederlassung= '" & niederlassung & "' AND dstetr_datum = @datum AND dstetr_dstmaId=@dstetr_dstmaId AND dstetr_splitschicht = 1"
Using conn As SqlConnection = cSqlDb.GetNewOpenConnection()
Using cmd As New SqlCommand(sql, conn)
cmd.Parameters.AddWithValue("@datum", datum)
cmd.Parameters.AddWithValue("@dstetr_dstmaId", dstetr_dstmaId)
cmd.Parameters.AddWithValue("@dstetr_id", dstetr_id)
Try
cmd.ExecuteNonQuery()
Return True
Catch ex As SqlException
MsgBox(System.Reflection.MethodInfo.GetCurrentMethod.Name & ": Datensatz kann nicht gelöscht werden!" & vbCrLf & vbCrLf & ex.Message, vbExclamation, "Fehler beim löschen")
End Try
End Using
End Using
Return False
End Function
Public Function delDstEintraegeSplitschichtenId(dstetr_id) As Boolean
Dim sql = "DELETE FROM tblDienstplanEintraege " &
"WHERE dstetr_id = @dstetr_id AND dstetr_splitschicht = 1"
Using conn As SqlConnection = cSqlDb.GetNewOpenConnection()
Using cmd As New SqlCommand(sql, conn)
cmd.Parameters.AddWithValue("@dstetr_id", dstetr_id)
Try
cmd.ExecuteNonQuery()
Return True
Catch ex As SqlException
MsgBox(System.Reflection.MethodInfo.GetCurrentMethod.Name & ": Datensatz kann nicht gelöscht werden!" & vbCrLf & vbCrLf & ex.Message, vbExclamation, "Fehler beim löschen")
End Try
End Using
End Using
Return False
End Function
Public Function getMaIDFromMitID(mit_id As Integer) As String
Dim SQL As New VERAG_PROG_ALLGEMEIN.SQL
@@ -3620,19 +3713,26 @@ Public Class cDienstplan
End Function
Public Function updateInsertByDienstEintrag(ByVal daten As cDienstEintrag, niederlassung As String) As Boolean
Public Function updateInsertByDienstEintrag(ByVal daten As cDienstEintrag, niederlassung As String, Optional dstetr_id As Integer = -1) As Boolean
Dim SQLclause As String = ""
If dstetr_id > 0 Then
SQLclause = " AND dstetr_id=@dstetr_id"
End If
Dim sql As String = " begin tran" &
" if exists (select * from tblDienstplanEintraege with (updlock,serializable) where dstetr_datum = @dstetr_datum AND dstetr_dstmaId=@dstetr_dstmaId AND dstetr_niederlassung=@dstetr_niederlassung) " &
" if exists (select * from tblDienstplanEintraege with (updlock,serializable) where dstetr_datum = @dstetr_datum AND dstetr_dstmaId=@dstetr_dstmaId AND dstetr_niederlassung=@dstetr_niederlassung AND dstetr_art=@dstetr_art" & SQLclause & ") " &
" begin " &
" UPDATE tblDienstplanEintraege " &
" SET dstetr_dstmaId=@dstetr_dstmaId, dstetr_art=@dstetr_art, dstetr_von=@dstetr_von, dstetr_bis=@dstetr_bis, dstetr_grund=@dstetr_grund, dstetr_info=@dstetr_info,dstetr_niederlassung=@dstetr_niederlassung,dstetr_pause=@dstetr_pause " &
" WHERE dstetr_datum = @dstetr_datum AND dstetr_dstmaId=@dstetr_dstmaId AND dstetr_niederlassung=@dstetr_niederlassung " &
" SET dstetr_dstmaId=@dstetr_dstmaId, dstetr_art=@dstetr_art, dstetr_von=@dstetr_von, dstetr_bis=@dstetr_bis, dstetr_grund=@dstetr_grund, dstetr_info=@dstetr_info,dstetr_niederlassung=@dstetr_niederlassung,dstetr_pause=@dstetr_pause,dstetr_hauptsplitschicht=@dstetr_hauptsplitschicht,dstetr_splitschicht=@dstetr_splitschicht " &
" WHERE dstetr_datum = @dstetr_datum AND dstetr_dstmaId=@dstetr_dstmaId AND dstetr_niederlassung=@dstetr_niederlassung AND dstetr_art=@dstetr_art" & SQLclause &
" End " &
" Else " &
" begin " &
"INSERT INTO tblDienstplanEintraege " &
"( dstetr_dstmaId, dstetr_datum, dstetr_art, dstetr_von, dstetr_bis, dstetr_grund, dstetr_info, dstetr_niederlassung,dstetr_pause) VALUES " &
"( @dstetr_dstmaId, @dstetr_datum, @dstetr_art, @dstetr_von, @dstetr_bis, @dstetr_grund, @dstetr_info,@dstetr_niederlassung,@dstetr_pause )" &
"( dstetr_dstmaId, dstetr_datum, dstetr_art, dstetr_von, dstetr_bis, dstetr_grund, dstetr_info, dstetr_niederlassung,dstetr_pause,dstetr_hauptsplitschicht,dstetr_splitschicht) VALUES " &
"( @dstetr_dstmaId, @dstetr_datum, @dstetr_art, @dstetr_von, @dstetr_bis, @dstetr_grund, @dstetr_info,@dstetr_niederlassung,@dstetr_pause,@dstetr_hauptsplitschicht,@dstetr_splitschicht )" &
" End " &
" commit tran "
@@ -3648,6 +3748,8 @@ Public Class cDienstplan
cmd.Parameters.AddWithValue("@dstetr_grund", daten.dstetr_grund)
cmd.Parameters.AddWithValue("@dstetr_info", daten.dstetr_info)
cmd.Parameters.AddWithValue("@dstetr_niederlassung", niederlassung)
cmd.Parameters.AddWithValue("@dstetr_hauptsplitschicht", daten.dstetr_hauptsplitschicht)
cmd.Parameters.AddWithValue("@dstetr_splitschicht", daten.dstetr_splitschicht)
'MsgBox(daten.dstetr_dstmaId)
Try
@@ -3661,8 +3763,6 @@ Public Class cDienstplan
Return False
End Function
Public Function getDienstEintragList(datum As Date, niederlassung As String) As List(Of cDienstEintrag)
Dim sql As String = " SELECT * FROM tblDienstplanEintraege WHERE dstetr_datum = @dstetr_datum AND dstetr_niederlassung=@dstetr_niederlassung "
Dim daten As List(Of cDienstEintrag) = Nothing
@@ -3748,6 +3848,7 @@ Public Class cDienstplan
End Function
Public Function updateDienstEintragArtChange(ByVal dstetr_id As Integer, ByVal dstetr_datum As String, ByVal abteilung As String, ByVal von As String, ByVal bis As String, pause As String) As Boolean
Dim sql As String = " UPDATE tblDienstplanEintraege " &
" SET dstetr_art=@abteilung, dstetr_von=@von, dstetr_bis=@bis , dstetr_pause=@dstetr_pause" &
@@ -3957,13 +4058,21 @@ Public Class cDienstplan
Return False
End Function
Public Function getDstStunden(maId As Integer, datum_von As Date, datum_bis As Date, niederlassung As String) As Double
Public Function getDstStunden(maId As Integer, datum_von As Date, datum_bis As Date, niederlassung As String, Optional onlySplitschichten As Boolean = False) As Double
Try
Dim stunden As Double
Dim rgx As New Regex("^\d{2}:\d{2}$")
Dim whereSQL As String = ""
If onlySplitschichten Then
whereSQL = " AND dedet_splitschicht = 1"
Else
whereSQL = " AND dedet_splitschicht = 0"
End If
Using conn As SqlConnection = cSqlDb.GetNewOpenConnection()
'Using cmd As New SqlCommand(" SELECT dstetr_datum,dstetr_von,dstetr_bis,dstetr_pause,dstetr_art FROM tblDienstplanEintraege WHERE dstetr_dstmaId=" & maId & " AND dstetr_datum BETWEEN '" & datum_von.ToShortDateString & "' AND '" & datum_bis.ToShortDateString & "' AND (dstetr_art LIKE 'ZOLL%' OR dstetr_art IN('QS','KS','URL','DBL' ,'NACHT','SO','BS','DR')) ", conn)
Using cmd As New SqlCommand(" SELECT dstetr_datum,dstetr_von,dstetr_bis,dstetr_pause,dstetr_art FROM tblDienstplanEintraege WHERE dstetr_dstmaId=" & maId & " AND dstetr_datum BETWEEN '" & datum_von.ToShortDateString & "' AND '" & datum_bis.ToShortDateString & "' AND replace( replace([dstetr_art] ,'BS','DR') ,'SO','DR') IN (SELECT case WHEN dedet_bezeichnungDP<>'' then dedet_bezeichnungDP ELSE dedet_abt END FROM [tblDienstplanEintraegeDetails] WHERE dedet_niederlassung=@niederlassung AND ( dedet_benutzerdefinierteSchicht=1 OR dedet_stdWieArbeitszeit=1 )) ", conn)
Using cmd As New SqlCommand(" SELECT dstetr_datum,dstetr_von,dstetr_bis,dstetr_pause,dstetr_art FROM tblDienstplanEintraege WHERE dstetr_dstmaId=" & maId & " AND dstetr_datum BETWEEN '" & datum_von.ToShortDateString & "' AND '" & datum_bis.ToShortDateString & "' AND replace( replace([dstetr_art] ,'BS','DR') ,'SO','DR') IN (SELECT case WHEN dedet_bezeichnungDP<>'' then dedet_bezeichnungDP ELSE dedet_abt END FROM [tblDienstplanEintraegeDetails] WHERE dedet_niederlassung=@niederlassung AND ( dedet_benutzerdefinierteSchicht=1 OR dedet_stdWieArbeitszeit=1 )" & whereSQL & ") ", conn)
cmd.Parameters.AddWithValue("@niederlassung", niederlassung)
Dim dr = cmd.ExecuteReader()
@@ -4036,11 +4145,20 @@ Public Class cDienstplan
Return 0
End Function
Public Function getCountEntrys(maId As Integer, datum_von As Date, datum_bis As Date) As Integer
Public Function getCountEntrys(maId As Integer, datum_von As Date, datum_bis As Date, Optional onlySplitschichten As Boolean = False, Optional art As String = "") As Integer
Dim sqlWhere As String = ""
If onlySplitschichten Then
sqlWhere &= "AND dstetr_splitschicht = 1"
End If
If art <> "" Then
sqlWhere &= "And dstetr_art = '" & art & "'"
End If
Try
Dim stunden As Integer
Using conn As SqlConnection = cSqlDb.GetNewOpenConnection()
Using cmd As New SqlCommand(" SELECT COUNT(*) FROM tblDienstplanEintraege WHERE dstetr_dstmaId=" & maId & " AND dstetr_datum BETWEEN '" & datum_von.ToShortDateString & "' AND '" & datum_bis.ToShortDateString & "' ", conn)
Using cmd As New SqlCommand(" SELECT COUNT(*) FROM tblDienstplanEintraege WHERE dstetr_dstmaId=" & maId & " AND dstetr_datum BETWEEN '" & datum_von.ToShortDateString & "' AND '" & datum_bis.ToShortDateString & "' " & sqlWhere, conn)
Dim dr = cmd.ExecuteReader()
Dim cPF As New cProgramFunctions
If dr.HasRows Then
@@ -4062,7 +4180,6 @@ Public Class cDienstplan
End Function
Public Function getCountDays(maId As Integer, datum_von As Date, datum_bis As Date) As Integer
Try
Dim stunden As Integer
@@ -4112,6 +4229,32 @@ Public Class cDienstplan
Return ""
End Function
Public Function getLatestDienstplanEintraegNr() As Integer
Try
Using conn As SqlConnection = cSqlDb.GetNewOpenConnection()
Using cmd As New SqlCommand(" select MAX([dstetr_id]) as MaxId from tblDienstplanEintraege ", conn)
Dim dr = cmd.ExecuteReader()
Dim cPF As New cProgramFunctions
If dr.HasRows Then
dr.Read()
Return dr.Item("MaxId")
End If
dr.Close()
End Using
End Using
Catch ex As Exception
Dim antwort As MsgBoxResult = MsgBox(ex.Message, CType(MsgBoxStyle.RetryCancel + MsgBoxStyle.Exclamation, MsgBoxStyle), "Problem in Function '" & System.Reflection.MethodInfo.GetCurrentMethod.Name & "'")
If antwort <> MsgBoxResult.Retry Then
MsgBox(System.Reflection.MethodInfo.GetCurrentMethod.Name & ": Programm wird aufgrund eines kritischen Problems beendet.", vbInformation)
End If
End Try
Return -1
End Function
End Class