Namespaceanpassungen
This commit is contained in:
@@ -5,15 +5,14 @@ using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Jugenddienst_Stunden.Types {
|
||||
public class Base {
|
||||
public Collection<Projekt> Projekte { get; set; }
|
||||
public Collection<Gemeinde> Gemeinden { get; set; }
|
||||
public Collection<Freistellung> Freistellungen { get; set; }
|
||||
public int EmployeeId { get; set; }
|
||||
namespace Jugenddienst_Stunden.Types;
|
||||
public class Base {
|
||||
public Collection<Projekt> Projekte { get; set; }
|
||||
public Collection<Gemeinde> Gemeinden { get; set; }
|
||||
public Collection<Freistellung> Freistellungen { get; set; }
|
||||
public int EmployeeId { get; set; }
|
||||
|
||||
public Hours Hours { get; set; }
|
||||
public List<DayTime> daytime { get; set; }
|
||||
|
||||
}
|
||||
public Hours Hours { get; set; }
|
||||
public List<DayTime> daytime { get; set; }
|
||||
|
||||
}
|
||||
|
||||
@@ -1,42 +1,41 @@
|
||||
using Jugenddienst_Stunden.Models;
|
||||
using System.Collections.ObjectModel;
|
||||
|
||||
namespace Jugenddienst_Stunden.Types {
|
||||
namespace Jugenddienst_Stunden.Types;
|
||||
/// <summary>
|
||||
/// Represents a day time entry for an employee.
|
||||
/// </summary>
|
||||
public class DayTime {
|
||||
public int? id { get; set; }
|
||||
public int EmployeeId { get; set; }
|
||||
public DateTime day { get; set; }
|
||||
public int wday { get; set; }
|
||||
public TimeOnly begin { get; set; }
|
||||
public TimeOnly end { get; set; }
|
||||
public string description { get; set; }
|
||||
public string? free { get; set; }
|
||||
public bool? approved { get; set; }
|
||||
public int? type { get; set; }
|
||||
public int? projekt { get; set; }
|
||||
public int? gemeinde { get; set; }
|
||||
public TimeOnly night { get; set; }
|
||||
public Dictionary<string, TimeOnly> total { get; set; }
|
||||
public TimeOnly end_print { get; set; }
|
||||
public TimeSpan TimeSpanVon { get; set; }
|
||||
public TimeSpan TimeSpanBis { get; set; }
|
||||
public Collection<Projekt> Projekte { get; set; }
|
||||
public Collection<Gemeinde> Gemeinden { get; set; }
|
||||
public Collection<Freistellung> Freistellungen { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Represents a day time entry for an employee.
|
||||
/// Gets the active Gemeinde based on the gemeinde ID.
|
||||
/// </summary>
|
||||
public class DayTime {
|
||||
public int? id { get; set; }
|
||||
public int EmployeeId { get; set; }
|
||||
public DateTime day { get; set; }
|
||||
public int wday { get; set; }
|
||||
public TimeOnly begin { get; set; }
|
||||
public TimeOnly end { get; set; }
|
||||
public string description { get; set; }
|
||||
public string? free { get; set; }
|
||||
public bool? approved { get; set; }
|
||||
public int? type { get; set; }
|
||||
public int? projekt { get; set; }
|
||||
public int? gemeinde { get; set; }
|
||||
public TimeOnly night { get; set; }
|
||||
public Dictionary<string, TimeOnly> total { get; set; }
|
||||
public TimeOnly end_print { get; set; }
|
||||
public TimeSpan TimeSpanVon { get; set; }
|
||||
public TimeSpan TimeSpanBis { get; set; }
|
||||
public Collection<Projekt> Projekte { get; set; }
|
||||
public Collection<Gemeinde> Gemeinden { get; set; }
|
||||
public Collection<Freistellung> Freistellungen { get; set; }
|
||||
public Gemeinde GemeindeAktiv { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the active Gemeinde based on the gemeinde ID.
|
||||
/// </summary>
|
||||
public Gemeinde GemeindeAktiv { get; set; }
|
||||
/// <summary>
|
||||
/// Gets the active Projekt based on the projekt ID.
|
||||
/// </summary>
|
||||
public Projekt ProjektAktiv { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the active Projekt based on the projekt ID.
|
||||
/// </summary>
|
||||
public Projekt ProjektAktiv { get; set; }
|
||||
|
||||
public Freistellung FreistellungAktiv { get; set; }
|
||||
}
|
||||
public Freistellung FreistellungAktiv { get; set; }
|
||||
}
|
||||
|
||||
@@ -4,9 +4,8 @@ using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Jugenddienst_Stunden.Types {
|
||||
public class Freistellung {
|
||||
public string Id { get; set; }
|
||||
public string Name { get; set; }
|
||||
}
|
||||
namespace Jugenddienst_Stunden.Types;
|
||||
public class Freistellung {
|
||||
public string Id { get; set; }
|
||||
public string Name { get; set; }
|
||||
}
|
||||
|
||||
@@ -4,20 +4,19 @@ using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Jugenddienst_Stunden.Types
|
||||
{
|
||||
/// <summary>
|
||||
/// Repräsentiert eine Gemeinde mit einer eindeutigen Id und einem Namen.
|
||||
/// </summary>
|
||||
public class Gemeinde {
|
||||
/// <summary>
|
||||
/// Eindeutige Id der Gemeinde.
|
||||
/// </summary>
|
||||
public int Id { get; set; }
|
||||
namespace Jugenddienst_Stunden.Types;
|
||||
|
||||
/// <summary>
|
||||
/// Name der Gemeinde.
|
||||
/// </summary>
|
||||
public string Name { get; set; }
|
||||
}
|
||||
/// <summary>
|
||||
/// Repräsentiert eine Gemeinde mit einer eindeutigen Id und einem Namen.
|
||||
/// </summary>
|
||||
public class Gemeinde {
|
||||
/// <summary>
|
||||
/// Eindeutige Id der Gemeinde.
|
||||
/// </summary>
|
||||
public int Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Name der Gemeinde.
|
||||
/// </summary>
|
||||
public string Name { get; set; }
|
||||
}
|
||||
|
||||
@@ -1,48 +1,45 @@
|
||||
|
||||
using CommunityToolkit.Mvvm.ComponentModel;
|
||||
using Jugenddienst_Stunden.Models;
|
||||
using Newtonsoft.Json;
|
||||
using System.Collections.ObjectModel;
|
||||
|
||||
namespace Jugenddienst_Stunden.Types
|
||||
{
|
||||
public class Hours : ObservableObject
|
||||
{
|
||||
public string zeit;
|
||||
public string nominal;
|
||||
//public Dictionary<DateOnly,NominalDay> nominal_day_api;
|
||||
public List<NominalDay> nominal_day_api;
|
||||
//public Dictionary<int,NominalWeek> nominal_week_api;
|
||||
public List<NominalWeek> nominal_week_api;
|
||||
//public List<string> time_line;
|
||||
public string zeit_total;
|
||||
namespace Jugenddienst_Stunden.Types;
|
||||
|
||||
//https://stackoverflow.com/questions/29449641/deserialize-json-when-a-value-can-be-an-object-or-an-empty-array/29450279#29450279
|
||||
//[JsonConverter(typeof(JsonSingleOrEmptyArrayConverter<Hours>))]
|
||||
//public Dictionary<int,decimal> zeit_total_daily;
|
||||
public class Hours : ObservableObject {
|
||||
public string zeit;
|
||||
public string nominal;
|
||||
//public Dictionary<DateOnly,NominalDay> nominal_day_api;
|
||||
public List<NominalDay> nominal_day_api;
|
||||
//public Dictionary<int,NominalWeek> nominal_week_api;
|
||||
public List<NominalWeek> nominal_week_api;
|
||||
//public List<string> time_line;
|
||||
public string zeit_total;
|
||||
|
||||
public List<TimeDay> zeit_total_daily_api;
|
||||
public List<DayTime> daytime;
|
||||
//public List<string> wochensumme;
|
||||
public string overtime_month;
|
||||
public string overtime;
|
||||
//public List<string> overtime_day;
|
||||
public string zeitausgleich;
|
||||
public string zeitausgleich_month;
|
||||
public string holiday;
|
||||
public string krankheit;
|
||||
public string weiterbildung;
|
||||
public string bereitschaft;
|
||||
public string bereitschaft_month;
|
||||
//public Operator operator_api;
|
||||
public DateTime Today;
|
||||
public DateTime Date;
|
||||
public DateTime MinDate;
|
||||
public DateTime MaxDate;
|
||||
public Collection<Projekt> Projekte { get; set; }
|
||||
public Collection<Gemeinde> Gemeinden { get; set; }
|
||||
public Collection<Freistellung> Freistellungen { get; set; }
|
||||
public int EmployeeId { get; set; }
|
||||
//https://stackoverflow.com/questions/29449641/deserialize-json-when-a-value-can-be-an-object-or-an-empty-array/29450279#29450279
|
||||
//[JsonConverter(typeof(JsonSingleOrEmptyArrayConverter<Hours>))]
|
||||
//public Dictionary<int,decimal> zeit_total_daily;
|
||||
|
||||
public List<TimeDay> zeit_total_daily_api;
|
||||
public List<DayTime> daytime;
|
||||
//public List<string> wochensumme;
|
||||
public string overtime_month;
|
||||
public string overtime;
|
||||
//public List<string> overtime_day;
|
||||
public string zeitausgleich;
|
||||
public string zeitausgleich_month;
|
||||
public string holiday;
|
||||
public string krankheit;
|
||||
public string weiterbildung;
|
||||
public string bereitschaft;
|
||||
public string bereitschaft_month;
|
||||
//public Operator operator_api;
|
||||
public DateTime Today;
|
||||
public DateTime Date;
|
||||
public DateTime MinDate;
|
||||
public DateTime MaxDate;
|
||||
public Collection<Projekt> Projekte { get; set; }
|
||||
public Collection<Gemeinde> Gemeinden { get; set; }
|
||||
public Collection<Freistellung> Freistellungen { get; set; }
|
||||
public int EmployeeId { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,11 +4,10 @@ using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Jugenddienst_Stunden.Models {
|
||||
public class NominalDay {
|
||||
public int day_number;
|
||||
public int month_number;
|
||||
public decimal hours;
|
||||
public DateOnly date;
|
||||
}
|
||||
namespace Jugenddienst_Stunden.Types;
|
||||
public class NominalDay {
|
||||
public int day_number;
|
||||
public int month_number;
|
||||
public decimal hours;
|
||||
public DateOnly date;
|
||||
}
|
||||
|
||||
@@ -4,11 +4,10 @@ using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Jugenddienst_Stunden.Types
|
||||
{
|
||||
namespace Jugenddienst_Stunden.Types;
|
||||
|
||||
public class NominalWeek
|
||||
{
|
||||
public int week_number;
|
||||
public decimal hours;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,20 +4,19 @@ using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Jugenddienst_Stunden.Types
|
||||
{
|
||||
/// <summary>
|
||||
/// Repräsentiert ein Projekt mit einer eindeutigen ID und einem Namen.
|
||||
/// </summary>
|
||||
public class Projekt {
|
||||
/// <summary>
|
||||
/// Holt oder setzt die eindeutige ID des Projekts.
|
||||
/// </summary>
|
||||
public int Id { get; set; }
|
||||
namespace Jugenddienst_Stunden.Types;
|
||||
|
||||
/// <summary>
|
||||
/// Holt oder setzt den Namen des Projekts.
|
||||
/// </summary>
|
||||
public string Name { get; set; }
|
||||
}
|
||||
/// <summary>
|
||||
/// Repräsentiert ein Projekt mit einer eindeutigen ID und einem Namen.
|
||||
/// </summary>
|
||||
public class Projekt {
|
||||
/// <summary>
|
||||
/// Holt oder setzt die eindeutige ID des Projekts.
|
||||
/// </summary>
|
||||
public int Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Holt oder setzt den Namen des Projekts.
|
||||
/// </summary>
|
||||
public string Name { get; set; }
|
||||
}
|
||||
|
||||
@@ -4,11 +4,10 @@ using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Jugenddienst_Stunden.Types
|
||||
{
|
||||
namespace Jugenddienst_Stunden.Types;
|
||||
|
||||
public class TimeDay
|
||||
{
|
||||
public int Day { get; set; }
|
||||
public decimal Hours { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,11 +4,10 @@ using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Jugenddienst_Stunden.Types
|
||||
{
|
||||
namespace Jugenddienst_Stunden.Types;
|
||||
|
||||
internal class Timetable
|
||||
{
|
||||
public List<TimetableEntry> timetable;
|
||||
public decimal wochensumme;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,12 +4,11 @@ using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Jugenddienst_Stunden.Types
|
||||
{
|
||||
namespace Jugenddienst_Stunden.Types;
|
||||
|
||||
internal class TimetableEntry
|
||||
{
|
||||
public List<TimeOnly>? von;
|
||||
public List<TimeOnly>? bis;
|
||||
public decimal summe { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user