Export Urlaubsplaner - Jahresansicht

This commit is contained in:
2023-01-24 09:58:01 +01:00
parent f67afff2a1
commit 514c470565
6 changed files with 187 additions and 96 deletions

View File

@@ -87,10 +87,14 @@
<SpecificVersion>False</SpecificVersion>
<HintPath>C:\Program Files (x86)\GrapeCity\ActiveReports 15\Tools\BouncyCastle.Crypto.dll</HintPath>
</Reference>
<Reference Include="ClosedXML, Version=0.76.0.0, Culture=neutral, PublicKeyToken=fd1eb21b62ae805b, processorArchitecture=MSIL">
<Reference Include="ClosedXML, Version=0.95.4.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\dll\closedxml\ClosedXML.dll</HintPath>
</Reference>
<Reference Include="DocumentFormat.OpenXml, Version=2.9.0.0, Culture=neutral, PublicKeyToken=8fb06cb64d019a17, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\DocumentFormat.OpenXml.2.7.2\lib\net46\DocumentFormat.OpenXml.dll</HintPath>
</Reference>
<Reference Include="FastColoredTextBox">
<HintPath>..\..\..\dll\FastColoredTextBox.dll</HintPath>
</Reference>

View File

@@ -22,12 +22,12 @@ Partial Class frmUrlKW
'Das Bearbeiten mit dem Code-Editor ist nicht möglich.
<System.Diagnostics.DebuggerStepThrough()> _
Private Sub InitializeComponent()
Me.components = New System.ComponentModel.Container()
Me.pnl = New System.Windows.Forms.Panel()
Me.Button5 = New System.Windows.Forms.Button()
Me.Button4 = New System.Windows.Forms.Button()
Me.txtInfo = New System.Windows.Forms.TextBox()
Me.Label2 = New System.Windows.Forms.Label()
Me.cboArt = New VERAG_PROG_ALLGEMEIN.MyComboBox
Me.cboArt = New VERAG_PROG_ALLGEMEIN.MyComboBox()
Me.Button3 = New System.Windows.Forms.Button()
Me.Button2 = New System.Windows.Forms.Button()
Me.Button1 = New System.Windows.Forms.Button()
@@ -54,11 +54,10 @@ Partial Class frmUrlKW
Me.Label25 = New System.Windows.Forms.Label()
Me.cbxMo = New System.Windows.Forms.CheckBox()
Me.btnSpeichern = New System.Windows.Forms.Button()
Me.MyComboBox1 = New VERAG_PROG_ALLGEMEIN.MyComboBox
Me.MyComboBox1 = New VERAG_PROG_ALLGEMEIN.MyComboBox()
Me.lblKW = New System.Windows.Forms.Label()
Me.Label1 = New System.Windows.Forms.Label()
Me.lblUrlaubEintragen = New System.Windows.Forms.Label()
Me.Button5 = New System.Windows.Forms.Button()
Me.pnl.SuspendLayout()
Me.SuspendLayout()
'
@@ -104,15 +103,25 @@ Partial Class frmUrlKW
Me.pnl.Dock = System.Windows.Forms.DockStyle.Fill
Me.pnl.Location = New System.Drawing.Point(0, 0)
Me.pnl.Name = "pnl"
Me.pnl.Size = New System.Drawing.Size(513, 212)
Me.pnl.Size = New System.Drawing.Size(537, 212)
Me.pnl.TabIndex = 0
'
'Button5
'
Me.Button5.FlatStyle = System.Windows.Forms.FlatStyle.Flat
Me.Button5.Image = Global.ADMIN.My.Resources.Resources.plus
Me.Button5.Location = New System.Drawing.Point(361, 155)
Me.Button5.Name = "Button5"
Me.Button5.Size = New System.Drawing.Size(47, 44)
Me.Button5.TabIndex = 43
Me.Button5.UseVisualStyleBackColor = True
'
'Button4
'
Me.Button4.FlatStyle = System.Windows.Forms.FlatStyle.Flat
Me.Button4.Image = Global.ADMIN.My.Resources.Resources.del
Me.Button4.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft
Me.Button4.Location = New System.Drawing.Point(385, 66)
Me.Button4.Location = New System.Drawing.Point(411, 66)
Me.Button4.Name = "Button4"
Me.Button4.Size = New System.Drawing.Size(111, 44)
Me.Button4.TabIndex = 42
@@ -138,10 +147,12 @@ Partial Class frmUrlKW
'
'cboArt
'
Me.cboArt._allowedValuesFreiText = Nothing
Me.cboArt._allowFreiText = False
Me.cboArt._value = ""
Me.cboArt.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
Me.cboArt.FormattingEnabled = True
Me.cboArt.Location = New System.Drawing.Point(385, 39)
Me.cboArt.Location = New System.Drawing.Point(411, 39)
Me.cboArt.Name = "cboArt"
Me.cboArt.Size = New System.Drawing.Size(111, 21)
Me.cboArt.TabIndex = 39
@@ -149,7 +160,7 @@ Partial Class frmUrlKW
'Button3
'
Me.Button3.FlatStyle = System.Windows.Forms.FlatStyle.Flat
Me.Button3.Location = New System.Drawing.Point(344, 8)
Me.Button3.Location = New System.Drawing.Point(373, 8)
Me.Button3.Name = "Button3"
Me.Button3.Size = New System.Drawing.Size(32, 24)
Me.Button3.TabIndex = 38
@@ -159,7 +170,7 @@ Partial Class frmUrlKW
'Button2
'
Me.Button2.FlatStyle = System.Windows.Forms.FlatStyle.Flat
Me.Button2.Location = New System.Drawing.Point(448, 9)
Me.Button2.Location = New System.Drawing.Point(474, 9)
Me.Button2.Name = "Button2"
Me.Button2.Size = New System.Drawing.Size(32, 24)
Me.Button2.TabIndex = 37
@@ -169,7 +180,7 @@ Partial Class frmUrlKW
'Button1
'
Me.Button1.FlatStyle = System.Windows.Forms.FlatStyle.Flat
Me.Button1.Location = New System.Drawing.Point(385, 114)
Me.Button1.Location = New System.Drawing.Point(411, 114)
Me.Button1.Name = "Button1"
Me.Button1.Size = New System.Drawing.Size(111, 27)
Me.Button1.TabIndex = 36
@@ -189,63 +200,63 @@ Partial Class frmUrlKW
'
'lblSo
'
Me.lblSo.Location = New System.Drawing.Point(329, 114)
Me.lblSo.Location = New System.Drawing.Point(356, 114)
Me.lblSo.Name = "lblSo"
Me.lblSo.Size = New System.Drawing.Size(50, 15)
Me.lblSo.Size = New System.Drawing.Size(55, 15)
Me.lblSo.TabIndex = 34
Me.lblSo.Text = "01.01."
Me.lblSo.TextAlign = System.Drawing.ContentAlignment.TopCenter
'
'lblSa
'
Me.lblSa.Location = New System.Drawing.Point(278, 114)
Me.lblSa.Location = New System.Drawing.Point(300, 114)
Me.lblSa.Name = "lblSa"
Me.lblSa.Size = New System.Drawing.Size(50, 15)
Me.lblSa.Size = New System.Drawing.Size(55, 15)
Me.lblSa.TabIndex = 33
Me.lblSa.Text = "01.01."
Me.lblSa.TextAlign = System.Drawing.ContentAlignment.TopCenter
'
'lblFr
'
Me.lblFr.Location = New System.Drawing.Point(223, 114)
Me.lblFr.Location = New System.Drawing.Point(245, 114)
Me.lblFr.Name = "lblFr"
Me.lblFr.Size = New System.Drawing.Size(50, 15)
Me.lblFr.Size = New System.Drawing.Size(55, 15)
Me.lblFr.TabIndex = 32
Me.lblFr.Text = "01.01."
Me.lblFr.TextAlign = System.Drawing.ContentAlignment.TopCenter
'
'lblDo
'
Me.lblDo.Location = New System.Drawing.Point(171, 114)
Me.lblDo.Location = New System.Drawing.Point(189, 114)
Me.lblDo.Name = "lblDo"
Me.lblDo.Size = New System.Drawing.Size(50, 15)
Me.lblDo.Size = New System.Drawing.Size(55, 15)
Me.lblDo.TabIndex = 31
Me.lblDo.Text = "01.01."
Me.lblDo.TextAlign = System.Drawing.ContentAlignment.TopCenter
'
'lblMi
'
Me.lblMi.Location = New System.Drawing.Point(117, 114)
Me.lblMi.Location = New System.Drawing.Point(127, 114)
Me.lblMi.Name = "lblMi"
Me.lblMi.Size = New System.Drawing.Size(50, 15)
Me.lblMi.Size = New System.Drawing.Size(55, 15)
Me.lblMi.TabIndex = 30
Me.lblMi.Text = "01.01."
Me.lblMi.TextAlign = System.Drawing.ContentAlignment.TopCenter
'
'lblDi
'
Me.lblDi.Location = New System.Drawing.Point(67, 114)
Me.lblDi.Location = New System.Drawing.Point(66, 114)
Me.lblDi.Name = "lblDi"
Me.lblDi.Size = New System.Drawing.Size(50, 15)
Me.lblDi.Size = New System.Drawing.Size(55, 15)
Me.lblDi.TabIndex = 29
Me.lblDi.Text = "01.01."
Me.lblDi.TextAlign = System.Drawing.ContentAlignment.TopCenter
'
'lblMo
'
Me.lblMo.Location = New System.Drawing.Point(12, 114)
Me.lblMo.Location = New System.Drawing.Point(2, 114)
Me.lblMo.Name = "lblMo"
Me.lblMo.Size = New System.Drawing.Size(50, 15)
Me.lblMo.Size = New System.Drawing.Size(55, 15)
Me.lblMo.TabIndex = 28
Me.lblMo.Text = "01.01."
Me.lblMo.TextAlign = System.Drawing.ContentAlignment.TopCenter
@@ -253,7 +264,7 @@ Partial Class frmUrlKW
'Label17
'
Me.Label17.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Label17.Location = New System.Drawing.Point(329, 101)
Me.Label17.Location = New System.Drawing.Point(356, 101)
Me.Label17.Name = "Label17"
Me.Label17.Size = New System.Drawing.Size(50, 15)
Me.Label17.TabIndex = 20
@@ -263,7 +274,7 @@ Partial Class frmUrlKW
'cbxSo
'
Me.cbxSo.AutoSize = True
Me.cbxSo.Location = New System.Drawing.Point(347, 132)
Me.cbxSo.Location = New System.Drawing.Point(374, 132)
Me.cbxSo.Name = "cbxSo"
Me.cbxSo.Size = New System.Drawing.Size(15, 14)
Me.cbxSo.TabIndex = 27
@@ -272,7 +283,7 @@ Partial Class frmUrlKW
'Label18
'
Me.Label18.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Label18.Location = New System.Drawing.Point(278, 101)
Me.Label18.Location = New System.Drawing.Point(300, 101)
Me.Label18.Name = "Label18"
Me.Label18.Size = New System.Drawing.Size(50, 15)
Me.Label18.TabIndex = 19
@@ -282,7 +293,7 @@ Partial Class frmUrlKW
'cbxSa
'
Me.cbxSa.AutoSize = True
Me.cbxSa.Location = New System.Drawing.Point(296, 132)
Me.cbxSa.Location = New System.Drawing.Point(318, 132)
Me.cbxSa.Name = "cbxSa"
Me.cbxSa.Size = New System.Drawing.Size(15, 14)
Me.cbxSa.TabIndex = 26
@@ -291,7 +302,7 @@ Partial Class frmUrlKW
'Label19
'
Me.Label19.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Label19.Location = New System.Drawing.Point(223, 101)
Me.Label19.Location = New System.Drawing.Point(245, 101)
Me.Label19.Name = "Label19"
Me.Label19.Size = New System.Drawing.Size(50, 15)
Me.Label19.TabIndex = 18
@@ -301,7 +312,7 @@ Partial Class frmUrlKW
'cbxFr
'
Me.cbxFr.AutoSize = True
Me.cbxFr.Location = New System.Drawing.Point(241, 132)
Me.cbxFr.Location = New System.Drawing.Point(263, 132)
Me.cbxFr.Name = "cbxFr"
Me.cbxFr.Size = New System.Drawing.Size(15, 14)
Me.cbxFr.TabIndex = 25
@@ -310,7 +321,7 @@ Partial Class frmUrlKW
'Label20
'
Me.Label20.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Label20.Location = New System.Drawing.Point(171, 101)
Me.Label20.Location = New System.Drawing.Point(189, 101)
Me.Label20.Name = "Label20"
Me.Label20.Size = New System.Drawing.Size(50, 15)
Me.Label20.TabIndex = 17
@@ -320,7 +331,7 @@ Partial Class frmUrlKW
'cbxDo
'
Me.cbxDo.AutoSize = True
Me.cbxDo.Location = New System.Drawing.Point(189, 132)
Me.cbxDo.Location = New System.Drawing.Point(207, 132)
Me.cbxDo.Name = "cbxDo"
Me.cbxDo.Size = New System.Drawing.Size(15, 14)
Me.cbxDo.TabIndex = 24
@@ -329,7 +340,7 @@ Partial Class frmUrlKW
'Label21
'
Me.Label21.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Label21.Location = New System.Drawing.Point(117, 101)
Me.Label21.Location = New System.Drawing.Point(129, 101)
Me.Label21.Name = "Label21"
Me.Label21.Size = New System.Drawing.Size(50, 15)
Me.Label21.TabIndex = 16
@@ -339,7 +350,7 @@ Partial Class frmUrlKW
'cbxMi
'
Me.cbxMi.AutoSize = True
Me.cbxMi.Location = New System.Drawing.Point(135, 132)
Me.cbxMi.Location = New System.Drawing.Point(147, 132)
Me.cbxMi.Name = "cbxMi"
Me.cbxMi.Size = New System.Drawing.Size(15, 14)
Me.cbxMi.TabIndex = 23
@@ -348,7 +359,7 @@ Partial Class frmUrlKW
'Label22
'
Me.Label22.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Label22.Location = New System.Drawing.Point(67, 101)
Me.Label22.Location = New System.Drawing.Point(70, 101)
Me.Label22.Name = "Label22"
Me.Label22.Size = New System.Drawing.Size(50, 15)
Me.Label22.TabIndex = 15
@@ -358,7 +369,7 @@ Partial Class frmUrlKW
'cbxDi
'
Me.cbxDi.AutoSize = True
Me.cbxDi.Location = New System.Drawing.Point(85, 132)
Me.cbxDi.Location = New System.Drawing.Point(88, 132)
Me.cbxDi.Name = "cbxDi"
Me.cbxDi.Size = New System.Drawing.Size(15, 14)
Me.cbxDi.TabIndex = 22
@@ -367,7 +378,7 @@ Partial Class frmUrlKW
'Label25
'
Me.Label25.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Label25.Location = New System.Drawing.Point(12, 101)
Me.Label25.Location = New System.Drawing.Point(11, 101)
Me.Label25.Name = "Label25"
Me.Label25.Size = New System.Drawing.Size(50, 15)
Me.Label25.TabIndex = 14
@@ -377,7 +388,7 @@ Partial Class frmUrlKW
'cbxMo
'
Me.cbxMo.AutoSize = True
Me.cbxMo.Location = New System.Drawing.Point(30, 132)
Me.cbxMo.Location = New System.Drawing.Point(29, 132)
Me.cbxMo.Name = "cbxMo"
Me.cbxMo.Size = New System.Drawing.Size(15, 14)
Me.cbxMo.TabIndex = 21
@@ -388,7 +399,7 @@ Partial Class frmUrlKW
Me.btnSpeichern.FlatStyle = System.Windows.Forms.FlatStyle.Flat
Me.btnSpeichern.Image = Global.ADMIN.My.Resources.Resources.save
Me.btnSpeichern.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft
Me.btnSpeichern.Location = New System.Drawing.Point(385, 155)
Me.btnSpeichern.Location = New System.Drawing.Point(411, 155)
Me.btnSpeichern.Name = "btnSpeichern"
Me.btnSpeichern.Size = New System.Drawing.Size(111, 44)
Me.btnSpeichern.TabIndex = 4
@@ -397,6 +408,8 @@ Partial Class frmUrlKW
'
'MyComboBox1
'
Me.MyComboBox1._allowedValuesFreiText = Nothing
Me.MyComboBox1._allowFreiText = False
Me.MyComboBox1._value = ""
Me.MyComboBox1.DropDownStyle = System.Windows.Forms.ComboBoxStyle.Simple
Me.MyComboBox1.Enabled = False
@@ -411,7 +424,7 @@ Partial Class frmUrlKW
'
Me.lblKW.AutoSize = True
Me.lblKW.Font = New System.Drawing.Font("Microsoft Sans Serif", 10.0!, System.Drawing.FontStyle.Bold)
Me.lblKW.Location = New System.Drawing.Point(382, 12)
Me.lblKW.Location = New System.Drawing.Point(408, 12)
Me.lblKW.Name = "lblKW"
Me.lblKW.Size = New System.Drawing.Size(60, 17)
Me.lblKW.TabIndex = 2
@@ -437,21 +450,11 @@ Partial Class frmUrlKW
Me.lblUrlaubEintragen.TabIndex = 0
Me.lblUrlaubEintragen.Text = "Urlaub eintragen"
'
'Button5
'
Me.Button5.FlatStyle = System.Windows.Forms.FlatStyle.Flat
Me.Button5.Image = Global.ADMIN.My.Resources.Resources.plus
Me.Button5.Location = New System.Drawing.Point(332, 155)
Me.Button5.Name = "Button5"
Me.Button5.Size = New System.Drawing.Size(47, 44)
Me.Button5.TabIndex = 43
Me.Button5.UseVisualStyleBackColor = True
'
'frmUrlKW
'
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
Me.ClientSize = New System.Drawing.Size(513, 212)
Me.ClientSize = New System.Drawing.Size(537, 212)
Me.Controls.Add(Me.pnl)
Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None
Me.Name = "frmUrlKW"

