diff --git a/ProjetTheAlone/ProjetTheAlone.csproj b/ProjetTheAlone/ProjetTheAlone.csproj
index a384de3..99a33c3 100644
--- a/ProjetTheAlone/ProjetTheAlone.csproj
+++ b/ProjetTheAlone/ProjetTheAlone.csproj
@@ -90,6 +90,8 @@
+
+
@@ -100,6 +102,9 @@
+
+ FicClassement.xaml
+
FicDetailEvent.xaml
@@ -192,6 +197,10 @@
FicRepasEncode.xaml
+
+ Designer
+ XamlIntelliSenseFileGenerator
+
Designer
MSBuild:Compile
diff --git a/ProjetTheAlone/View/DashBoard.xaml b/ProjetTheAlone/View/DashBoard.xaml
index e4b0210..d0632f6 100644
--- a/ProjetTheAlone/View/DashBoard.xaml
+++ b/ProjetTheAlone/View/DashBoard.xaml
@@ -39,7 +39,7 @@
+ IsReadOnly="True" AutoGenerateColumns="False" Height="auto" MouseDoubleClick="DgEvent_MouseDoubleClick">
@@ -47,14 +47,14 @@
+ IsReadOnly="True" AutoGenerateColumns="False" Grid.Row="1" Height="auto" MouseDoubleClick="DgEvent_MouseDoubleClick">
+ IsReadOnly="True" AutoGenerateColumns="False" Grid.Row="1" Height="auto" MouseDoubleClick="DgEvent_MouseDoubleClick">
@@ -88,21 +88,21 @@
+ IsReadOnly="True" AutoGenerateColumns="False" Height="auto" MouseDoubleClick="DgEvent_MouseDoubleClick">
+ IsReadOnly="True" AutoGenerateColumns="False" Height="auto" MouseDoubleClick="DgEvent_MouseDoubleClick">
+ IsReadOnly="True" AutoGenerateColumns="False" Height="auto" MouseDoubleClick="DgEvent_MouseDoubleClick">
diff --git a/ProjetTheAlone/View/DashBoard.xaml.cs b/ProjetTheAlone/View/DashBoard.xaml.cs
index b47df25..29a3328 100644
--- a/ProjetTheAlone/View/DashBoard.xaml.cs
+++ b/ProjetTheAlone/View/DashBoard.xaml.cs
@@ -29,6 +29,7 @@ namespace ProjetTheAlone.View
{
ObservableCollection cl = new ObservableCollection();
RepaModel rm = new RepaModel();
+ View.FicDetailEvent W_detailEvent = null;
public ObservableCollection Cl
{
get
@@ -61,6 +62,7 @@ namespace ProjetTheAlone.View
testQuand.DataContext = RepasAjd.DataContext = new RepaModel(DateTime.Now);
RepasDemain.DataContext = new RepaModel(DateTime.Now.AddDays(1));
RepasApresDemain.DataContext = new RepaModel(DateTime.Now.AddDays(2));
+
dgEventPasse2.DataContext = new EventDGV_VM(DateTime.Now.AddDays(-3));
dgEventPasse1.DataContext = new EventDGV_VM(DateTime.Now.AddDays(-2));
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);
}
+
+ 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
{
diff --git a/ProjetTheAlone/View/FicDetailEvent.xaml b/ProjetTheAlone/View/FicDetailEvent.xaml
index 05ab9b1..899b7ab 100644
--- a/ProjetTheAlone/View/FicDetailEvent.xaml
+++ b/ProjetTheAlone/View/FicDetailEvent.xaml
@@ -4,6 +4,7 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:ProjetTheAlone.View"
+ xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
mc:Ignorable="d"
Title="FicDetailEvent" Height="517.897" Width="638.259" WindowStartupLocation="CenterScreen" WindowStyle="None">
@@ -13,29 +14,33 @@
Content="Quitter" Click="btnQuitter_Click" Height="41" Margin="485,442,37,25" RenderTransformOrigin="1.189,1.927"/>
-
+
-
+
-
+
-
+
-
+
-
+
+ IsReadOnly="True" AutoGenerateColumns="False"
+ SelectedItem="{Binding EquipeSelectionnee, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Margin="40,297,402,25" >
+
+
+
+
+
-
+
diff --git a/ProjetTheAlone/View/FicDetailEvent.xaml.cs b/ProjetTheAlone/View/FicDetailEvent.xaml.cs
index 26b2b3b..7107b3e 100644
--- a/ProjetTheAlone/View/FicDetailEvent.xaml.cs
+++ b/ProjetTheAlone/View/FicDetailEvent.xaml.cs
@@ -11,6 +11,9 @@ using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
+using ProjetTheAlone.Classes;
+using ProjetTheAlone.Gestion;
+using ProjetTheAlone.Config;
namespace ProjetTheAlone.View
{
@@ -19,15 +22,41 @@ namespace ProjetTheAlone.View
///
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();
- DataContext = new ViewModel.VM_Event();
+ DataContext =new ViewModel.VM_DetailEvent(EventSelect);
+
}
private void btnQuitter_Click(object sender, RoutedEventArgs e)
{
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;
+ }
+
}
}
diff --git a/ProjetTheAlone/View/FicEvenementEncode.xaml b/ProjetTheAlone/View/FicEvenementEncode.xaml
index 3424f7b..a02302b 100644
--- a/ProjetTheAlone/View/FicEvenementEncode.xaml
+++ b/ProjetTheAlone/View/FicEvenementEncode.xaml
@@ -4,6 +4,7 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:ProjetTheAlone.View"
+ xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
mc:Ignorable="d"
Title="FicEvenementEncode" Height="552.418" Width="1221.191" WindowStartupLocation="CenterScreen" WindowStyle="None">
@@ -27,7 +28,7 @@
Margin="984,284,63,23">
-
+
+
+
+
+
+
+ Command="{Binding cConfirmer}"/>
+ Content="Nouveau type d'événement" RenderTransformOrigin="0.017,0.519" Height="Auto" Click="btnNewTypeEvent_Click"/>
-
@@ -88,16 +76,7 @@
+ Content="Quitter" RenderTransformOrigin="0.017,0.519" Click="btnQuitter_Click" Height="Auto"/>
+ Command="{Binding cAnnuler}"/>
diff --git a/ProjetTheAlone/View/FicEvenementEncode.xaml.cs b/ProjetTheAlone/View/FicEvenementEncode.xaml.cs
index fc11767..058f135 100644
--- a/ProjetTheAlone/View/FicEvenementEncode.xaml.cs
+++ b/ProjetTheAlone/View/FicEvenementEncode.xaml.cs
@@ -11,6 +11,7 @@ using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
+using ProjetTheAlone.Classes;
namespace ProjetTheAlone.View
{
@@ -19,6 +20,8 @@ namespace ProjetTheAlone.View
///
public partial class FicEvenementEncode : Window
{
+ public int EventSelect;
+
public FicEvenementEncode()
{
InitializeComponent();
@@ -55,8 +58,12 @@ namespace ProjetTheAlone.View
private void btnDetail_Click(object sender, RoutedEventArgs e)
{
- FicDetailEvent w = new FicDetailEvent();
- w.ShowDialog();
+ if (dgEvenementEnCours.SelectedItem != null)
+ {
+ FicDetailEvent w = new FicDetailEvent((C_T_event)dgEvenementEnCours.SelectedItem);
+ w.ShowDialog();
+ EventSelect = dgEvenementEnCours.SelectedIndex;
+ }
}
diff --git a/ProjetTheAlone/ViewModel/EncodeEquipe.cs b/ProjetTheAlone/ViewModel/EncodeEquipe.cs
index 30122a9..8fd0599 100644
--- a/ProjetTheAlone/ViewModel/EncodeEquipe.cs
+++ b/ProjetTheAlone/ViewModel/EncodeEquipe.cs
@@ -95,8 +95,9 @@ namespace ProjetTheAlone.ViewModel
}
else
{
- new G_T_equipe(chConnexion).Modifier(UneEquipe.ID, UneEquipe.Nom, 0, null);
- BcpEquipes[nAjout] = new C_T_equipe(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, UneEquipe.Point, UneEquipe.IDEvent);
+
}
ActiverUneFiche = false;
}
diff --git a/ProjetTheAlone/ViewModel/EncodeEvent.cs b/ProjetTheAlone/ViewModel/EncodeEvent.cs
index 14d350c..ba03556 100644
--- a/ProjetTheAlone/ViewModel/EncodeEvent.cs
+++ b/ProjetTheAlone/ViewModel/EncodeEvent.cs
@@ -169,8 +169,10 @@ namespace ProjetTheAlone.ViewModel
BcpTypeEvents = ChargerTypeEvent(chConnexion);
BcpEquipes = ChargerEquipes(chConnexion);
BcpParticipants = ChargerParticipant(chConnexion);
- BcpJoueurs = ChargerJoueur(chConnexion);
-
+
+
+ cAfficherJoueur = new BaseCommande(ChargerJoueur);
+
ActiverUneFiche = false;
cConfirmer = new BaseCommande(Confirmer);
cAnnuler = new BaseCommande(Annuler);
@@ -192,7 +194,7 @@ namespace ProjetTheAlone.ViewModel
public BaseCommande cSupprimer { get; set; }
public BaseCommande cSupprimerJoueur { get; set; }
public BaseCommande cAjouterEquipe { get; set; }
-
+ public BaseCommande cAfficherJoueur { get; set; }
#endregion
#region Chargement
@@ -241,13 +243,19 @@ namespace ProjetTheAlone.ViewModel
return rep;
}
- private ObservableCollection ChargerJoueur (string chConn)
+ private void ChargerJoueur()
{
- ObservableCollection rep = new ObservableCollection();
- List< C_T_listParticipant> lTmp = new G_T_listParticipant(chConn).Lire("ID_benificiaire");
- foreach (C_T_listParticipant Tmp in lTmp)
- rep.Add(Tmp);
- return rep;
+ if (EquipeSelectionnee != null)
+ {
+ ObservableCollection rep = new ObservableCollection();
+
+ List 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
@@ -341,6 +349,7 @@ namespace ProjetTheAlone.ViewModel
}
}
+
}
public class VM_UnEvent : BasePropriete
{