diff --git a/ProjetTheAlone/View/FicRepasEncode.xaml b/ProjetTheAlone/View/FicRepasEncode.xaml
index fc4918b..9ed815c 100644
--- a/ProjetTheAlone/View/FicRepasEncode.xaml
+++ b/ProjetTheAlone/View/FicRepasEncode.xaml
@@ -33,28 +33,33 @@
-
+
+
+ Content="->" Click="btnAddPlat_Click" Height="30" Width="auto" VerticalAlignment="Center" Grid.Column="2"
+ ToolTip="Ajouter aux plat sélectionné"/>
+ Content="-" Height="30" Width="auto" VerticalAlignment="Center" Grid.Column="2" Margin="0,262,0,192"
+ ToolTip="Suprimer des plats sélectionné"/>
Lisst des plat selectionné
+
+
diff --git a/ProjetTheAlone/View/FicRepasEncode.xaml.cs b/ProjetTheAlone/View/FicRepasEncode.xaml.cs
index ec99b52..23c9efc 100644
--- a/ProjetTheAlone/View/FicRepasEncode.xaml.cs
+++ b/ProjetTheAlone/View/FicRepasEncode.xaml.cs
@@ -104,9 +104,9 @@ namespace ProjetTheAlone.View
{
//((ViewModel.VM_Plat)dgPlat.DataContext).BcpPlats.Add();
- for (int i = 0; i < dgLPS.SelectedItems.Count; i++)
+ for (; 0 < dgLPS.SelectedItems.Count;)
{
- C_T_plat plat = (C_T_plat)dgLPS.SelectedItems[i];
+ C_T_plat plat = (C_T_plat)dgLPS.SelectedItems[0];
((ViewModel.VM_Repa)dgLPS.DataContext).BcpPLatJourSelectionne.Remove(((ViewModel.VM_Repa)dgLPS.DataContext).BcpPLatJourSelectionne.Where(ii => ii.ID_plat == plat.ID_plat).First());
new Gestion.G_T_listPlat(Config.Settings1.Default.schCon).Supprimer(plat.ID_plat, DateV.SelectedDate.Value);
}
diff --git a/ProjetTheAlone/ViewModel/EncodeRepas.cs b/ProjetTheAlone/ViewModel/EncodeRepas.cs
index 2a60905..e98c441 100644
--- a/ProjetTheAlone/ViewModel/EncodeRepas.cs
+++ b/ProjetTheAlone/ViewModel/EncodeRepas.cs
@@ -40,7 +40,7 @@ namespace ProjetTheAlone.ViewModel
cConfirmer = new BaseCommande(Confirmer);
cSupprimer = new BaseCommande(Supprimer);
cSupprimer = new BaseCommande(calendar_SelectedDatesChanged);
- DateSelection = DateTime.Now.AddDays(7);
+ DateSelection = DateTime.Now;
BcpPlats = ChargerRepa(chConnexion);
BcpPLatJourSelectionne = ChargerRepa(chConnexion, DateSelection);
base.PropertyChanged += new System.ComponentModel.PropertyChangedEventHandler(onPropertyChanged);