isFeiertag, Control (Insert und Delete in Schichten), ExcelAusgabeDP, etc.

This commit is contained in:
2022-12-14 16:55:37 +01:00
parent e7733375e1
commit 3509baf3ed
9 changed files with 753 additions and 354 deletions

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")
@@ -61,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()
@@ -152,11 +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.pnlOptions = New System.Windows.Forms.Panel()
Me.Button19 = New System.Windows.Forms.Button()
Me.Label1 = New System.Windows.Forms.Label()
Me.txtSchichtstd = New System.Windows.Forms.TextBox()
Me.UsrcntlAuswertungWocheAuslastung1 = New ADMIN.usrcntlAuswertungWocheAuslastung()
Me.UsrCntlAuswertungAuslastungMA1 = New ADMIN.usrCntlAuswertungAuslastungMA()
Me.ctxtDgv.SuspendLayout()
@@ -214,6 +215,7 @@ 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()
@@ -529,6 +531,29 @@ 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
@@ -1597,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
'
@@ -1654,29 +1686,6 @@ Partial Class frmDienstplanVariabel
Me.Button19.TextAlign = System.Drawing.ContentAlignment.MiddleRight
Me.Button19.UseVisualStyleBackColor = True
'
'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
'
'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
'
'UsrcntlAuswertungWocheAuslastung1
'
Me.UsrcntlAuswertungWocheAuslastung1.BackColor = System.Drawing.Color.FromArgb(CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer))
@@ -1767,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)
@@ -1905,4 +1915,5 @@ Partial Class frmDienstplanVariabel
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

@@ -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

@@ -1,4 +1,5 @@
Imports System.Windows
Imports Hardcodet.Wpf.TaskbarNotification.Interop
Public Class frmSchichtenZeiten
Dim ADMIN As New cOptionenDAL
@@ -200,12 +201,18 @@ Public Class frmSchichtenZeiten
Private Sub btn_Click(sender As Object, e As EventArgs) Handles btn.Click
MsgBox("Funktion noch nicht verfügbar!")
'dgvSchihten.AllowUserToAddRows = True
'Dim row As New DataGridViewRow
'dgvSchihten.Rows.Add()
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
@@ -264,4 +271,22 @@ Public Class frmSchichtenZeiten
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