avent sup hu
This commit is contained in:
@@ -53,6 +53,8 @@
|
||||
</ListView>
|
||||
</DockPanel>-->
|
||||
<control:Repa x:Name="RepasMatin"></control:Repa>
|
||||
<control:Repa Grid.Column="1" x:Name="RepasMidi"></control:Repa>
|
||||
<control:Repa Grid.Column="2" x:Name="RepasSoir"></control:Repa>
|
||||
|
||||
<materialDesign:PackIcon Kind="Build" Grid.Column="2" HorizontalAlignment="Right" Cursor="Hand"/>
|
||||
|
||||
|
||||
@@ -70,7 +70,7 @@ namespace ProjetTheAlone.View
|
||||
Rm.Quand = "Matin";
|
||||
Console.WriteLine($"~~~~~~{Rm.ListPlat[0].P_nom}~~~~~~");
|
||||
|
||||
RepasMatin.DataContext = Rm;
|
||||
RepasMatin.DataContext = RepasMidi.DataContext = RepasSoir.DataContext = Rm;
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -5,58 +5,68 @@
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:local="clr-namespace:ProjetTheAlone.View"
|
||||
mc:Ignorable="d"
|
||||
Title="Bénéficiaire" Height="300" Width="300" WindowStartupLocation="CenterScreen">
|
||||
<Grid>
|
||||
Title="Bénéficiaire" Height="482.167" Width="955.5" WindowStartupLocation="CenterScreen" WindowStyle="None">
|
||||
<Grid Margin="0,-3,2,2">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="Auto" />
|
||||
|
||||
</Grid.RowDefinitions>
|
||||
<Grid Name="UneFiche" IsEnabled="{Binding Path=ActiverUneFiche, Mode=OneWay}" >
|
||||
<Label Content="Bénéficiaire" HorizontalAlignment="Left" Margin="31,20,0,0" VerticalAlignment="Top" FontFamily="Calibri" FontSize="20"/>
|
||||
<Grid x:Name="UneFiche" IsEnabled="{Binding ActiverUneFiche, Mode=OneWay}" Margin="548,49,106,256" >
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Name="tPre" Text="Prénom" Grid.Row="1" VerticalAlignment="Center" />
|
||||
<TextBox Name="tbPre" Grid.Row="1" Grid.Column="1" Margin="3"
|
||||
Text="{Binding Path=UnePersonne.Pre, Mode=TwoWay}" />
|
||||
<TextBlock Name="tNom" Text="Nom" Grid.Row="2" VerticalAlignment="Center" />
|
||||
<TextBox Name="tbNom" Grid.Row="2" Grid.Column="1" Margin="3"
|
||||
Text="{Binding Path=UnePersonne.Nom, Mode=TwoWay}" />
|
||||
<TextBlock Name="tNai" Text="Date Naissance" Grid.Row="3" VerticalAlignment="Center" />
|
||||
<DatePicker Name="dpNai" Grid.Row="3" Grid.Column="1" Margin="3"
|
||||
Text="{Binding Path=UnePersonne.Nai, Mode=TwoWay}"
|
||||
DisplayDate="{Binding Path=UnePersonne.Nai, Mode=TwoWay}" />
|
||||
<TextBlock x:Name="tPre" Text="Prénom" Grid.Row="1" VerticalAlignment="Center" />
|
||||
<TextBox x:Name="tbPre" Grid.Row="1" Grid.Column="1" Margin="3"
|
||||
Text="{Binding UnBeneficiaire.Pre, Mode=TwoWay}" />
|
||||
<TextBlock x:Name="tNom" Text="Nom" Grid.Row="2" VerticalAlignment="Center" />
|
||||
<TextBox x:Name="tbNom" Grid.Row="2" Grid.Column="1" Margin="3"
|
||||
Text="{Binding UnBeneficiaire.Nom, Mode=TwoWay}" />
|
||||
<TextBlock x:Name="tNai" Text="Date Naissance" Grid.Row="3" VerticalAlignment="Center" />
|
||||
<DatePicker x:Name="dpNai" Grid.Row="3" Grid.Column="1" Margin="3"
|
||||
Text="{Binding UnBeneficiaire.Nai, Mode=TwoWay}"
|
||||
DisplayDate="{Binding UnBeneficiaire.Nai, Mode=TwoWay}" />
|
||||
<TextBlock x:Name="tImg" Text="Photo" Grid.Row="4" VerticalAlignment="Center" Margin="0,56,0,10" />
|
||||
<DockPanel Margin="10,10,10,10" Grid.Row="4" Grid.Column="1">
|
||||
<WrapPanel HorizontalAlignment="Right" DockPanel.Dock="Top" >
|
||||
<Image x:Name="ImageFile" Height="40" HorizontalAlignment="Right" VerticalAlignment="Top" Width="90"/>
|
||||
<Button x:Name="btnOpenFile" HorizontalAlignment="Right" Click="btnOpenFile_Click" Content="Open file"/>
|
||||
</WrapPanel>
|
||||
<TextBox x:Name="txtEditor" />
|
||||
|
||||
</DockPanel>
|
||||
</Grid>
|
||||
<StackPanel Orientation="Horizontal" Grid.Row="1" HorizontalAlignment="Center">
|
||||
<Button Name="bConfirmer" Content="Confirmer" Margin="3" IsEnabled="{Binding Path=ActiverUneFiche, Mode=OneWay}"
|
||||
Command="{Binding cConfirmer}" />
|
||||
<Button Name="bAnnuler" Content="Annuler" Margin="3" IsEnabled="{Binding Path=ActiverUneFiche, Mode=OneWay}"
|
||||
Command="{Binding cAnnuler}" />
|
||||
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Margin="678,237,78,140" Width="190">
|
||||
<Button x:Name="bConfirmer" Content="Confirmer" Margin="3" IsEnabled="{Binding ActiverUneFiche, Mode=OneWay}"
|
||||
Command="{Binding cConfirmer}" />
|
||||
<Button x:Name="bAnnuler" Content="Annuler" Margin="3,16,3,17" IsEnabled="{Binding ActiverUneFiche, Mode=OneWay}"
|
||||
Command="{Binding cAnnuler}" />
|
||||
</StackPanel>
|
||||
<DataGrid ItemsSource="{Binding Path=BcpPersonnes}" Grid.Row="2" VerticalScrollBarVisibility="Visible"
|
||||
IsReadOnly="True" AutoGenerateColumns="False" IsEnabled="{Binding Path=ActiverBcpFiche, Mode=OneWay}"
|
||||
SelectedItem="{Binding PersonneSelectionnee, Mode=TwoWay}" >
|
||||
<DataGrid ItemsSource="{Binding BcpBeneficiaire}" VerticalScrollBarVisibility="Visible"
|
||||
IsReadOnly="True" AutoGenerateColumns="False" IsEnabled="{Binding ActiverBcpFiche, Mode=OneWay}"
|
||||
SelectedItem="{Binding BeneficiaireSelectionnee, Mode=TwoWay}" Margin="88,82,566,149" >
|
||||
<DataGrid.Columns>
|
||||
<DataGridTextColumn Visibility="Hidden" Binding="{Binding Path=ID}" />
|
||||
<DataGridTextColumn Header="Prénom" Binding="{Binding Path=Pre}" Width="*" />
|
||||
<DataGridTextColumn Header="Nom" Binding="{Binding Path=Nom}" Width="*" />
|
||||
<DataGridTextColumn Visibility="Hidden" Binding="{Binding ID}" />
|
||||
<DataGridTextColumn Header="Prénom" Binding="{Binding Pre}" Width="*" />
|
||||
<DataGridTextColumn Header="Nom" Binding="{Binding Nom}" Width="*" />
|
||||
</DataGrid.Columns>
|
||||
</DataGrid>
|
||||
<StackPanel Orientation="Horizontal" Grid.Row="3" HorizontalAlignment="Center">
|
||||
<Button Name="bAjouter" Content="Ajouter" Margin="3" IsEnabled="{Binding Path=ActiverBcpFiche, Mode=OneWay}"
|
||||
Command="{Binding cAjouter}" />
|
||||
<Button Name="bModifier" Content="Modifier" Margin="3" IsEnabled="{Binding Path=ActiverBcpFiche, Mode=OneWay}"
|
||||
Command="{Binding cModifier}" />
|
||||
<Button Name="bSupprimer" Content="Supprimer" Margin="3" IsEnabled="{Binding Path=ActiverBcpFiche, Mode=OneWay}"
|
||||
Command="{Binding cSupprimer}" />
|
||||
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Margin="88,331,576,46" Width="282">
|
||||
<Button x:Name="bAjouter" Content="Ajouter" Margin="3" IsEnabled="{Binding ActiverBcpFiche, Mode=OneWay}"
|
||||
Command="{Binding cAjouter}" />
|
||||
<Button x:Name="bModifier" Content="Modifier" Margin="3" IsEnabled="{Binding ActiverBcpFiche, Mode=OneWay}"
|
||||
Command="{Binding cModifier}" />
|
||||
<Button x:Name="bSupprimer" Content="Supprimer" Margin="3" IsEnabled="{Binding ActiverBcpFiche, Mode=OneWay}"
|
||||
Command="{Binding cSupprimer}" />
|
||||
</StackPanel>
|
||||
<Button x:Name="BtnQuitter" Content="Quitter" HorizontalAlignment="Left" Margin="810,403,0,0" VerticalAlignment="Top" Width="92" Click="BtnQuitter_Click" Height="26"/>
|
||||
|
||||
</Grid>
|
||||
</Window>
|
||||
|
||||
@@ -11,6 +11,8 @@ using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Shapes;
|
||||
using System.IO;
|
||||
using Microsoft.Win32;
|
||||
|
||||
namespace ProjetTheAlone.View
|
||||
{
|
||||
@@ -22,6 +24,29 @@ namespace ProjetTheAlone.View
|
||||
public FicBeneficiaireEncode()
|
||||
{
|
||||
InitializeComponent();
|
||||
// DataContext = new ViewModel.VM_Beneficiaire();
|
||||
}
|
||||
|
||||
private void BtnQuitter_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
Close();
|
||||
}
|
||||
|
||||
private void btnOpenFile_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
OpenFileDialog openFileDialog = new OpenFileDialog();
|
||||
openFileDialog.Filter = "Image files (*.png;*.jpeg)|*.png;*.jpeg|All files (*.*)|*.*";
|
||||
if (openFileDialog.ShowDialog() == true)
|
||||
{ string FileName = openFileDialog.FileName;
|
||||
|
||||
txtEditor.Text = FileName;
|
||||
|
||||
//FileStream fs = new System.IO.FileStream(@""+FileName+"", FileMode.Open, FileAccess.Read);
|
||||
//BinaryReader br = new BinaryReader(fs);
|
||||
//byte[] result = br.ReadBytes((int)fs.Length);
|
||||
|
||||
ImageFile.Source = new BitmapImage(new Uri(@"" + FileName + ""));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,19 +7,18 @@
|
||||
mc:Ignorable="d"
|
||||
Title="FicRepas" Height="491.666" Width="1137.834" WindowStartupLocation="CenterScreen" WindowStyle="None">
|
||||
<Grid>
|
||||
<Button x:Name="btnQuitter" Margin="974,427,29,26"
|
||||
Content="Quitter" RenderTransformOrigin="0.017,0.519" Click="btnQuitter_Click">
|
||||
<Button.RenderTransform>
|
||||
<TransformGroup>
|
||||
<ScaleTransform/>
|
||||
<SkewTransform AngleY="0.047"/>
|
||||
<RotateTransform Angle="0.162"/>
|
||||
<TranslateTransform/>
|
||||
</TransformGroup>
|
||||
</Button.RenderTransform>
|
||||
</Button>
|
||||
<Calendar HorizontalAlignment="Left" Margin="32,16,0,0" VerticalAlignment="Top"/>
|
||||
<ListView x:Name="lvPlat" Margin="334,39,627,283">
|
||||
<Button x:Name="btnQuitter" Margin="974,414,29,25"
|
||||
Content="Quitter" RenderTransformOrigin="0.017,0.519" Click="btnQuitter_Click" Height="Auto"/>
|
||||
|
||||
<StackPanel Margin="544,117,444,202">
|
||||
<Label Content="Type de plat" FontFamily="Calibri" FontSize="16" Height="40"/>
|
||||
<CheckBox Name="CheckSoupe" Content="Soupe" FontFamily="Calibri" FontSize="14" Height="40" Checked="CheckSoupe_Checked"/>
|
||||
<CheckBox Name="CheckPlatP" Content="Plat principal" FontFamily="Calibri" FontSize="14" Height="40" Checked="CheckPlatP_Checked"/>
|
||||
<CheckBox Name="CheckDessert" Content="Dessert" FontFamily="Calibri" FontSize="14" Height="40" Checked="CheckDessert_Checked"/>
|
||||
</StackPanel>
|
||||
|
||||
<Calendar HorizontalAlignment="Left" Margin="51,103,0,0" VerticalAlignment="Top"/>
|
||||
<ListView x:Name="lvPlat" Margin="352,107,609,215">
|
||||
<ListView.View>
|
||||
<GridView>
|
||||
<GridViewColumn Width="160" Header="Plats"/>
|
||||
@@ -27,6 +26,7 @@
|
||||
</GridView>
|
||||
</ListView.View>
|
||||
</ListView>
|
||||
<Label Content="Repas" HorizontalAlignment="Left" Margin="51,30,0,0" VerticalAlignment="Top" FontFamily="Calibri" FontSize="20"/>
|
||||
|
||||
</Grid>
|
||||
</Window>
|
||||
@@ -28,5 +28,23 @@ namespace ProjetTheAlone.View
|
||||
{
|
||||
Close();
|
||||
}
|
||||
|
||||
private void CheckSoupe_Checked(object sender, RoutedEventArgs e)
|
||||
{
|
||||
CheckPlatP.IsChecked = false;
|
||||
CheckDessert.IsChecked = false;
|
||||
}
|
||||
|
||||
private void CheckPlatP_Checked(object sender, RoutedEventArgs e)
|
||||
{
|
||||
CheckDessert.IsChecked = false;
|
||||
CheckSoupe.IsChecked = false;
|
||||
}
|
||||
|
||||
private void CheckDessert_Checked(object sender, RoutedEventArgs e)
|
||||
{
|
||||
CheckPlatP.IsChecked = false;
|
||||
CheckSoupe.IsChecked = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user