finalisation du binding de le vue opération
continuous-integration/drone/push Build is passing Details

UI_Windows
Nicolas MAYE 2 years ago
parent f5f2686c91
commit 90340af065

@ -6,6 +6,7 @@ namespace IHM
public partial class App : Application public partial class App : Application
{ {
public Manager Manager { get; set; } = new Manager(new PersLinqToPgSQL()); public Manager Manager { get; set; } = new Manager(new PersLinqToPgSQL());
public App() public App()
{ {

@ -10,6 +10,7 @@ namespace IHM
public partial class AppShellDesktop : Shell public partial class AppShellDesktop : Shell
{ {
public Manager Mgr => (App.Current as App).Manager; public Manager Mgr => (App.Current as App).Manager;
public Manager Mgr2 => (App.Current as App).Manager;

@ -59,44 +59,66 @@
<ContentView BackgroundColor="{StaticResource Yellow300Accent}" Grid.Column="0" Grid.Row="2" Grid.ColumnSpan="4" Grid.RowSpan="2" Margin="15" x:Name="windowAjout">
<ContentView Grid.Column="0" Grid.Row="2" Grid.ColumnSpan="4" Grid.RowSpan="2" Margin="15" x:Name="windowAjout">
<Grid BackgroundColor="{StaticResource Yellow300Accent}"> <CollectionView ItemsSource="{Binding}" Grid.Row="2" Grid.ColumnSpan="4" Grid.RowSpan="2">
<Grid.RowDefinitions>
<RowDefinition Height="1*"/> <CollectionView.ItemTemplate>
<RowDefinition Height="1*"/>
<RowDefinition Height="2*"/> <DataTemplate>
<RowDefinition Height="2*"/> <Grid>
<RowDefinition Height="2*"/> <Grid.ColumnDefinitions>
<RowDefinition Height="2*"/> <ColumnDefinition Width="1*"/>
<RowDefinition Height="2*"/> <ColumnDefinition Width="1*"/>
</Grid.RowDefinitions> <ColumnDefinition Width="1*"/>
<Grid.ColumnDefinitions> <ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/> <ColumnDefinition Width="1*"/>
<ColumnDefinition Width="2*"/>
<ColumnDefinition Width="1*"/> </Grid.ColumnDefinitions>
<ColumnDefinition Width="2*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Label Grid.Column="0" Text="{Binding Nom}"
TextColor="{StaticResource Secondary}"
FontAttributes="Bold" FontSize="Body"
HorizontalOptions="Center"
VerticalOptions="Center"/>
<Label Grid.Column="1" Text="{Binding Date}"
</Grid> TextColor="{StaticResource Secondary}"
FontAttributes="Bold" FontSize="Body"
HorizontalOptions="Center"
VerticalOptions="Center"/>
<Label Grid.Column="2" Text="{Binding Type}"
TextColor="{StaticResource Secondary}"
FontAttributes="Bold" FontSize="Body"
HorizontalOptions="Center"
VerticalOptions="Center"/>
<Label Grid.Column="3" Text="{Binding Tag}"
TextColor="{StaticResource Secondary}"
FontAttributes="Bold" FontSize="Body"
HorizontalOptions="Center"
VerticalOptions="Center"/>
<Label Grid.Column="4" Text="{Binding Montant}"
TextColor="{StaticResource Secondary}"
FontAttributes="Bold" FontSize="Body"
HorizontalOptions="Center"
VerticalOptions="Center"/>
</Grid>
</DataTemplate>
</CollectionView.ItemTemplate>
</CollectionView>
</ContentView> </ContentView>
</Grid> </Grid>
</ContentView> </ContentView>

@ -1,10 +1,53 @@
using Model;
namespace IHM.Desktop; namespace IHM.Desktop;
public partial class Operations : ContentView public partial class Operations : ContentView
{ {
public Operations()
List<Operation> operations;
public Operations()
{ {
InitializeComponent(); InitializeComponent();
// Temporaire pour établir le binding de la vue
operations = new List<Operation>();
operations.Add(new("course", "CB", "Alimentation", "12/12/2022", 22.45));
operations.Add(new("essence", "cheque", "Carburant", "12/12/2022", 45.80));
operations.Add(new("Orange", "Prelevement", "Facture", "12/12/2022", 48));
operations.Add(new("course", "CB", "Alimentation", "12/12/2022", 22.45));
operations.Add(new("essence", "cheque", "Carburant", "12/12/2022", 45.80));
operations.Add(new("Orange", "Prelevement", "Facture", "12/12/2022", 48));
operations.Add(new("course", "CB", "Alimentation", "12/12/2022", 22.45));
operations.Add(new("essence", "cheque", "Carburant", "12/12/2022", 45.80));
operations.Add(new("Orange", "Prelevement", "Facture", "12/12/2022", 48));
operations.Add(new("course", "CB", "Alimentation", "12/12/2022", 22.45));
operations.Add(new("essence", "cheque", "Carburant", "12/12/2022", 45.80));
operations.Add(new("Orange", "Prelevement", "Facture", "12/12/2022", 48));
operations.Add(new("course", "CB", "Alimentation", "12/12/2022", 22.45));
operations.Add(new("essence", "cheque", "Carburant", "12/12/2022", 45.80));
operations.Add(new("Orange", "Prelevement", "Facture", "12/12/2022", 48));
operations.Add(new("course", "CB", "Alimentation", "12/12/2022", 22.45));
operations.Add(new("essence", "cheque", "Carburant", "12/12/2022", 45.80));
operations.Add(new("Orange", "Prelevement", "Facture", "12/12/2022", 48));
operations.Add(new("course", "CB", "Alimentation", "12/12/2022", 22.45));
operations.Add(new("essence", "cheque", "Carburant", "12/12/2022", 45.80));
operations.Add(new("Orange", "Prelevement", "Facture", "12/12/2022", 48));
operations.Add(new("course", "CB", "Alimentation", "12/12/2022", 22.45));
operations.Add(new("essence", "cheque", "Carburant", "12/12/2022", 45.80));
operations.Add(new("Orange", "Prelevement", "Facture", "12/12/2022", 48));
operations.Add(new("course", "CB", "Alimentation", "12/12/2022", 22.45));
operations.Add(new("essence", "cheque", "Carburant", "12/12/2022", 45.80));
operations.Add(new("Orange", "Prelevement", "Facture", "12/12/2022", 48));
operations.Add(new("course", "CB", "Alimentation", "12/12/2022", 22.45));
operations.Add(new("essence", "cheque", "Carburant", "12/12/2022", 45.80));
operations.Add(new("Orange", "Prelevement", "Facture", "12/12/2022", 48));
operations.Add(new("course", "CB", "Alimentation", "12/12/2022", 22.45));
operations.Add(new("essence", "cheque", "Carburant", "12/12/2022", 45.80));
operations.Add(new("Orange", "Prelevement", "Facture", "12/12/2022", 48));
BindingContext = operations;
} }
private void AddCredit_Clicked(object sender, EventArgs e) private void AddCredit_Clicked(object sender, EventArgs e)

@ -17,5 +17,6 @@ namespace Model
bool ExistEmail(string mail); bool ExistEmail(string mail);
void ChangePasswordBdd(string mail, string newMdp); void ChangePasswordBdd(string mail, string newMdp);
string RecupMdpBdd(string mail); string RecupMdpBdd(string mail);
} }
} }

@ -34,6 +34,7 @@ namespace Model
} }
} }
private Banque selectedBanque; private Banque selectedBanque;
/// <summary> /// <summary>
/// A compléter /// A compléter
@ -46,6 +47,9 @@ namespace Model
Pers = persistance; Pers = persistance;
} }
/// <summary> /// <summary>
/// Permet la supression d'un inscrit de la base de donnée. /// Permet la supression d'un inscrit de la base de donnée.
/// </summary> /// </summary>

