Correction modification absences

Une seule absence est maintenant modifiée lors d'une modification.
This commit is contained in:
Erwann PHILIPPE 2025-06-04 19:25:15 +02:00
parent abe5d4ce1f
commit 28b4ef39bb
10 changed files with 3 additions and 1 deletions

View file

@ -71,6 +71,7 @@ namespace projet.View
textBoxDateDebut.Clear(); textBoxDateDebut.Clear();
textBoxDateFin.Clear(); textBoxDateFin.Clear();
comboBoxMotif.SelectedIndex = -1; // Réinitialiser la sélection du motif comboBoxMotif.SelectedIndex = -1; // Réinitialiser la sélection du motif
RemplirComboBoxAbsence();
} }
else else
{ {

View file

@ -108,6 +108,7 @@
// //
// textBoxDateDebut // textBoxDateDebut
// //
this.textBoxDateDebut.Enabled = false;
this.textBoxDateDebut.Font = new System.Drawing.Font("Segoe UI", 10F); this.textBoxDateDebut.Font = new System.Drawing.Font("Segoe UI", 10F);
this.textBoxDateDebut.Location = new System.Drawing.Point(231, 267); this.textBoxDateDebut.Location = new System.Drawing.Point(231, 267);
this.textBoxDateDebut.Name = "textBoxDateDebut"; this.textBoxDateDebut.Name = "textBoxDateDebut";

View file

@ -122,7 +122,7 @@ namespace projet.dal
{ {
if (access.Manager != null) if (access.Manager != null)
{ {
string req = "UPDATE absence SET dateFin = @dateFin, idMotif = @idMotif WHERE idPersonnel = @idPersonnel AND dateDebut = @dateDebut;"; string req = "UPDATE absence SET dateFin = @dateFin WHERE idPersonnel = @idPersonnel AND dateDebut = @dateDebut AND idMotif = @idMotif;";
var parameters = new Dictionary<string, object> var parameters = new Dictionary<string, object>
{ {
{ "@idPersonnel", personne.IdPersonnel }, { "@idPersonnel", personne.IdPersonnel },