Files
BeWoPlaner/ReportImp/FizHof/Service/CustomVacationService.cs
Christian 25da18d93c cb
2023-01-05 13:56:27 +01:00

45 lines
1.2 KiB
C#

using BeWo.Data.Access;
using BeWo.Data.Entities;
using BeWo.Service.Plugins;
using BS.Shared;
using BS.Shared.DataContracts;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Text;
using System.Threading.Tasks;
namespace FizHof.Service
{
public class CustomVacationService : VacationService
{
public override string Bundesland { get => "Bayern"; }
public override List<FeiertagDC> GetFeiertage(int year, String bundesland)
{
List<FeiertagDC> list = base.GetFeiertage(year, bundesland);
if (year < 2020)
{
list.Remove(list.First(f => f.Datum == new DateTime(year, 1, 6)));
//list.Add(new DateTime(year, 8, 15)); // , "Mariä Himmelfahrt")); ISt in Oberfranken doch kein Feiertag, nur in Rest-Bayern
}
if (year >= 2020)
{
list.Remove(list.First(f => f.Datum == new DateTime(year, 12, 24)));
}
else if (year == 2019)
{
list.Add(new FeiertagDC { Datum = new DateTime(year, 12, 31), Name = "Silvester" });
}
return list;
}
}
}