View File

@@ -1,4 +1,6 @@
Public Class frmUrlKW
Imports GrapeCity.ActiveReports.Chart.Graphics
Public Class frmUrlKW
Public KW As Integer
Public YEAR As Integer
Public ART As String
@@ -11,6 +13,7 @@
Dim SQLDienst As New cDienstplan
Dim montag As Date
Dim loaded = False
Dim ftString As String = " FT"
Private Sub btnSpeichern_Click(sender As Object, e As EventArgs) Handles btnSpeichern.Click
' SQLDienst.delDienstNichtAnwesendKW_ByKwJahr(maId, KW, YEAR)
@@ -75,6 +78,10 @@
For Each i In MyComboBox1.Items
If DirectCast(i, VERAG_PROG_ALLGEMEIN.MyListItem).Value = maId Then MyComboBox1.SelectedItem = i
Next
Dim FT As New VERAG_PROG_ALLGEMEIN.cFeiertage(YEAR)
Dim ftString As String = " FT"
montag = CalendarWeek(KW, YEAR)
lblMo.Text = montag.ToString("dd.MM.")
lblDi.Text = montag.AddDays(1).ToString("dd.MM.")
@@ -84,6 +91,48 @@
lblSa.Text = montag.AddDays(5).ToString("dd.MM.")
lblSo.Text = montag.AddDays(6).ToString("dd.MM.")
If (FT.isFeiertag(montag, cDienstSettings.getLand(niederlassung))) Then
lblMo.TextAlign = ContentAlignment.TopLeft
lblMo.Text &= ftString
lblMo.ForeColor = Color.Red
End If
If (FT.isFeiertag(montag.AddDays(1), cDienstSettings.getLand(niederlassung))) Then
lblDi.TextAlign = ContentAlignment.TopLeft
lblDi.Text &= ftString
lblDi.ForeColor = Color.Red
End If
If (FT.isFeiertag(montag.AddDays(2), cDienstSettings.getLand(niederlassung))) Then
lblMi.TextAlign = ContentAlignment.TopLeft
lblMi.Text &= ftString
lblMi.ForeColor = Color.Red
End If
If (FT.isFeiertag(montag.AddDays(3), cDienstSettings.getLand(niederlassung))) Then
lblDo.TextAlign = ContentAlignment.TopLeft
lblDo.Text &= ftString
lblDo.ForeColor = Color.Red
End If
If (FT.isFeiertag(montag.AddDays(4), cDienstSettings.getLand(niederlassung))) Then
lblFr.TextAlign = ContentAlignment.TopLeft
lblFr.Text &= ftString
lblFr.ForeColor = Color.Red
End If
If (FT.isFeiertag(montag.AddDays(5), cDienstSettings.getLand(niederlassung))) Then
lblSa.TextAlign = ContentAlignment.TopLeft
lblSa.Text &= ftString
lblSa.ForeColor = Color.Red
End If
If (FT.isFeiertag(montag.AddDays(6), cDienstSettings.getLand(niederlassung))) Then
lblSo.TextAlign = ContentAlignment.TopLeft
lblSo.Text &= ftString
lblSo.ForeColor = Color.Red
End If
cbxMo.Checked = False
cbxDi.Checked = False
@@ -171,13 +220,13 @@
Private Sub CheckBox1_CheckedChanged(sender As Object, e As EventArgs) Handles CheckBox1.CheckedChanged
cbxMo.Checked = sender.checked
cbxDi.Checked = sender.checked
cbxMi.Checked = sender.checked
cbxDo.Checked = sender.checked
cbxFr.Checked = sender.checked
cbxSa.Checked = sender.checked
cbxSo.Checked = sender.checked
cbxMo.Checked = IIf(lblMo.Text.Substring(lblMo.Text.Length - ftString.Length) = ftString AndAlso Not cboArt._value = "DR", False, sender.checked)
cbxDi.Checked = IIf(lblDi.Text.Substring(lblDi.Text.Length - ftString.Length) = ftString AndAlso Not cboArt._value = "DR", False, sender.checked)
cbxMi.Checked = IIf(lblMi.Text.Substring(lblMi.Text.Length - ftString.Length) = ftString AndAlso Not cboArt._value = "DR", False, sender.checked)
cbxDo.Checked = IIf(lblDo.Text.Substring(lblDo.Text.Length - ftString.Length) = ftString AndAlso Not cboArt._value = "DR", False, sender.checked)
cbxFr.Checked = IIf(lblFr.Text.Substring(lblFr.Text.Length - ftString.Length) = ftString AndAlso Not cboArt._value = "DR", False, sender.checked)
cbxSa.Checked = IIf(lblSa.Text.Substring(lblSa.Text.Length - ftString.Length) = ftString AndAlso Not cboArt._value = "DR", False, sender.checked)
cbxSo.Checked = IIf(lblSo.Text.Substring(lblSo.Text.Length - ftString.Length) = ftString AndAlso Not cboArt._value = "DR", False, sender.checked)
End Sub
Private Sub Button4_Click(sender As Object, e As EventArgs) Handles Button4.Click
@@ -190,6 +239,7 @@
Private Sub cboArt_SelectedIndexChanged(sender As Object, e As EventArgs) Handles cboArt.SelectedIndexChanged
If loaded Then
txtInfo.Text = cboArt._value
CheckBox1_CheckedChanged(CheckBox1, e)
End If
End Sub

