mediatek86/Mediatek86/Controller/ModifierAbsenceController.cs

44 lines
1.2 KiB
C#
Raw Normal View History

using projet.dal;
using projet.modele;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
2025-06-04 17:10:08 +00:00
namespace Mediatek86.Controller
{
2025-06-04 17:10:08 +00:00
internal class ModifierAbsenceController
{
2025-06-04 17:10:08 +00:00
private readonly ServiceAccess serviceAccess;
private readonly AbsenceAccess absenceAccess;
private readonly MotifAccess motifAccess;
2025-06-04 17:10:08 +00:00
public ModifierAbsenceController()
{
2025-06-04 17:10:08 +00:00
serviceAccess = new ServiceAccess();
absenceAccess = new AbsenceAccess();
motifAccess = new MotifAccess();
}
public List<Motif> GetAllMotifs()
{
return motifAccess.GetAllMotifs();
}
2025-06-04 17:10:08 +00:00
public void ModifierAbsence(Absence absence, Personnel personne)
{
2025-06-04 17:10:08 +00:00
absenceAccess.ModifierAbsence(absence, personne);
}
public int GetMotifIdByLibelle(string libelle)
{
return motifAccess.GetMotifIdByLibelle(libelle);
}
2025-06-04 17:10:08 +00:00
public Motif GetMotifById(int id)
{
return motifAccess.GetMotifById(id);
}
public string GetLibelleById(int id)
{
return motifAccess.GetLibelleById(id);
}
}
}