From abad40c9f6a0f7927d102691efcea857edf8d33b Mon Sep 17 00:00:00 2001 From: sermandm <sermand.maxim@icloud.com> Date: Thu, 20 Mar 2025 15:58:50 +0100 Subject: [PATCH] =?UTF-8?q?changement=20du=20nom=20de=20la=20variable=20nb?= =?UTF-8?q?personne=20par=20nbinvite=20dans=20la=20r=C3=A9servation?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Models/Reservation.cs | 2 +- Views/Reservation/AjouterReservationPage.xaml.cs | 2 +- Views/Reservation/ModifierReservationPage.xaml.cs | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Models/Reservation.cs b/Models/Reservation.cs index a705b67..c375010 100644 --- a/Models/Reservation.cs +++ b/Models/Reservation.cs @@ -13,7 +13,7 @@ public class Reservation public string? DemandeSpecifique { get; set; } - public int NbPersonnes { get; set; } + public int NbInvite { get; set; } public int ClientId { get; set; } public int ChambreId { get; set; } diff --git a/Views/Reservation/AjouterReservationPage.xaml.cs b/Views/Reservation/AjouterReservationPage.xaml.cs index 74a7458..33b0b19 100644 --- a/Views/Reservation/AjouterReservationPage.xaml.cs +++ b/Views/Reservation/AjouterReservationPage.xaml.cs @@ -69,7 +69,7 @@ namespace HegreHotel.Views.Reservation { ClientId = _clients[PickerClient.SelectedIndex].Id, ChambreId = _chambresDispo[PickerChambre.SelectedIndex].Id, - NbPersonnes = int.TryParse(EntryNbPersonne.Text, out int nb) ? nb : 0, + NbInvite = int.TryParse(EntryNbPersonne.Text, out int nb) ? nb : 0, DateDebut = DatePickerDebut.Date, DateFin = DatePickerFin.Date, DemandeSpecifique = EntryDemandeSpecifique.Text diff --git a/Views/Reservation/ModifierReservationPage.xaml.cs b/Views/Reservation/ModifierReservationPage.xaml.cs index 3c4e6d1..8d589d1 100644 --- a/Views/Reservation/ModifierReservationPage.xaml.cs +++ b/Views/Reservation/ModifierReservationPage.xaml.cs @@ -34,7 +34,7 @@ namespace HegreHotel.Views.Reservation PickerClient.SelectedIndex = _clients.FindIndex(c => c.Id == _reservation.ClientId); PickerChambre.SelectedIndex = _chambres.FindIndex(ch => ch.Id == _reservation.ChambreId); - EntryNbPersonne.Text = _reservation.NbPersonnes.ToString(); + EntryNbPersonne.Text = _reservation.NbInvite.ToString(); DatePickerDebut.Date = _reservation.DateDebut; DatePickerFin.Date = _reservation.DateFin; EntryDemandeSpecifique.Text = _reservation.DemandeSpecifique; @@ -50,7 +50,7 @@ namespace HegreHotel.Views.Reservation _reservation.ClientId = _clients[PickerClient.SelectedIndex].Id; _reservation.ChambreId = _chambres[PickerChambre.SelectedIndex].Id; - _reservation.NbPersonnes = int.TryParse(EntryNbPersonne.Text, out int nb) ? nb : _reservation.NbPersonnes; + _reservation.NbInvite = int.TryParse(EntryNbPersonne.Text, out int nb) ? nb : _reservation.NbInvite; _reservation.DateDebut = DatePickerDebut.Date; _reservation.DateFin = DatePickerFin.Date; _reservation.DemandeSpecifique = EntryDemandeSpecifique.Text;