View File

@@ -27,14 +27,14 @@ Partial Class frmUrlaubsplaner
Me.dgvUrlaub = New System.Windows.Forms.DataGridView()
Me.Panel2 = New System.Windows.Forms.Panel()
Me.Panel1 = New System.Windows.Forms.Panel()
Me.Label3 = New System.Windows.Forms.Label()
Me.cboJahr = New VERAG_PROG_ALLGEMEIN.MyComboBox()
Me.Button4 = New System.Windows.Forms.Button()
Me.lblKw = New System.Windows.Forms.Label()
Me.lblMa = New System.Windows.Forms.Label()
Me.Label2 = New System.Windows.Forms.Label()
Me.Label1 = New System.Windows.Forms.Label()
Me.lblUrlaubsplaner = New System.Windows.Forms.Label()
Me.cboJahr = New VERAG_PROG_ALLGEMEIN.MyComboBox()
Me.Label3 = New System.Windows.Forms.Label()
Me.pnl.SuspendLayout()
CType(Me.dgvUrlaub, System.ComponentModel.ISupportInitialize).BeginInit()
Me.Panel1.SuspendLayout()
@@ -94,6 +94,30 @@ Partial Class frmUrlaubsplaner
Me.Panel1.Size = New System.Drawing.Size(1113, 53)
Me.Panel1.TabIndex = 1
'
'Label3
'
Me.Label3.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
Me.Label3.AutoSize = True
Me.Label3.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Label3.Location = New System.Drawing.Point(933, 10)
Me.Label3.Name = "Label3"
Me.Label3.Size = New System.Drawing.Size(30, 13)
Me.Label3.TabIndex = 71
Me.Label3.Text = "Jahr:"
'
'cboJahr
'
Me.cboJahr._allowedValuesFreiText = Nothing
Me.cboJahr._allowFreiText = False
Me.cboJahr._value = ""
Me.cboJahr.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
Me.cboJahr.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
Me.cboJahr.FormattingEnabled = True
Me.cboJahr.Location = New System.Drawing.Point(969, 5)
Me.cboJahr.Name = "cboJahr"
Me.cboJahr.Size = New System.Drawing.Size(121, 21)
Me.cboJahr.TabIndex = 70
'
'Button4
'
Me.Button4.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom
@@ -102,9 +126,9 @@ Partial Class frmUrlaubsplaner
Me.Button4.ForeColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(54, Byte), Integer), CType(CType(128, Byte), Integer))
Me.Button4.Image = Global.ADMIN.My.Resources.Resources.Excel_2013_logo_155x110
Me.Button4.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft
Me.Button4.Location = New System.Drawing.Point(763, 15)
Me.Button4.Location = New System.Drawing.Point(631, 15)
Me.Button4.Name = "Button4"
Me.Button4.Size = New System.Drawing.Size(31, 27)
Me.Button4.Size = New System.Drawing.Size(38, 27)
Me.Button4.TabIndex = 69
Me.Button4.Tag = "Dienstplan erstellen"
Me.Button4.TextAlign = System.Drawing.ContentAlignment.MiddleRight
@@ -161,30 +185,6 @@ Partial Class frmUrlaubsplaner
Me.lblUrlaubsplaner.TabIndex = 0
Me.lblUrlaubsplaner.Text = "Abwesenheits-Planer"
'
'cboJahr
'
Me.cboJahr._allowedValuesFreiText = Nothing
Me.cboJahr._allowFreiText = False
Me.cboJahr._value = ""
Me.cboJahr.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
Me.cboJahr.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
Me.cboJahr.FormattingEnabled = True
Me.cboJahr.Location = New System.Drawing.Point(969, 5)
Me.cboJahr.Name = "cboJahr"
Me.cboJahr.Size = New System.Drawing.Size(121, 21)
Me.cboJahr.TabIndex = 70
'
'Label3
'
Me.Label3.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
Me.Label3.AutoSize = True
Me.Label3.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Label3.Location = New System.Drawing.Point(933, 10)
Me.Label3.Name = "Label3"
Me.Label3.Size = New System.Drawing.Size(30, 13)
Me.Label3.TabIndex = 71
Me.Label3.Text = "Jahr:"
'
'frmUrlaubsplaner
'
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)

