Encode repas all work !
This commit is contained in:
parent
ceffc1446e
commit
589d08fc30
|
@ -33,6 +33,7 @@
|
||||||
<DataGrid.Columns>
|
<DataGrid.Columns>
|
||||||
<DataGridTextColumn Visibility="Hidden" Binding="{Binding ID_plat}" />
|
<DataGridTextColumn Visibility="Hidden" Binding="{Binding ID_plat}" />
|
||||||
<DataGridTextColumn Header="Plat" Binding="{Binding P_nom}" Width="*" />
|
<DataGridTextColumn Header="Plat" Binding="{Binding P_nom}" Width="*" />
|
||||||
|
<DataGridTextColumn Header="Type de plat" Binding="{Binding ID_typePlat}" Width="auto" />
|
||||||
</DataGrid.Columns>
|
</DataGrid.Columns>
|
||||||
</DataGrid>
|
</DataGrid>
|
||||||
|
|
||||||
|
@ -40,21 +41,25 @@
|
||||||
Content="Gestion Plat" Click="btnPlat_Click" Height="30" Grid.Column="1" VerticalAlignment="Bottom" Grid.Row="1"/>
|
Content="Gestion Plat" Click="btnPlat_Click" Height="30" Grid.Column="1" VerticalAlignment="Bottom" Grid.Row="1"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
<Button x:Name="btnAddPlat"
|
<Button x:Name="btnAddPlat"
|
||||||
Content="->" Click="btnAddPlat_Click" Height="30" Width="100" VerticalAlignment="Center" Grid.Column="2"/>
|
Content="->" Click="btnAddPlat_Click" Height="30" Width="auto" VerticalAlignment="Center" Grid.Column="2"
|
||||||
|
ToolTip="Ajouter aux plat sélectionné"/>
|
||||||
<Button x:Name="retirerPlat" Click="retirerPlat_Click"
|
<Button x:Name="retirerPlat" Click="retirerPlat_Click"
|
||||||
Content="-" Height="30" Width="100" VerticalAlignment="Center" Grid.Column="2" Margin="0,262,0,192"/>
|
Content="-" Height="30" Width="auto" VerticalAlignment="Center" Grid.Column="2" Margin="0,262,0,192"
|
||||||
|
ToolTip="Suprimer des plats sélectionné"/>
|
||||||
<Grid Grid.Column="3">
|
<Grid Grid.Column="3">
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="Auto"></RowDefinition>
|
<RowDefinition Height="Auto"></RowDefinition>
|
||||||
<RowDefinition Height="*"></RowDefinition>
|
<RowDefinition Height="*"></RowDefinition>
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
<TextBlock FontFamily="Calibri" FontSize="20" HorizontalAlignment="Center">Lisst des plat selectionné</TextBlock>
|
<TextBlock FontFamily="Calibri" FontSize="20" HorizontalAlignment="Center">Lisst des plat selectionné</TextBlock>
|
||||||
|
|
||||||
<DataGrid x:Name="dgLPS" ItemsSource="{Binding BcpPLatJourSelectionne}" VerticalScrollBarVisibility="Visible"
|
<DataGrid x:Name="dgLPS" ItemsSource="{Binding BcpPLatJourSelectionne}" VerticalScrollBarVisibility="Visible"
|
||||||
IsReadOnly="True" AutoGenerateColumns="False"
|
IsReadOnly="True" AutoGenerateColumns="False" IsEnabled="{Binding ActiverBcpFiche, Mode=OneWay}"
|
||||||
SelectedItem="{Binding PlatSelectionnee, Mode=TwoWay}" Grid.Row="1" Height="auto">
|
SelectedItem="{Binding PlatSelectionnee, Mode=TwoWay}" Grid.Row="1" Height="auto">
|
||||||
<DataGrid.Columns>
|
<DataGrid.Columns>
|
||||||
<DataGridTextColumn Visibility="Hidden" Binding="{Binding ID_plat}" />
|
<DataGridTextColumn Visibility="Hidden" Binding="{Binding ID_plat}" />
|
||||||
<DataGridTextColumn Header="Plat" Binding="{Binding P_nom}" Width="*" />
|
<DataGridTextColumn Header="Plat" Binding="{Binding P_nom}" Width="*" />
|
||||||
|
<DataGridTextColumn Header="Type de plat" Binding="{Binding ID_typePlat}" Width="auto" />
|
||||||
</DataGrid.Columns>
|
</DataGrid.Columns>
|
||||||
</DataGrid>
|
</DataGrid>
|
||||||
|
|
||||||
|
|
|
@ -104,9 +104,9 @@ namespace ProjetTheAlone.View
|
||||||
{
|
{
|
||||||
//((ViewModel.VM_Plat)dgPlat.DataContext).BcpPlats.Add();
|
//((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());
|
((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);
|
new Gestion.G_T_listPlat(Config.Settings1.Default.schCon).Supprimer(plat.ID_plat, DateV.SelectedDate.Value);
|
||||||
}
|
}
|
||||||
|
|
|
@ -40,7 +40,7 @@ namespace ProjetTheAlone.ViewModel
|
||||||
cConfirmer = new BaseCommande(Confirmer);
|
cConfirmer = new BaseCommande(Confirmer);
|
||||||
cSupprimer = new BaseCommande(Supprimer);
|
cSupprimer = new BaseCommande(Supprimer);
|
||||||
cSupprimer = new BaseCommande(calendar_SelectedDatesChanged);
|
cSupprimer = new BaseCommande(calendar_SelectedDatesChanged);
|
||||||
DateSelection = DateTime.Now.AddDays(7);
|
DateSelection = DateTime.Now;
|
||||||
BcpPlats = ChargerRepa(chConnexion);
|
BcpPlats = ChargerRepa(chConnexion);
|
||||||
BcpPLatJourSelectionne = ChargerRepa(chConnexion, DateSelection);
|
BcpPLatJourSelectionne = ChargerRepa(chConnexion, DateSelection);
|
||||||
base.PropertyChanged += new System.ComponentModel.PropertyChangedEventHandler(onPropertyChanged);
|
base.PropertyChanged += new System.ComponentModel.PropertyChangedEventHandler(onPropertyChanged);
|
||||||
|
|
Loading…
Reference in New Issue