@ -8,5 +8,23 @@ namespace Model
{ {
public class Operation public class Operation
{ {
public string Nom { get; private set; }
public string Type { get; private set; }
public string Tag { get; private set; }
public double Montant { get; private set; }
public string Date { get; private set; }
public Operation(string nom, string type, string tag, string date, double montant)
{
Nom = nom;
Type = type;
Tag = tag;
Date = DateTime.Now.ToString("dd/MM/yyyy");
Montant = montant;
}
} }
} }

@ -11,7 +11,9 @@ namespace Model
public List<Banque> Banques = new(); public List<Banque> Banques = new();
public List<Inscrit> Inscrits = new(); public List<Inscrit> Inscrits = new();
public List<Compte> Comptes = new(); public List<Compte> Comptes = new();
public List<Operation> operations = new();
// ajouter load all pour tout les inscrits // ajouter load all pour tout les inscrits
public List<Inscrit> LoadInscrit() public List<Inscrit> LoadInscrit()
@ -38,7 +40,17 @@ namespace Model
return Comptes; return Comptes;
} }
// Load les opérations
public List<Operation> loadOperation()
{
operations.Add(new("course", "CB", "Alimentation", "12/12/2022", 22.45));
operations.Add(new("essence", "cheque", "Carburant", "12/12/2022", 45.80));
operations.Add(new("Orange", "Prelevement", "Facture", "12/12/2022", 48));
return operations;
}
} }
} }

Loading…
Cancel
Save