DashBoard dgv double click ok
This commit is contained in:
parent
79c532dc7c
commit
17331c389e
|
@ -90,6 +90,8 @@
|
||||||
<Compile Include="Outil\picToByteArray.cs" />
|
<Compile Include="Outil\picToByteArray.cs" />
|
||||||
<Compile Include="Outil\toByteArray.cs" />
|
<Compile Include="Outil\toByteArray.cs" />
|
||||||
<Compile Include="Outil\toNullableByteArray.cs" />
|
<Compile Include="Outil\toNullableByteArray.cs" />
|
||||||
|
<Compile Include="ViewModel\EncodeClassement.cs" />
|
||||||
|
<Compile Include="ViewModel\EncodeDetailEvent.cs" />
|
||||||
<Compile Include="ViewModel\EncodeEquipe.cs" />
|
<Compile Include="ViewModel\EncodeEquipe.cs" />
|
||||||
<Compile Include="ViewModel\EncodeEvent.cs" />
|
<Compile Include="ViewModel\EncodeEvent.cs" />
|
||||||
<Compile Include="ViewModel\EncodeLieu.cs" />
|
<Compile Include="ViewModel\EncodeLieu.cs" />
|
||||||
|
@ -100,6 +102,9 @@
|
||||||
<Compile Include="ViewModel\VM_DashBoard.cs" />
|
<Compile Include="ViewModel\VM_DashBoard.cs" />
|
||||||
<Compile Include="ViewModel\EventDGV_VM.cs" />
|
<Compile Include="ViewModel\EventDGV_VM.cs" />
|
||||||
<Compile Include="ViewModel\VM_FicGestionAlert.cs" />
|
<Compile Include="ViewModel\VM_FicGestionAlert.cs" />
|
||||||
|
<Compile Include="View\FicClassement.xaml.cs">
|
||||||
|
<DependentUpon>FicClassement.xaml</DependentUpon>
|
||||||
|
</Compile>
|
||||||
<Compile Include="View\FicDetailEvent.xaml.cs">
|
<Compile Include="View\FicDetailEvent.xaml.cs">
|
||||||
<DependentUpon>FicDetailEvent.xaml</DependentUpon>
|
<DependentUpon>FicDetailEvent.xaml</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
@ -192,6 +197,10 @@
|
||||||
<Compile Include="View\FicRepasEncode.xaml.cs">
|
<Compile Include="View\FicRepasEncode.xaml.cs">
|
||||||
<DependentUpon>FicRepasEncode.xaml</DependentUpon>
|
<DependentUpon>FicRepasEncode.xaml</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
<Page Include="View\FicClassement.xaml">
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
<Generator>XamlIntelliSenseFileGenerator</Generator>
|
||||||
|
</Page>
|
||||||
<Page Include="View\FicDetailEvent.xaml">
|
<Page Include="View\FicDetailEvent.xaml">
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
<Generator>MSBuild:Compile</Generator>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
|
|
|
@ -39,7 +39,7 @@
|
||||||
<ColumnDefinition />
|
<ColumnDefinition />
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<DataGrid x:Name="dgEventPasse2" ItemsSource="{Binding BcpEvent}" VerticalScrollBarVisibility="Visible"
|
<DataGrid x:Name="dgEventPasse2" ItemsSource="{Binding BcpEvent}" VerticalScrollBarVisibility="Visible"
|
||||||
IsReadOnly="True" AutoGenerateColumns="False" Height="auto">
|
IsReadOnly="True" AutoGenerateColumns="False" Height="auto" MouseDoubleClick="DgEvent_MouseDoubleClick">
|
||||||
|
|
||||||
<DataGrid.Columns>
|
<DataGrid.Columns>
|
||||||
<DataGridTextColumn Visibility="Hidden" Binding="{Binding ID_event}" />
|
<DataGridTextColumn Visibility="Hidden" Binding="{Binding ID_event}" />
|
||||||
|
@ -47,14 +47,14 @@
|
||||||
</DataGrid.Columns>
|
</DataGrid.Columns>
|
||||||
</DataGrid>
|
</DataGrid>
|
||||||
<DataGrid x:Name="dgEventPasse1" Grid.Column="1" ItemsSource="{Binding BcpEvent}" VerticalScrollBarVisibility="Visible"
|
<DataGrid x:Name="dgEventPasse1" Grid.Column="1" ItemsSource="{Binding BcpEvent}" VerticalScrollBarVisibility="Visible"
|
||||||
IsReadOnly="True" AutoGenerateColumns="False" Grid.Row="1" Height="auto">
|
IsReadOnly="True" AutoGenerateColumns="False" Grid.Row="1" Height="auto" MouseDoubleClick="DgEvent_MouseDoubleClick">
|
||||||
<DataGrid.Columns>
|
<DataGrid.Columns>
|
||||||
<DataGridTextColumn Visibility="Hidden" Binding="{Binding ID_event}" />
|
<DataGridTextColumn Visibility="Hidden" Binding="{Binding ID_event}" />
|
||||||
<DataGridTextColumn Header="Event Avent hier" Binding="{Binding E_description}" Width="*" />
|
<DataGridTextColumn Header="Event Avent hier" Binding="{Binding E_description}" Width="*" />
|
||||||
</DataGrid.Columns>
|
</DataGrid.Columns>
|
||||||
</DataGrid>
|
</DataGrid>
|
||||||
<DataGrid x:Name="dgEventPasse0" Grid.Column="2" ItemsSource="{Binding BcpEvent}" VerticalScrollBarVisibility="Visible"
|
<DataGrid x:Name="dgEventPasse0" Grid.Column="2" ItemsSource="{Binding BcpEvent}" VerticalScrollBarVisibility="Visible"
|
||||||
IsReadOnly="True" AutoGenerateColumns="False" Grid.Row="1" Height="auto">
|
IsReadOnly="True" AutoGenerateColumns="False" Grid.Row="1" Height="auto" MouseDoubleClick="DgEvent_MouseDoubleClick">
|
||||||
<DataGrid.Columns>
|
<DataGrid.Columns>
|
||||||
<DataGridTextColumn Visibility="Hidden" Binding="{Binding ID_event}" />
|
<DataGridTextColumn Visibility="Hidden" Binding="{Binding ID_event}" />
|
||||||
<DataGridTextColumn Header="Event Hier" Binding="{Binding E_description}" Width="*" />
|
<DataGridTextColumn Header="Event Hier" Binding="{Binding E_description}" Width="*" />
|
||||||
|
@ -88,21 +88,21 @@
|
||||||
|
|
||||||
|
|
||||||
<DataGrid x:Name="dgEventFuture0" Grid.Column="0" Grid.Row="2" ItemsSource="{Binding BcpEvent}" VerticalScrollBarVisibility="Visible"
|
<DataGrid x:Name="dgEventFuture0" Grid.Column="0" Grid.Row="2" ItemsSource="{Binding BcpEvent}" VerticalScrollBarVisibility="Visible"
|
||||||
IsReadOnly="True" AutoGenerateColumns="False" Height="auto">
|
IsReadOnly="True" AutoGenerateColumns="False" Height="auto" MouseDoubleClick="DgEvent_MouseDoubleClick">
|
||||||
<DataGrid.Columns>
|
<DataGrid.Columns>
|
||||||
<DataGridTextColumn Visibility="Hidden" Binding="{Binding ID_event}" />
|
<DataGridTextColumn Visibility="Hidden" Binding="{Binding ID_event}" />
|
||||||
<DataGridTextColumn Header="Event Aujourd'hui" Binding="{Binding E_description}" Width="*" />
|
<DataGridTextColumn Header="Event Aujourd'hui" Binding="{Binding E_description}" Width="*" />
|
||||||
</DataGrid.Columns>
|
</DataGrid.Columns>
|
||||||
</DataGrid>
|
</DataGrid>
|
||||||
<DataGrid x:Name="dgEventFuture1" Grid.Column="1" Grid.Row="2" ItemsSource="{Binding BcpEvent}" VerticalScrollBarVisibility="Visible"
|
<DataGrid x:Name="dgEventFuture1" Grid.Column="1" Grid.Row="2" ItemsSource="{Binding BcpEvent}" VerticalScrollBarVisibility="Visible"
|
||||||
IsReadOnly="True" AutoGenerateColumns="False" Height="auto">
|
IsReadOnly="True" AutoGenerateColumns="False" Height="auto" MouseDoubleClick="DgEvent_MouseDoubleClick">
|
||||||
<DataGrid.Columns>
|
<DataGrid.Columns>
|
||||||
<DataGridTextColumn Visibility="Hidden" Binding="{Binding ID_event}" />
|
<DataGridTextColumn Visibility="Hidden" Binding="{Binding ID_event}" />
|
||||||
<DataGridTextColumn Header="Event demain" Binding="{Binding E_description}" Width="*" />
|
<DataGridTextColumn Header="Event demain" Binding="{Binding E_description}" Width="*" />
|
||||||
</DataGrid.Columns>
|
</DataGrid.Columns>
|
||||||
</DataGrid>
|
</DataGrid>
|
||||||
<DataGrid x:Name="dgEventFuture2" Grid.Column="2" Grid.Row="2" ItemsSource="{Binding BcpEvent}" VerticalScrollBarVisibility="Visible"
|
<DataGrid x:Name="dgEventFuture2" Grid.Column="2" Grid.Row="2" ItemsSource="{Binding BcpEvent}" VerticalScrollBarVisibility="Visible"
|
||||||
IsReadOnly="True" AutoGenerateColumns="False" Height="auto">
|
IsReadOnly="True" AutoGenerateColumns="False" Height="auto" MouseDoubleClick="DgEvent_MouseDoubleClick">
|
||||||
<DataGrid.Columns>
|
<DataGrid.Columns>
|
||||||
<DataGridTextColumn Visibility="Hidden" Binding="{Binding ID_event}" />
|
<DataGridTextColumn Visibility="Hidden" Binding="{Binding ID_event}" />
|
||||||
<DataGridTextColumn Header="Event après demain" Binding="{Binding E_description}" Width="*" />
|
<DataGridTextColumn Header="Event après demain" Binding="{Binding E_description}" Width="*" />
|
||||||
|
|
|
@ -29,6 +29,7 @@ namespace ProjetTheAlone.View
|
||||||
{
|
{
|
||||||
ObservableCollection<string> cl = new ObservableCollection<string>();
|
ObservableCollection<string> cl = new ObservableCollection<string>();
|
||||||
RepaModel rm = new RepaModel();
|
RepaModel rm = new RepaModel();
|
||||||
|
View.FicDetailEvent W_detailEvent = null;
|
||||||
public ObservableCollection<string> Cl
|
public ObservableCollection<string> Cl
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
|
@ -61,6 +62,7 @@ namespace ProjetTheAlone.View
|
||||||
testQuand.DataContext = RepasAjd.DataContext = new RepaModel(DateTime.Now);
|
testQuand.DataContext = RepasAjd.DataContext = new RepaModel(DateTime.Now);
|
||||||
RepasDemain.DataContext = new RepaModel(DateTime.Now.AddDays(1));
|
RepasDemain.DataContext = new RepaModel(DateTime.Now.AddDays(1));
|
||||||
RepasApresDemain.DataContext = new RepaModel(DateTime.Now.AddDays(2));
|
RepasApresDemain.DataContext = new RepaModel(DateTime.Now.AddDays(2));
|
||||||
|
|
||||||
dgEventPasse2.DataContext = new EventDGV_VM(DateTime.Now.AddDays(-3));
|
dgEventPasse2.DataContext = new EventDGV_VM(DateTime.Now.AddDays(-3));
|
||||||
dgEventPasse1.DataContext = new EventDGV_VM(DateTime.Now.AddDays(-2));
|
dgEventPasse1.DataContext = new EventDGV_VM(DateTime.Now.AddDays(-2));
|
||||||
dgEventPasse0.DataContext = new EventDGV_VM(DateTime.Now.AddDays(-1));
|
dgEventPasse0.DataContext = new EventDGV_VM(DateTime.Now.AddDays(-1));
|
||||||
|
@ -97,6 +99,24 @@ namespace ProjetTheAlone.View
|
||||||
|
|
||||||
this.Alert.DataContext = new ViewModel.VM_DashBoard(this.Alert, "", 200);
|
this.Alert.DataContext = new ViewModel.VM_DashBoard(this.Alert, "", 200);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void DgEvent_MouseDoubleClick(object sender, MouseButtonEventArgs e)
|
||||||
|
{
|
||||||
|
if (((DataGrid)sender).SelectedItems.Count == 0)
|
||||||
|
return;
|
||||||
|
C_T_event _eventSelected = ((C_T_event)((DataGrid)sender).SelectedItem);
|
||||||
|
if(W_detailEvent == null || W_detailEvent != null && W_detailEvent.IsClosed)
|
||||||
|
{
|
||||||
|
W_detailEvent = new FicDetailEvent(_eventSelected);
|
||||||
|
|
||||||
|
}
|
||||||
|
if(!W_detailEvent.IsVisible)
|
||||||
|
{
|
||||||
|
W_detailEvent.Show();
|
||||||
|
}
|
||||||
|
W_detailEvent.Activate();
|
||||||
|
e.Handled = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
public class DebugDummyConverter : IValueConverter
|
public class DebugDummyConverter : IValueConverter
|
||||||
{
|
{
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
xmlns:local="clr-namespace:ProjetTheAlone.View"
|
xmlns:local="clr-namespace:ProjetTheAlone.View"
|
||||||
|
xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
Title="FicDetailEvent" Height="517.897" Width="638.259" WindowStartupLocation="CenterScreen" WindowStyle="None">
|
Title="FicDetailEvent" Height="517.897" Width="638.259" WindowStartupLocation="CenterScreen" WindowStyle="None">
|
||||||
<Grid Margin="0,0,2,2">
|
<Grid Margin="0,0,2,2">
|
||||||
|
@ -13,29 +14,33 @@
|
||||||
Content="Quitter" Click="btnQuitter_Click" Height="41" Margin="485,442,37,25" RenderTransformOrigin="1.189,1.927"/>
|
Content="Quitter" Click="btnQuitter_Click" Height="41" Margin="485,442,37,25" RenderTransformOrigin="1.189,1.927"/>
|
||||||
<Grid HorizontalAlignment="Left" Height="237" Margin="90,54,0,0" VerticalAlignment="Top" Width="450">
|
<Grid HorizontalAlignment="Left" Height="237" Margin="90,54,0,0" VerticalAlignment="Top" Width="450">
|
||||||
<Label Content="Type d'événement" HorizontalAlignment="Left" Width="120" Margin="0,0,0,202"/>
|
<Label Content="Type d'événement" HorizontalAlignment="Left" Width="120" Margin="0,0,0,202"/>
|
||||||
<TextBox HorizontalAlignment="Left" Height="34" TextWrapping="Wrap" VerticalAlignment="Top" Width="331" Margin="120,0,0,0"/>
|
<TextBox x:Name="tbTypeEvent" HorizontalAlignment="Left" Height="34" TextWrapping="Wrap" Text="{Binding TypeEvent}" VerticalAlignment="Top" Width="331" Margin="120,0,0,0" />
|
||||||
<Label Content="Lieu" HorizontalAlignment="Left" Width="120" Margin="0,34,0,167"/>
|
<Label Content="Lieu" HorizontalAlignment="Left" Width="120" Margin="0,34,0,167"/>
|
||||||
<TextBox HorizontalAlignment="Left" Height="34" TextWrapping="Wrap" VerticalAlignment="Top" Width="331" Margin="120,34,0,0"/>
|
<TextBox x:Name="tbLieu" HorizontalAlignment="Left" Height="34" TextWrapping="Wrap" Text="{Binding Lieu}" VerticalAlignment="Top" Width="331" Margin="120,34,0,0"/>
|
||||||
<Label Content="Date" HorizontalAlignment="Left" Width="120" Margin="0,73,0,128"/>
|
<Label Content="Date" HorizontalAlignment="Left" Width="120" Margin="0,73,0,128"/>
|
||||||
<TextBox HorizontalAlignment="Left" Height="34" TextWrapping="Wrap" VerticalAlignment="Top" Width="331" Margin="120,73,0,0"/>
|
<TextBox x:Name="tbDate" HorizontalAlignment="Left" Height="34" TextWrapping="Wrap" Text="{Binding UnDetailEvent.Date}" VerticalAlignment="Top" Width="331" Margin="120,73,0,0" />
|
||||||
<Label Content="Durée" HorizontalAlignment="Left" Width="120" Margin="0,112,0,91"/>
|
<Label Content="Durée" HorizontalAlignment="Left" Width="120" Margin="0,112,0,91"/>
|
||||||
<TextBox HorizontalAlignment="Left" Height="34" TextWrapping="Wrap" VerticalAlignment="Top" Width="331" Margin="120,112,0,0"/>
|
<TextBox x:Name="tbDuree" HorizontalAlignment="Left" Height="34" TextWrapping="Wrap" Text="{Binding Duree}" VerticalAlignment="Top" Width="331" Margin="120,112,0,0"/>
|
||||||
<Label Content="Description" HorizontalAlignment="Left" Width="120" Margin="0,151,0,53"/>
|
<Label Content="Description" HorizontalAlignment="Left" Width="120" Margin="0,151,0,53"/>
|
||||||
<TextBox HorizontalAlignment="Left" Height="34" TextWrapping="Wrap" VerticalAlignment="Top" Width="331" Margin="120,146,0,0"/>
|
<TextBox x:Name="tbDescription" HorizontalAlignment="Left" Height="34" TextWrapping="Wrap" Text="{Binding UnDetailEvent.Description}" VerticalAlignment="Top" Width="331" Margin="120,146,0,0"/>
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
<Button x:Name="btnClassement" Margin="468,310,24,150" Content="Classement" Height="Auto" RenderTransformOrigin="-0.1,0.534" />
|
<Button x:Name="btnClassement" Margin="468,310,24,150" Content="Classement" Height="Auto" RenderTransformOrigin="-0.1,0.534" Click="btnClassement_Click" />
|
||||||
<DataGrid x:Name="dgEquipes" ItemsSource="{Binding BcpEquipes}" VerticalScrollBarVisibility="Visible"
|
<DataGrid x:Name="dgEquipes" ItemsSource="{Binding BcpEquipes}" VerticalScrollBarVisibility="Visible"
|
||||||
IsReadOnly="True" AutoGenerateColumns="False"
|
IsReadOnly="True" AutoGenerateColumns="False"
|
||||||
SelectedItem="{Binding EquipeSelectionnee, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Margin="56,296,386,20" >
|
SelectedItem="{Binding EquipeSelectionnee, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Margin="40,297,402,25" >
|
||||||
<DataGrid.Columns>
|
<DataGrid.Columns>
|
||||||
<DataGridTextColumn Visibility="Hidden" Binding="{Binding ID_equipe}" />
|
<DataGridTextColumn Visibility="Hidden" Binding="{Binding ID_equipe}" />
|
||||||
<DataGridTextColumn Header="Nom d'équipe" Binding="{Binding E_nom}" Width="*" />
|
<DataGridTextColumn Header="Nom d'équipe" Binding="{Binding E_nom}" Width="*" />
|
||||||
</DataGrid.Columns>
|
</DataGrid.Columns>
|
||||||
|
<i:Interaction.Triggers>
|
||||||
|
<i:EventTrigger EventName="SelectionChanged">
|
||||||
|
<i:InvokeCommandAction Command="{Binding cAfficherJoueur}" />
|
||||||
|
</i:EventTrigger>
|
||||||
|
</i:Interaction.Triggers>
|
||||||
</DataGrid>
|
</DataGrid>
|
||||||
<DataGrid x:Name="dgJoueur" ItemsSource="{Binding BcpJoueurs}" VerticalScrollBarVisibility="Visible"
|
<DataGrid x:Name="dgJoueur" VerticalScrollBarVisibility="Visible"
|
||||||
IsReadOnly="True" AutoGenerateColumns="False" SelectedItem="{Binding JoueurSelectionnee, Mode=TwoWay}"
|
IsReadOnly="True" AutoGenerateColumns="False" Margin="270,297,194,25" ItemsSource="{Binding BcpJoueurs}">
|
||||||
Margin="269,296,195,20">
|
|
||||||
<DataGrid.Columns>
|
<DataGrid.Columns>
|
||||||
<DataGridTextColumn Visibility="Hidden" Binding="{Binding ID_LP}" />
|
<DataGridTextColumn Visibility="Hidden" Binding="{Binding ID_LP}" />
|
||||||
<DataGridTextColumn Header="ID du Joueur" Binding="{Binding ID_benificiaire}" Width="*" />
|
<DataGridTextColumn Header="ID du Joueur" Binding="{Binding ID_benificiaire}" Width="*" />
|
||||||
|
|
|
@ -11,6 +11,9 @@ using System.Windows.Input;
|
||||||
using System.Windows.Media;
|
using System.Windows.Media;
|
||||||
using System.Windows.Media.Imaging;
|
using System.Windows.Media.Imaging;
|
||||||
using System.Windows.Shapes;
|
using System.Windows.Shapes;
|
||||||
|
using ProjetTheAlone.Classes;
|
||||||
|
using ProjetTheAlone.Gestion;
|
||||||
|
using ProjetTheAlone.Config;
|
||||||
|
|
||||||
namespace ProjetTheAlone.View
|
namespace ProjetTheAlone.View
|
||||||
{
|
{
|
||||||
|
@ -19,15 +22,41 @@ namespace ProjetTheAlone.View
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public partial class FicDetailEvent : Window
|
public partial class FicDetailEvent : Window
|
||||||
{
|
{
|
||||||
public FicDetailEvent()
|
private string chConn = Settings2.Default.schCon;
|
||||||
|
|
||||||
|
C_T_event EventSelect;
|
||||||
|
|
||||||
|
public FicDetailEvent(C_T_event _EventSelect)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
EventSelect = _EventSelect;
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
DataContext = new ViewModel.VM_Event();
|
DataContext =new ViewModel.VM_DetailEvent(EventSelect);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void btnQuitter_Click(object sender, RoutedEventArgs e)
|
private void btnQuitter_Click(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
Close();
|
Close();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void btnClassement_Click(object sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
FicClassement w = new FicClassement(EventSelect);
|
||||||
|
w.ShowDialog();
|
||||||
|
}
|
||||||
|
public void setDataContext(C_T_event _EventSelect)
|
||||||
|
{
|
||||||
|
EventSelect = _EventSelect;
|
||||||
|
DataContext = new ViewModel.VM_DetailEvent(EventSelect);
|
||||||
|
}
|
||||||
|
public bool IsClosed { get; private set; }
|
||||||
|
|
||||||
|
protected override void OnClosed(EventArgs e)
|
||||||
|
{
|
||||||
|
base.OnClosed(e);
|
||||||
|
IsClosed = true;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
xmlns:local="clr-namespace:ProjetTheAlone.View"
|
xmlns:local="clr-namespace:ProjetTheAlone.View"
|
||||||
|
xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
Title="FicEvenementEncode" Height="552.418" Width="1221.191" WindowStartupLocation="CenterScreen" WindowStyle="None">
|
Title="FicEvenementEncode" Height="552.418" Width="1221.191" WindowStartupLocation="CenterScreen" WindowStyle="None">
|
||||||
<Grid Margin="0,0,2,2">
|
<Grid Margin="0,0,2,2">
|
||||||
|
@ -27,7 +28,7 @@
|
||||||
Margin="984,284,63,23">
|
Margin="984,284,63,23">
|
||||||
<DataGrid.Columns>
|
<DataGrid.Columns>
|
||||||
<DataGridTextColumn Visibility="Hidden" Binding="{Binding ID_LP}" />
|
<DataGridTextColumn Visibility="Hidden" Binding="{Binding ID_LP}" />
|
||||||
<DataGridTextColumn Header="ID du Joueur" Binding="{Binding ID_benificiaire}" Width="*" />
|
<DataGridTextColumn Header="Joueurs" Binding="{Binding ID_benificiaire}" Width="*" />
|
||||||
</DataGrid.Columns>
|
</DataGrid.Columns>
|
||||||
</DataGrid>
|
</DataGrid>
|
||||||
<DataGrid x:Name="dgEquipes" ItemsSource="{Binding BcpEquipes}" VerticalScrollBarVisibility="Visible"
|
<DataGrid x:Name="dgEquipes" ItemsSource="{Binding BcpEquipes}" VerticalScrollBarVisibility="Visible"
|
||||||
|
@ -37,6 +38,11 @@
|
||||||
<DataGridTextColumn Visibility="Hidden" Binding="{Binding ID_equipe}" />
|
<DataGridTextColumn Visibility="Hidden" Binding="{Binding ID_equipe}" />
|
||||||
<DataGridTextColumn Header="Nom d'équipe" Binding="{Binding E_nom}" Width="*" />
|
<DataGridTextColumn Header="Nom d'équipe" Binding="{Binding E_nom}" Width="*" />
|
||||||
</DataGrid.Columns>
|
</DataGrid.Columns>
|
||||||
|
<i:Interaction.Triggers>
|
||||||
|
<i:EventTrigger EventName="SelectionChanged">
|
||||||
|
<i:InvokeCommandAction Command="{Binding cAfficherJoueur}" />
|
||||||
|
</i:EventTrigger>
|
||||||
|
</i:Interaction.Triggers>
|
||||||
</DataGrid>
|
</DataGrid>
|
||||||
<DataGrid x:Name="dgParticipant" ItemsSource="{Binding BcpParticipants}" VerticalScrollBarVisibility="Visible"
|
<DataGrid x:Name="dgParticipant" ItemsSource="{Binding BcpParticipants}" VerticalScrollBarVisibility="Visible"
|
||||||
IsReadOnly="True" AutoGenerateColumns="False"
|
IsReadOnly="True" AutoGenerateColumns="False"
|
||||||
|
@ -49,36 +55,18 @@
|
||||||
</DataGrid>
|
</DataGrid>
|
||||||
<Button x:Name="btnCreeEvent" Margin="778,43,275,457"
|
<Button x:Name="btnCreeEvent" Margin="778,43,275,457"
|
||||||
Content="Créé l'événement" RenderTransformOrigin="0.017,0.519" Height="Auto" IsEnabled="{Binding ActiverUneFiche, Mode=OneWay}"
|
Content="Créé l'événement" RenderTransformOrigin="0.017,0.519" Height="Auto" IsEnabled="{Binding ActiverUneFiche, Mode=OneWay}"
|
||||||
Command="{Binding cConfirmer}">
|
Command="{Binding cConfirmer}"/>
|
||||||
<Button.RenderTransform>
|
|
||||||
<TransformGroup>
|
|
||||||
<ScaleTransform/>
|
|
||||||
<SkewTransform AngleY="0.047"/>
|
|
||||||
<RotateTransform Angle="0.162"/>
|
|
||||||
<TranslateTransform/>
|
|
||||||
</TransformGroup>
|
|
||||||
</Button.RenderTransform>
|
|
||||||
</Button>
|
|
||||||
<DatePicker HorizontalAlignment="Left" SelectedDate="{Binding UnEvent.Date, Mode=TwoWay}" IsEnabled="{Binding ActiverUneFiche, Mode=OneWay}" Margin="480,54,0,0" VerticalAlignment="Top" Width="111"/>
|
<DatePicker HorizontalAlignment="Left" SelectedDate="{Binding UnEvent.Date, Mode=TwoWay}" IsEnabled="{Binding ActiverUneFiche, Mode=OneWay}" Margin="480,54,0,0" VerticalAlignment="Top" Width="111"/>
|
||||||
<TextBox HorizontalAlignment="Left" Height="76" Margin="635,140,0,0" TextWrapping="Wrap" IsEnabled="{Binding ActiverUneFiche, Mode=OneWay}" Text="{Binding UnEvent.Description, Mode=TwoWay}" VerticalAlignment="Top" Width="271"/>
|
<TextBox HorizontalAlignment="Left" Height="76" Margin="635,140,0,0" TextWrapping="Wrap" IsEnabled="{Binding ActiverUneFiche, Mode=OneWay}" Text="{Binding UnEvent.Description, Mode=TwoWay}" VerticalAlignment="Top" Width="271"/>
|
||||||
<Button x:Name="btnNewTypeEvent" Margin="40,47,951,450"
|
<Button x:Name="btnNewTypeEvent" Margin="40,47,951,450"
|
||||||
Content="Nouveau type d'événement" RenderTransformOrigin="0.017,0.519" Height="Auto" Click="btnNewTypeEvent_Click">
|
Content="Nouveau type d'événement" RenderTransformOrigin="0.017,0.519" Height="Auto" Click="btnNewTypeEvent_Click"/>
|
||||||
<Button.RenderTransform>
|
|
||||||
<TransformGroup>
|
|
||||||
<ScaleTransform/>
|
|
||||||
<SkewTransform AngleY="0.047"/>
|
|
||||||
<RotateTransform Angle="0.162"/>
|
|
||||||
<TranslateTransform/>
|
|
||||||
</TransformGroup>
|
|
||||||
</Button.RenderTransform>
|
|
||||||
</Button>
|
|
||||||
<Button x:Name="btnNewLieu" Margin="40,99,952,401"
|
<Button x:Name="btnNewLieu" Margin="40,99,952,401"
|
||||||
Content="Nouveau lieu" RenderTransformOrigin="0.017,0.519" Height="Auto" Click="btnNewLieu_Click"/>
|
Content="Nouveau lieu" RenderTransformOrigin="0.017,0.519" Height="Auto" Click="btnNewLieu_Click"/>
|
||||||
<Button x:Name="btnAjoutEquipe" Margin="538,292,493,210" Content="Ajouter une Equipe" Height="Auto" Click="btnAjoutEquipe_Click" />
|
<Button x:Name="btnAjoutEquipe" Margin="538,292,493,210" Content="Ajouter une Equipe" Height="Auto" Click="btnAjoutEquipe_Click" />
|
||||||
<Button x:Name="btnAjoutEquipier" Margin="538,357,493,148" Content="Ajouter un joueur" Height="Auto" Command="{Binding cAjouterJoueur}"/>
|
<Button x:Name="btnAjoutEquipier" Margin="538,357,493,148" Content="Ajouter un joueur" Height="Auto" Command="{Binding cAjouterJoueur}"/>
|
||||||
<Button x:Name="btnSuppEquipier" Margin="538,399,493,98" Content="Supprimer un joueur" Height="Auto" Command="{Binding cSupprimerJoueur}" />
|
<Button x:Name="btnSuppEquipier" Margin="538,399,493,98" Content="Supprimer un joueur" Height="Auto" Command="{Binding cSupprimerJoueur}" />
|
||||||
|
|
||||||
<DataGrid x:Name="lvEvenementEnCours" ItemsSource="{Binding BcpEvents}" VerticalScrollBarVisibility="Visible"
|
<DataGrid x:Name="dgEvenementEnCours" ItemsSource="{Binding BcpEvents}" VerticalScrollBarVisibility="Visible"
|
||||||
IsReadOnly="True" AutoGenerateColumns="False"
|
IsReadOnly="True" AutoGenerateColumns="False"
|
||||||
SelectedItem="{Binding EventSelectionnee, Mode=TwoWay}" Margin="29,263,955,131" >
|
SelectedItem="{Binding EventSelectionnee, Mode=TwoWay}" Margin="29,263,955,131" >
|
||||||
<DataGrid.Columns>
|
<DataGrid.Columns>
|
||||||
|
@ -88,16 +76,7 @@
|
||||||
</DataGrid>
|
</DataGrid>
|
||||||
<Label Content="Evénements" HorizontalAlignment="Left" Margin="29,10,0,0" VerticalAlignment="Top" FontFamily="Calibri" FontSize="20"/>
|
<Label Content="Evénements" HorizontalAlignment="Left" Margin="29,10,0,0" VerticalAlignment="Top" FontFamily="Calibri" FontSize="20"/>
|
||||||
<Button x:Name="btnQuitter" Margin="990,177,93,324"
|
<Button x:Name="btnQuitter" Margin="990,177,93,324"
|
||||||
Content="Quitter" RenderTransformOrigin="0.017,0.519" Click="btnQuitter_Click" Height="Auto">
|
Content="Quitter" RenderTransformOrigin="0.017,0.519" Click="btnQuitter_Click" Height="Auto"/>
|
||||||
<Button.RenderTransform>
|
|
||||||
<TransformGroup>
|
|
||||||
<ScaleTransform/>
|
|
||||||
<SkewTransform AngleY="0.047"/>
|
|
||||||
<RotateTransform Angle="0.162"/>
|
|
||||||
<TranslateTransform/>
|
|
||||||
</TransformGroup>
|
|
||||||
</Button.RenderTransform>
|
|
||||||
</Button>
|
|
||||||
<Button x:Name="btnSuppEvent" Margin="29,424,955,73" Command="{Binding cSupprimer}"
|
<Button x:Name="btnSuppEvent" Margin="29,424,955,73" Command="{Binding cSupprimer}"
|
||||||
Content="Supprimer l'événement" Height="Auto"/>
|
Content="Supprimer l'événement" Height="Auto"/>
|
||||||
<Button x:Name="btnDetail" Margin="29,216,1073,284"
|
<Button x:Name="btnDetail" Margin="29,216,1073,284"
|
||||||
|
@ -105,27 +84,10 @@
|
||||||
<Button x:Name="btnNewEvent" Margin="39,148,953,352"
|
<Button x:Name="btnNewEvent" Margin="39,148,953,352"
|
||||||
Content="Nouvel événement" RenderTransformOrigin="0.017,0.519" Height="Auto" IsEnabled="{Binding ActiverBcpFiche, Mode=OneWay}"
|
Content="Nouvel événement" RenderTransformOrigin="0.017,0.519" Height="Auto" IsEnabled="{Binding ActiverBcpFiche, Mode=OneWay}"
|
||||||
Command="{Binding cAjouter}" >
|
Command="{Binding cAjouter}" >
|
||||||
<Button.RenderTransform>
|
|
||||||
<TransformGroup>
|
|
||||||
<ScaleTransform/>
|
|
||||||
<SkewTransform AngleY="0.661"/>
|
|
||||||
<RotateTransform Angle="0.162"/>
|
|
||||||
<TranslateTransform Y="0.031"/>
|
|
||||||
</TransformGroup>
|
|
||||||
</Button.RenderTransform>
|
|
||||||
</Button>
|
</Button>
|
||||||
<Button x:Name="btnAnnuler" Margin="779,92,274,409"
|
<Button x:Name="btnAnnuler" Margin="779,92,274,409"
|
||||||
Content="Annuler" RenderTransformOrigin="0.017,0.519" Height="Auto" IsEnabled="{Binding ActiverUneFiche, Mode=OneWay}"
|
Content="Annuler" RenderTransformOrigin="0.017,0.519" Height="Auto" IsEnabled="{Binding ActiverUneFiche, Mode=OneWay}"
|
||||||
Command="{Binding cAnnuler}">
|
Command="{Binding cAnnuler}"/>
|
||||||
<Button.RenderTransform>
|
|
||||||
<TransformGroup>
|
|
||||||
<ScaleTransform/>
|
|
||||||
<SkewTransform AngleY="0.047"/>
|
|
||||||
<RotateTransform Angle="0.162"/>
|
|
||||||
<TranslateTransform/>
|
|
||||||
</TransformGroup>
|
|
||||||
</Button.RenderTransform>
|
|
||||||
</Button>
|
|
||||||
<DatePicker HorizontalAlignment="Left" IsEnabled="{Binding ActiverUneFiche, Mode=OneWay}" SelectedDate="{Binding UnEvent.Duree, Mode=TwoWay}" Margin="635,54,0,0" VerticalAlignment="Top" Width="111"/>
|
<DatePicker HorizontalAlignment="Left" IsEnabled="{Binding ActiverUneFiche, Mode=OneWay}" SelectedDate="{Binding UnEvent.Duree, Mode=TwoWay}" Margin="635,54,0,0" VerticalAlignment="Top" Width="111"/>
|
||||||
<Button x:Name="btnAjouterEquipe" Margin="29,474,955,23" Command="{Binding cAjouterEquipe}"
|
<Button x:Name="btnAjouterEquipe" Margin="29,474,955,23" Command="{Binding cAjouterEquipe}"
|
||||||
Content="Ajouter Equipe à l'événement" Height="Auto"/>
|
Content="Ajouter Equipe à l'événement" Height="Auto"/>
|
||||||
|
|
|
@ -11,6 +11,7 @@ using System.Windows.Input;
|
||||||
using System.Windows.Media;
|
using System.Windows.Media;
|
||||||
using System.Windows.Media.Imaging;
|
using System.Windows.Media.Imaging;
|
||||||
using System.Windows.Shapes;
|
using System.Windows.Shapes;
|
||||||
|
using ProjetTheAlone.Classes;
|
||||||
|
|
||||||
namespace ProjetTheAlone.View
|
namespace ProjetTheAlone.View
|
||||||
{
|
{
|
||||||
|
@ -19,6 +20,8 @@ namespace ProjetTheAlone.View
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public partial class FicEvenementEncode : Window
|
public partial class FicEvenementEncode : Window
|
||||||
{
|
{
|
||||||
|
public int EventSelect;
|
||||||
|
|
||||||
public FicEvenementEncode()
|
public FicEvenementEncode()
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
|
@ -55,8 +58,12 @@ namespace ProjetTheAlone.View
|
||||||
|
|
||||||
private void btnDetail_Click(object sender, RoutedEventArgs e)
|
private void btnDetail_Click(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
FicDetailEvent w = new FicDetailEvent();
|
if (dgEvenementEnCours.SelectedItem != null)
|
||||||
w.ShowDialog();
|
{
|
||||||
|
FicDetailEvent w = new FicDetailEvent((C_T_event)dgEvenementEnCours.SelectedItem);
|
||||||
|
w.ShowDialog();
|
||||||
|
EventSelect = dgEvenementEnCours.SelectedIndex;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -95,8 +95,9 @@ namespace ProjetTheAlone.ViewModel
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
new G_T_equipe(chConnexion).Modifier(UneEquipe.ID, UneEquipe.Nom, 0, null);
|
new G_T_equipe(chConnexion).Modifier(UneEquipe.ID, UneEquipe.Nom, UneEquipe.Point, UneEquipe.IDEvent);
|
||||||
BcpEquipes[nAjout] = new C_T_equipe(UneEquipe.ID, UneEquipe.Nom, 0, null);
|
BcpEquipes[nAjout] = new C_T_equipe(UneEquipe.ID, UneEquipe.Nom, UneEquipe.Point, UneEquipe.IDEvent);
|
||||||
|
|
||||||
}
|
}
|
||||||
ActiverUneFiche = false;
|
ActiverUneFiche = false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -169,8 +169,10 @@ namespace ProjetTheAlone.ViewModel
|
||||||
BcpTypeEvents = ChargerTypeEvent(chConnexion);
|
BcpTypeEvents = ChargerTypeEvent(chConnexion);
|
||||||
BcpEquipes = ChargerEquipes(chConnexion);
|
BcpEquipes = ChargerEquipes(chConnexion);
|
||||||
BcpParticipants = ChargerParticipant(chConnexion);
|
BcpParticipants = ChargerParticipant(chConnexion);
|
||||||
BcpJoueurs = ChargerJoueur(chConnexion);
|
|
||||||
|
|
||||||
|
cAfficherJoueur = new BaseCommande(ChargerJoueur);
|
||||||
|
|
||||||
ActiverUneFiche = false;
|
ActiverUneFiche = false;
|
||||||
cConfirmer = new BaseCommande(Confirmer);
|
cConfirmer = new BaseCommande(Confirmer);
|
||||||
cAnnuler = new BaseCommande(Annuler);
|
cAnnuler = new BaseCommande(Annuler);
|
||||||
|
@ -192,7 +194,7 @@ namespace ProjetTheAlone.ViewModel
|
||||||
public BaseCommande cSupprimer { get; set; }
|
public BaseCommande cSupprimer { get; set; }
|
||||||
public BaseCommande cSupprimerJoueur { get; set; }
|
public BaseCommande cSupprimerJoueur { get; set; }
|
||||||
public BaseCommande cAjouterEquipe { get; set; }
|
public BaseCommande cAjouterEquipe { get; set; }
|
||||||
|
public BaseCommande cAfficherJoueur { get; set; }
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Chargement
|
#region Chargement
|
||||||
|
@ -241,13 +243,19 @@ namespace ProjetTheAlone.ViewModel
|
||||||
return rep;
|
return rep;
|
||||||
}
|
}
|
||||||
|
|
||||||
private ObservableCollection<C_T_listParticipant> ChargerJoueur (string chConn)
|
private void ChargerJoueur()
|
||||||
{
|
{
|
||||||
ObservableCollection<C_T_listParticipant> rep = new ObservableCollection<C_T_listParticipant>();
|
if (EquipeSelectionnee != null)
|
||||||
List< C_T_listParticipant> lTmp = new G_T_listParticipant(chConn).Lire("ID_benificiaire");
|
{
|
||||||
foreach (C_T_listParticipant Tmp in lTmp)
|
ObservableCollection<C_T_listParticipant> rep = new ObservableCollection<C_T_listParticipant>();
|
||||||
rep.Add(Tmp);
|
|
||||||
return rep;
|
List<C_T_listParticipant> lTmp = new G_T_listParticipant(chConnexion).Lire("B_nom");
|
||||||
|
foreach (C_T_listParticipant Tmp in lTmp)
|
||||||
|
if (EquipeSelectionnee.ID_equipe == Tmp.ID_equipe)
|
||||||
|
rep.Add(Tmp);
|
||||||
|
|
||||||
|
BcpJoueurs = rep;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
@ -341,6 +349,7 @@ namespace ProjetTheAlone.ViewModel
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
public class VM_UnEvent : BasePropriete
|
public class VM_UnEvent : BasePropriete
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue