Gestion Alerte OK
This commit is contained in:
parent
13d7fe2a01
commit
79c532dc7c
|
@ -36,5 +36,16 @@ namespace ProjetTheAlone.Config {
|
|||
this["schCon"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
public global::System.Collections.Specialized.StringCollection alerte {
|
||||
get {
|
||||
return ((global::System.Collections.Specialized.StringCollection)(this["alerte"]));
|
||||
}
|
||||
set {
|
||||
this["alerte"] = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,5 +5,8 @@
|
|||
<Setting Name="schCon" Type="System.String" Scope="User">
|
||||
<Value Profile="(Default)">Data Source=(LocalDB)\MSSQLLocalDB;AttachDbFilename="C:\Users\adrie\OneDrive - Haute Ecole de la ville de Liège\3is\poo\ProjetTheAlone - Copie (9)\ProjetTheAlone\ProjetThe.mdf";Integrated Security=True</Value>
|
||||
</Setting>
|
||||
<Setting Name="alerte" Type="System.Collections.Specialized.StringCollection" Scope="User">
|
||||
<Value Profile="(Default)" />
|
||||
</Setting>
|
||||
</Settings>
|
||||
</SettingsFile>
|
|
@ -79,6 +79,26 @@ namespace ProjetTheAlone.Acces
|
|||
Commande.Connection.Close();
|
||||
return res;
|
||||
}
|
||||
public List<C_T_beneficiaire> AnnifDuJour()
|
||||
{
|
||||
CreerCommande("AnifBene");
|
||||
Commande.Connection.Open();
|
||||
SqlDataReader dr = Commande.ExecuteReader();
|
||||
List<C_T_beneficiaire> res = new List<C_T_beneficiaire>();
|
||||
while (dr.Read())
|
||||
{
|
||||
C_T_beneficiaire tmp = new C_T_beneficiaire();
|
||||
tmp.ID_beneficiaire = int.Parse(dr["ID_beneficiaire"].ToString());
|
||||
tmp.B_nom = dr["B_nom"].ToString();
|
||||
tmp.B_prenom = dr["B_prenom"].ToString();
|
||||
if (dr["B_anniversaire"] != DBNull.Value) tmp.B_anniversaire = DateTime.Parse(dr["B_anniversaire"].ToString());
|
||||
if (dr["B_img"] != DBNull.Value) tmp.B_img = Outil.toNullableByteArray.Convert((byte[])dr["B_img"]);
|
||||
res.Add(tmp);
|
||||
}
|
||||
dr.Close();
|
||||
Commande.Connection.Close();
|
||||
return res;
|
||||
}
|
||||
public C_T_beneficiaire Lire_ID(int ID_beneficiaire)
|
||||
{
|
||||
CreerCommande("SelectionnerT_beneficiaire_ID");
|
||||
|
|
|
@ -89,7 +89,35 @@ namespace ProjetTheAlone.Acces
|
|||
Commande.Connection.Close();
|
||||
return res;
|
||||
}
|
||||
public C_T_event Lire_ID(int ID_event)
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="dateV">Date cible</param>
|
||||
/// <returns>List des évènement du jour</returns>
|
||||
public List<C_T_event> Lire(DateTime dateV)
|
||||
{
|
||||
CreerCommande("[SelectEventByDate]");
|
||||
Commande.Parameters.AddWithValue("@dateV", dateV);
|
||||
Commande.Connection.Open();
|
||||
SqlDataReader dr = Commande.ExecuteReader();
|
||||
List<C_T_event> res = new List<C_T_event>();
|
||||
while (dr.Read())
|
||||
{
|
||||
C_T_event tmp = new C_T_event();
|
||||
tmp.ID_event = int.Parse(dr["ID_event"].ToString());
|
||||
if (dr["E_date"] != DBNull.Value) tmp.E_date = DateTime.Parse(dr["E_date"].ToString());
|
||||
if (dr["E_duree"] != DBNull.Value) tmp.E_duree = DateTime.Parse(dr["E_duree"].ToString());
|
||||
if (dr["ID_typeEvenement"] != DBNull.Value) tmp.ID_typeEvenement = int.Parse(dr["ID_typeEvenement"].ToString());
|
||||
if (dr["E_description"] != DBNull.Value) tmp.E_description = (dr["E_description"].ToString());
|
||||
if (dr["ID_lieu"] != DBNull.Value) tmp.ID_lieu = int.Parse(dr["ID_lieu"].ToString());
|
||||
if (dr["E_Pic"] != DBNull.Value) tmp.E_Pic = Outil.toNullableByteArray.Convert((byte[])dr["E_Pic"]);
|
||||
res.Add(tmp);
|
||||
}
|
||||
dr.Close();
|
||||
Commande.Connection.Close();
|
||||
return res;
|
||||
}
|
||||
public C_T_event Lire_ID(int ID_event)
|
||||
{
|
||||
CreerCommande("SelectionnerT_event_ID");
|
||||
Commande.Parameters.AddWithValue("@ID_event", ID_event);
|
||||
|
|
|
@ -46,9 +46,11 @@ namespace ProjetTheAlone.Classes
|
|||
}
|
||||
public DateTime? E_date
|
||||
{
|
||||
get { return _E_date; }
|
||||
get { return _E_date.Value; }
|
||||
set { _E_date = value; }
|
||||
}
|
||||
public string E_Date_string
|
||||
{ get => _E_date.Value.ToShortDateString(); }
|
||||
public DateTime? E_duree
|
||||
{
|
||||
get { return _E_duree; }
|
||||
|
|
|
@ -31,5 +31,9 @@ namespace ProjetTheAlone.Gestion
|
|||
{ return new A_T_beneficiaire(ChaineConnexion).Lire_ID(ID_beneficiaire); }
|
||||
public int Supprimer(int ID_beneficiaire)
|
||||
{ return new A_T_beneficiaire(ChaineConnexion).Supprimer(ID_beneficiaire); }
|
||||
public List<C_T_beneficiaire> AnnifDuJour()
|
||||
{
|
||||
return new A_T_beneficiaire(ChaineConnexion).AnnifDuJour();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -27,7 +27,14 @@ namespace ProjetTheAlone.Gestion
|
|||
{ return new A_T_event(ChaineConnexion).Modifier(ID_event, E_date, E_duree, ID_typeEvenement, E_description, ID_lieu, E_Pic_); }
|
||||
public List<C_T_event> Lire(string Index)
|
||||
{ return new A_T_event(ChaineConnexion).Lire(Index); }
|
||||
public C_T_event Lire_ID(int ID_event)
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="dateV">Date cible</param>
|
||||
/// <returns>Liste des event de la date cible</returns>
|
||||
public List<C_T_event> Lire(DateTime dateV)
|
||||
{ return new A_T_event(ChaineConnexion).Lire(dateV); }
|
||||
public C_T_event Lire_ID(int ID_event)
|
||||
{ return new A_T_event(ChaineConnexion).Lire_ID(ID_event); }
|
||||
public int Supprimer(int ID_event)
|
||||
{ return new A_T_event(ChaineConnexion).Supprimer(ID_event); }
|
||||
|
|
|
@ -98,6 +98,8 @@
|
|||
<Compile Include="ViewModel\EncodePlats.cs" />
|
||||
<Compile Include="ViewModel\TextDefilant.cs" />
|
||||
<Compile Include="ViewModel\VM_DashBoard.cs" />
|
||||
<Compile Include="ViewModel\EventDGV_VM.cs" />
|
||||
<Compile Include="ViewModel\VM_FicGestionAlert.cs" />
|
||||
<Compile Include="View\FicDetailEvent.xaml.cs">
|
||||
<DependentUpon>FicDetailEvent.xaml</DependentUpon>
|
||||
</Compile>
|
||||
|
@ -175,6 +177,9 @@
|
|||
<Compile Include="View\FicEvenementEncode.xaml.cs">
|
||||
<DependentUpon>FicEvenementEncode.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="View\FicGestionAlert.xaml.cs">
|
||||
<DependentUpon>FicGestionAlert.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="View\FicNewEquipe.xaml.cs">
|
||||
<DependentUpon>FicNewEquipe.xaml</DependentUpon>
|
||||
</Compile>
|
||||
|
@ -243,6 +248,10 @@
|
|||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="View\FicGestionAlert.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="View\FicNewEquipe.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
<ColumnDefinition Width="2*" />
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock x:Name="FoodDesc" Style="{StaticResource MaterialDesignTitleTextBlock}" HorizontalAlignment="Center" Height="Auto" Text="{Binding PlatV.P_nom}" />
|
||||
<TextBlock x:Name="FoodDesc" Style="{StaticResource MaterialDesignTitleTextBlock}" HorizontalAlignment="Center" Height="Auto" Text="{Binding PlatV.P_nom}"/>
|
||||
<Image x:Name="FoodPic" Source="{Binding PlatV.P_img, Converter={StaticResource imgConverter}}" Grid.Column="1" Stretch="Uniform"/>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
<RowDefinition Height="*"/>
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<TextBox Text="{Binding Quand}" />
|
||||
<TextBlock Text="{Binding Quand}" />
|
||||
<local:Plat x:Name="Plat1XML" Grid.Row="1" PlatV="{Binding Plat1}"></local:Plat>
|
||||
<local:Plat x:Name="Plat2XML" Grid.Row="2" PlatV="{Binding Plat2}"></local:Plat>
|
||||
<local:Plat x:Name="Plat3XML" Grid.Row="3" PlatV="{Binding Plat3}"></local:Plat>
|
||||
|
|
|
@ -19,7 +19,8 @@
|
|||
</Grid.RowDefinitions>
|
||||
<Button Name="BtnDashbord" Content="Dashbord" HorizontalAlignment="Left" Margin="23,28,0,0" VerticalAlignment="Top" Width="348" Height="203" Grid.Column="0" Grid.Row="1" Click="BtnAffichage_Click"/>
|
||||
<Button Name="BtnEncodage" Content="Encodage" HorizontalAlignment="Left" Margin="43,28,0,0" VerticalAlignment="Top" Width="348" Height="203" Grid.Column="1" Grid.Row="1" Click="BtnEncodage_Click" />
|
||||
<Button x:Name="BtnQuitter" Content="Quitter" HorizontalAlignment="Left" Margin="300,10,0,0" VerticalAlignment="Top" Width="81" Grid.Column="1" Grid.Row="2" Click="BtnQuitter_Click"/>
|
||||
<Button x:Name="BtnQuitter" Content="Quitter" HorizontalAlignment="Left" Margin="300,19,0,0" VerticalAlignment="Top" Width="81" Grid.Column="1" Grid.Row="2" Click="BtnQuitter_Click"/>
|
||||
<Button x:Name="BtnGestionAlert" Content="Gestion alert" HorizontalAlignment="Stretch" Width="348" VerticalAlignment="Center" Grid.Column="0" Grid.Row="2" Click="BtnGestionAlert_Click"/>
|
||||
<Label Content="Bienvenue sur TheApp" HorizontalAlignment="Left" Margin="62,10,0,0" Grid.Column="0" Grid.Row="0" VerticalAlignment="Top" FontFamily="Calibri" FontSize="20"/>
|
||||
|
||||
|
||||
|
|
|
@ -19,10 +19,16 @@ namespace ProjetTheAlone.View
|
|||
/// </summary>
|
||||
public partial class Accueil : Window
|
||||
{
|
||||
DashBoard W_DashBoard;
|
||||
FicEncodage W_FicEncodage;
|
||||
FicGestionAlert W_GestionAlert;
|
||||
public Accueil()
|
||||
{
|
||||
InitializeComponent();
|
||||
// Settings1.Default.schCon = @"Data Source=(LocalDB)\MSSQLLocalDB;AttachDbFilename='C:\Users\Hugues\Haute Ecole de la ville de Liège\Adrien VAN DAMME - ProjetTheAlone\ProjetTheAlone\ProjetThe.mdf';Integrated Security = True";
|
||||
//// Settings1.Default.schCon = @"Data Source=(LocalDB)\MSSQLLocalDB;AttachDbFilename='C:\Users\Hugues\Haute Ecole de la ville de Liège\Adrien VAN DAMME - ProjetTheAlone\ProjetTheAlone\ProjetThe.mdf';Integrated Security = True";
|
||||
//W_DashBoard = new DashBoard();
|
||||
//W_FicEncodage = new FicEncodage();
|
||||
//W_GestionAlert = new FicGestionAlert();
|
||||
}
|
||||
private static bool openaffichage = false;
|
||||
private static bool openencodage = false;
|
||||
|
@ -37,6 +43,7 @@ namespace ProjetTheAlone.View
|
|||
Openaffichage = true;
|
||||
DashBoard w = new DashBoard();
|
||||
w.Show();
|
||||
|
||||
|
||||
}
|
||||
else
|
||||
|
@ -70,5 +77,13 @@ namespace ProjetTheAlone.View
|
|||
if (e.ChangedButton == MouseButton.Left)
|
||||
this.DragMove();
|
||||
}
|
||||
}
|
||||
|
||||
private void BtnGestionAlert_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
FicGestionAlert w = new FicGestionAlert();
|
||||
w.Show();
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
<Window.Resources>
|
||||
<local:DebugDummyConverter x:Key="DebugDummyConverter" />
|
||||
</Window.Resources>
|
||||
|
||||
<Grid x:Name="testQuand">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="10*" />
|
||||
|
@ -30,35 +31,33 @@
|
|||
<ColumnDefinition />
|
||||
<ColumnDefinition />
|
||||
</Grid.ColumnDefinitions>
|
||||
<materialDesign:PackIcon Kind="Close" Grid.Column="2" HorizontalAlignment="Right" Cursor="Hand" MouseDown="PackIcon_MouseDown"/>
|
||||
|
||||
<Grid Grid.Column="0">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition />
|
||||
</Grid.ColumnDefinitions>
|
||||
<DataGrid x:Name="dgEventPasse2" ItemsSource="{Binding BcpPlats}" VerticalScrollBarVisibility="Visible"
|
||||
IsReadOnly="True" AutoGenerateColumns="False" IsEnabled="{Binding ActiverBcpFiche, Mode=OneWay}"
|
||||
SelectedItem="{Binding PlatSelectionnee, Mode=TwoWay}" Height="auto">
|
||||
<DataGrid x:Name="dgEventPasse2" ItemsSource="{Binding BcpEvent}" VerticalScrollBarVisibility="Visible"
|
||||
IsReadOnly="True" AutoGenerateColumns="False" Height="auto">
|
||||
|
||||
<DataGrid.Columns>
|
||||
<DataGridTextColumn Visibility="Hidden" Binding="{Binding ID_plat}" />
|
||||
<DataGridTextColumn Header="Avent Avent Hier" Binding="{Binding P_nom}" Width="*" />
|
||||
<DataGridTextColumn Visibility="Hidden" Binding="{Binding ID_event}" />
|
||||
<DataGridTextColumn Header="Event Avant Avant hier" Binding="{Binding E_description}" Width="*" />
|
||||
</DataGrid.Columns>
|
||||
</DataGrid>
|
||||
<DataGrid x:Name="dgEventPasse1" Grid.Column="1" ItemsSource="{Binding BcpPlats}" VerticalScrollBarVisibility="Visible"
|
||||
IsReadOnly="True" AutoGenerateColumns="False" IsEnabled="{Binding ActiverBcpFiche, Mode=OneWay}"
|
||||
SelectedItem="{Binding PlatSelectionnee, Mode=TwoWay}" Grid.Row="1" Height="auto">
|
||||
<DataGrid x:Name="dgEventPasse1" Grid.Column="1" ItemsSource="{Binding BcpEvent}" VerticalScrollBarVisibility="Visible"
|
||||
IsReadOnly="True" AutoGenerateColumns="False" Grid.Row="1" Height="auto">
|
||||
<DataGrid.Columns>
|
||||
<DataGridTextColumn Visibility="Hidden" Binding="{Binding ID_plat}" />
|
||||
<DataGridTextColumn Header="Avent Hier" Binding="{Binding P_nom}" Width="*" />
|
||||
<DataGridTextColumn Visibility="Hidden" Binding="{Binding ID_event}" />
|
||||
<DataGridTextColumn Header="Event Avent hier" Binding="{Binding E_description}" Width="*" />
|
||||
</DataGrid.Columns>
|
||||
</DataGrid>
|
||||
<DataGrid x:Name="dgEventPasse0" Grid.Column="2" ItemsSource="{Binding BcpPlats}" VerticalScrollBarVisibility="Visible"
|
||||
IsReadOnly="True" AutoGenerateColumns="False" IsEnabled="{Binding ActiverBcpFiche, Mode=OneWay}"
|
||||
SelectedItem="{Binding PlatSelectionnee, Mode=TwoWay}" Grid.Row="1" Height="auto">
|
||||
<DataGrid x:Name="dgEventPasse0" Grid.Column="2" ItemsSource="{Binding BcpEvent}" VerticalScrollBarVisibility="Visible"
|
||||
IsReadOnly="True" AutoGenerateColumns="False" Grid.Row="1" Height="auto">
|
||||
<DataGrid.Columns>
|
||||
<DataGridTextColumn Visibility="Hidden" Binding="{Binding ID_plat}" />
|
||||
<DataGridTextColumn Header="Hier" Binding="{Binding P_nom}" Width="*" />
|
||||
<DataGridTextColumn Visibility="Hidden" Binding="{Binding ID_event}" />
|
||||
<DataGridTextColumn Header="Event Hier" Binding="{Binding E_description}" Width="*" />
|
||||
</DataGrid.Columns>
|
||||
</DataGrid>
|
||||
</Grid>
|
||||
|
@ -76,46 +75,40 @@
|
|||
<ColumnDefinition />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="auto"/>
|
||||
<!-- <RowDefinition Height="auto"/>-->
|
||||
<RowDefinition/>
|
||||
<RowDefinition/>
|
||||
</Grid.RowDefinitions>
|
||||
<TextBlock HorizontalAlignment="Center" Text="{Binding Plat1}"></TextBlock>
|
||||
<TextBlock HorizontalAlignment="Center" Grid.Column="1">Demain</TextBlock>
|
||||
<TextBlock HorizontalAlignment="Center" Grid.Column="2">Après demain</TextBlock>
|
||||
|
||||
<control:Repa Grid.Row="0" x:Name="RepasAjd" Loaded="RepasMatin_Loaded"></control:Repa>
|
||||
<control:Repa Grid.Row="0" x:Name="RepasDemain" Grid.Column="1" ></control:Repa>
|
||||
<control:Repa Grid.Row="0" x:Name="RepasApresDemain" Grid.Column="2" >
|
||||
|
||||
</control:Repa>
|
||||
|
||||
|
||||
|
||||
<control:Repa Grid.Row="1" x:Name="RepasAjd" Loaded="RepasMatin_Loaded"></control:Repa>
|
||||
<control:Repa Grid.Row="1" x:Name="RepasDemain" Grid.Column="1" ></control:Repa>
|
||||
<control:Repa Grid.Row="1" x:Name="RepasApresDemain" Grid.Column="2" ></control:Repa>
|
||||
<DataGrid Grid.Row="2" x:Name="dgEventFutur" ItemsSource="{Binding BcpPlats}" VerticalScrollBarVisibility="Visible"
|
||||
IsReadOnly="True" AutoGenerateColumns="False" IsEnabled="{Binding ActiverBcpFiche, Mode=OneWay}"
|
||||
SelectedItem="{Binding PlatSelectionnee, Mode=TwoWay}" Height="auto">
|
||||
<DataGrid x:Name="dgEventFuture0" Grid.Column="0" Grid.Row="2" ItemsSource="{Binding BcpEvent}" VerticalScrollBarVisibility="Visible"
|
||||
IsReadOnly="True" AutoGenerateColumns="False" Height="auto">
|
||||
<DataGrid.Columns>
|
||||
<DataGridTextColumn Visibility="Hidden" Binding="{Binding ID_plat}" />
|
||||
<DataGridTextColumn Header="Avent Avent Hier" Binding="{Binding P_nom}" Width="*" />
|
||||
<DataGridTextColumn Visibility="Hidden" Binding="{Binding ID_event}" />
|
||||
<DataGridTextColumn Header="Event Aujourd'hui" Binding="{Binding E_description}" Width="*" />
|
||||
</DataGrid.Columns>
|
||||
</DataGrid>
|
||||
<DataGrid Grid.Row="2" Grid.Column="1" x:Name="dgEventFutur2" ItemsSource="{Binding BcpPlats}" VerticalScrollBarVisibility="Visible"
|
||||
IsReadOnly="True" AutoGenerateColumns="False" IsEnabled="{Binding ActiverBcpFiche, Mode=OneWay}"
|
||||
SelectedItem="{Binding PlatSelectionnee, Mode=TwoWay}" Height="auto">
|
||||
<DataGrid x:Name="dgEventFuture1" Grid.Column="1" Grid.Row="2" ItemsSource="{Binding BcpEvent}" VerticalScrollBarVisibility="Visible"
|
||||
IsReadOnly="True" AutoGenerateColumns="False" Height="auto">
|
||||
<DataGrid.Columns>
|
||||
<DataGridTextColumn Visibility="Hidden" Binding="{Binding ID_plat}" />
|
||||
<DataGridTextColumn Header="Avent Avent Hier" Binding="{Binding P_nom}" Width="*" />
|
||||
<DataGridTextColumn Visibility="Hidden" Binding="{Binding ID_event}" />
|
||||
<DataGridTextColumn Header="Event demain" Binding="{Binding E_description}" Width="*" />
|
||||
</DataGrid.Columns>
|
||||
</DataGrid>
|
||||
<DataGrid Grid.Row="2" Grid.Column="2" x:Name="dgEventFutur3" ItemsSource="{Binding BcpPlats}" VerticalScrollBarVisibility="Visible"
|
||||
IsReadOnly="True" AutoGenerateColumns="False" IsEnabled="{Binding ActiverBcpFiche, Mode=OneWay}"
|
||||
SelectedItem="{Binding PlatSelectionnee, Mode=TwoWay}" Height="auto">
|
||||
<DataGrid x:Name="dgEventFuture2" Grid.Column="2" Grid.Row="2" ItemsSource="{Binding BcpEvent}" VerticalScrollBarVisibility="Visible"
|
||||
IsReadOnly="True" AutoGenerateColumns="False" Height="auto">
|
||||
<DataGrid.Columns>
|
||||
<DataGridTextColumn Visibility="Hidden" Binding="{Binding ID_plat}" />
|
||||
<DataGridTextColumn Header="Avent Avent Hier" Binding="{Binding P_nom}" Width="*" />
|
||||
<DataGridTextColumn Visibility="Hidden" Binding="{Binding ID_event}" />
|
||||
<DataGridTextColumn Header="Event après demain" Binding="{Binding E_description}" Width="*" />
|
||||
</DataGrid.Columns>
|
||||
</DataGrid>
|
||||
<control:EventFutur Grid.Row="2" x:Name="EventFuture1" ></control:EventFutur>
|
||||
<control:EventFutur Grid.Row="2" x:Name="EventFuture2" Grid.Column="1"></control:EventFutur>
|
||||
<control:EventFutur Grid.Row="2" x:Name="EventFuture3" Grid.Column="2"></control:EventFutur>
|
||||
|
||||
<materialDesign:PackIcon Kind="Close" Grid.Column="3" HorizontalAlignment="Right" Cursor="Hand" MouseDown="PackIcon_MouseDown"/>
|
||||
</Grid>
|
||||
|
||||
|
||||
|
|
|
@ -58,12 +58,15 @@ namespace ProjetTheAlone.View
|
|||
//EventPasse2.DataContext = EventPasse1.DataContext = Epm;
|
||||
|
||||
|
||||
|
||||
testQuand.DataContext = RepasAjd.DataContext = new RepaModel(DateTime.Now);
|
||||
RepasDemain.DataContext = new RepaModel(DateTime.Now.AddDays(1));
|
||||
RepasApresDemain.DataContext = new RepaModel(DateTime.Now.AddDays(2));
|
||||
var a = testQuand.DataContext;
|
||||
|
||||
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));
|
||||
dgEventFuture0.DataContext = new EventDGV_VM(DateTime.Now.AddDays(0));
|
||||
dgEventFuture1.DataContext = new EventDGV_VM(DateTime.Now.AddDays(1));
|
||||
dgEventFuture2.DataContext = new EventDGV_VM(DateTime.Now.AddDays(2));
|
||||
|
||||
}
|
||||
|
||||
|
@ -90,7 +93,9 @@ namespace ProjetTheAlone.View
|
|||
|
||||
private void wnd_Loaded(object sender, RoutedEventArgs e)
|
||||
{
|
||||
this.Alert.DataContext = new ViewModel.TextDefilant(this.Alert, "UNE ALERTE QUELQUONQUE", 100);
|
||||
|
||||
|
||||
this.Alert.DataContext = new ViewModel.VM_DashBoard(this.Alert, "", 200);
|
||||
}
|
||||
}
|
||||
public class DebugDummyConverter : IValueConverter
|
||||
|
|
|
@ -38,10 +38,10 @@ namespace ProjetTheAlone.ViewModel
|
|||
public RepaModel(DateTime d)
|
||||
{
|
||||
ListPlat = new ObservableCollection<C_T_plat>(new Gestion.G_T_repa(Config.Settings1.Default.schCon).Lire(d) as List<C_T_plat>);
|
||||
Plat1 = (ListPlat.Count > 0) ? ListPlat[0] : new C_T_plat("NULL", Outil.toNullableByteArray.Convert(Outil.picToByteArray.Convert(@".\desert.jpg")), null);
|
||||
Plat2 = (ListPlat.Count > 1) ? ListPlat[1] : new C_T_plat("NULL", Outil.toNullableByteArray.Convert(Outil.picToByteArray.Convert(@".\desert.jpg")), null);
|
||||
Plat3 = (ListPlat.Count > 2) ? ListPlat[2] : new C_T_plat("NULL", Outil.toNullableByteArray.Convert(Outil.picToByteArray.Convert(@".\desert.jpg")), null);
|
||||
Quand = d.ToString();
|
||||
Plat1 = (ListPlat.Count > 0) ? ListPlat[0] : new C_T_plat();
|
||||
Plat2 = (ListPlat.Count > 1) ? ListPlat[1] : new C_T_plat();
|
||||
Plat3 = (ListPlat.Count > 2) ? ListPlat[2] : new C_T_plat();
|
||||
Quand = d.ToShortDateString();
|
||||
}
|
||||
public RepaModel(ObservableCollection<C_T_plat> ListPlat, string quand)
|
||||
{
|
||||
|
|
|
@ -12,13 +12,13 @@ using System.Windows.Media;
|
|||
|
||||
namespace ProjetTheAlone.ViewModel
|
||||
{
|
||||
class TextDefilant : BasePropriete
|
||||
public class TextDefilant : BasePropriete
|
||||
{
|
||||
Timer aTimer;
|
||||
public Timer aTimer;
|
||||
|
||||
TextBlock textContainer;
|
||||
public TextBlock textContainer;
|
||||
char[] textAfficherBuffer;
|
||||
public string TextAfficher { set => fillBuffer(value); get { return new string(textAfficherBuffer); } }
|
||||
public string TextAfficher { set { fillBuffer(value); } get { return new string(textAfficherBuffer); } }
|
||||
|
||||
|
||||
public TextDefilant(TextBlock tb, string text, int timeMs)
|
||||
|
|
|
@ -1,12 +1,49 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Specialized;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Controls;
|
||||
|
||||
namespace ProjetTheAlone.ViewModel
|
||||
{
|
||||
class VM_DashBoard
|
||||
public class VM_DashBoard : TextDefilant
|
||||
{
|
||||
public StringCollection Alerte
|
||||
{
|
||||
get
|
||||
{
|
||||
if (Config.Settings1.Default.alerte != null)
|
||||
return Config.Settings1.Default.alerte;
|
||||
else
|
||||
return new StringCollection();
|
||||
}
|
||||
set
|
||||
{
|
||||
Config.Settings1.Default.alerte = value;
|
||||
OnPropertyChanged("Alerte");
|
||||
}
|
||||
}
|
||||
|
||||
public VM_DashBoard(TextBlock tb, string text, int timeMs) : base (tb,text, timeMs)
|
||||
{
|
||||
updateAlert();
|
||||
}
|
||||
public void updateAlert()
|
||||
{
|
||||
|
||||
string alert = "ALERTE : ";
|
||||
foreach (string s in Alerte)
|
||||
alert += $"{s};;";
|
||||
var anifBen = new Gestion.G_T_beneficiaire(Config.Settings1.Default.schCon).AnnifDuJour();
|
||||
if (anifBen.Count > 0)
|
||||
{
|
||||
alert += "ANNIVERSAIRE DE :";
|
||||
foreach (Classes.C_T_beneficiaire b in anifBen)
|
||||
alert += $" {b.B_prenom} {b.B_nom} ;;";
|
||||
}
|
||||
base.TextAfficher = alert;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -46,6 +46,7 @@ SELECT T_beneficiaire.ID_beneficiaire, T_beneficiaire.B_nom,T_beneficiaire.B_pre
|
|||
WHERE T_listParticipant.ID_equipe=@ID_Equipe;
|
||||
RETURN
|
||||
GO
|
||||
|
||||
/*
|
||||
RRRRRRRRRRRRRRRRR EEEEEEEEEEEEEEEEEEEEEEPPPPPPPPPPPPPPPPP AAA
|
||||
R::::::::::::::::R E::::::::::::::::::::EP::::::::::::::::P A:::A
|
||||
|
|
Loading…
Reference in New Issue