Export Urlaubsplaner - Jahresansicht
This commit is contained in:
@@ -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)
|
||||
@@ -23,7 +26,7 @@
|
||||
' SQLDienst.delDienstNichtAnwesendIdArtDatum(maId, montag, montag.AddDays(6))
|
||||
|
||||
End If
|
||||
|
||||
|
||||
Dim id = SQLDienst.insertDienstNA_KW(maId, KW, YEAR, DirectCast(cboArt.SelectedItem, VERAG_PROG_ALLGEMEIN.MyListItem).Value, txtInfo.Text, niederlassung)
|
||||
|
||||
' Dim ma As cDienstMA = SQLDienst.getDstMA(maId)
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user