View File

@@ -5,6 +5,7 @@ Public Class frmUrlaubsplaner
Dim ADMIN As New cOptionenDAL
Public niederlassung = ""
Dim aktJahr As Integer = Now.Year
Dim dt As New DataTable
Private Sub frmUrlaubsplaner_Load(sender As Object, e As EventArgs) Handles Me.Load
lblMa.Text = ""
@@ -169,8 +170,8 @@ Public Class frmUrlaubsplaner
Return dDate.Year + 1 & "01"
ElseIf dDate < dThisYear Then
' Falls das Datum noch zu einer KW aus dem letzten Jahr zählt
Return dDate.Year - 1 & DatePart(DateInterval.WeekOfYear, _
New Date(dDate.Year - 1, 12, 28), FirstDayOfWeek.Monday, _
Return dDate.Year - 1 & DatePart(DateInterval.WeekOfYear,
New Date(dDate.Year - 1, 12, 28), FirstDayOfWeek.Monday,
FirstWeekOfYear.FirstFourDays)
Else
' KW = Differenz zum ersten Tag der ersten Woche
@@ -234,7 +235,7 @@ Public Class frmUrlaubsplaner
End If
End Sub
Private Sub dgvPrjDwgs_CellMouseLeave(sender As Object, e As System.Windows.Forms.DataGridViewCellEventArgs) Handles dgvUrlaub.CellMouseLeave
For i = 0 To dgvUrlaub.RowCount - 1
For i = 0 To dgvUrlaub.RowCount - 1
For j = 0 To dgvUrlaub.ColumnCount - 1
Dim c = dgvUrlaub.Rows(i).Cells(j)
If c.Value Is Nothing Then c.Style.BackColor = IIf(j = 0, Color.LightGray, Color.White)
@@ -332,11 +333,44 @@ Public Class frmUrlaubsplaner
End Sub
Private Sub Button4_Click(sender As Object, e As EventArgs) Handles Button4.Click
cProgramFunctions.genExcelFromDT_NEW(cProgramFunctions.dgridViewTods(dgvUrlaub))
cProgramFunctions.genExcelFromDT_NEW(saveToDt())
End Sub
Private Sub cboJahr_SelectedIndexChanged(sender As Object, e As EventArgs) Handles cboJahr.SelectedIndexChanged
If loaded Then aktJahr = cboJahr._value : initDGV() :
End Sub
Private Function saveToDt() As DataTable
Dim dt As New DataTable()
For Each column As DataGridViewColumn In dgvUrlaub.Columns
If column.ValueType Is Nothing Then
dt.Columns.Add(column.HeaderText, System.Type.GetType("System.String"))
Else
dt.Columns.Add(column.HeaderText, column.ValueType)
End If
Next
For Each row As DataGridViewRow In dgvUrlaub.Rows
dt.Rows.Add()
For Each cell As DataGridViewCell In row.Cells
If cell.Value Is Nothing Then
dt.Rows(dt.Rows.Count - 1)(cell.ColumnIndex) = ""
Else
dt.Rows(dt.Rows.Count - 1)(cell.ColumnIndex) = cell.Value.ToString()
End If
Next
Next
Return dt
End Function
End Class

View File

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