Merge branch 'Binding' of https://codefirst.iut.uca.fr/git/ConsEcoTeam/ConsEco into Binding
continuous-integration/drone/push Build is failing Details

pull/143/head
Hugo LIVET 2 years ago
commit 6db964aafb

@ -13,6 +13,8 @@
<RowDefinition Height="2*"/> <RowDefinition Height="2*"/>
<RowDefinition Height="2*"/> <RowDefinition Height="2*"/>
<RowDefinition Height="2*"/> <RowDefinition Height="2*"/>
<RowDefinition Height="2*"/>
<RowDefinition Height="2*"/>
</Grid.RowDefinitions> </Grid.RowDefinitions>
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/> <ColumnDefinition Width="1*"/>
@ -23,20 +25,26 @@
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<Label Text="Planification d'une échéance" Grid.Column="1" Grid.Row="0" Grid.ColumnSpan="3" Style="{StaticResource TitreWindows}"/>
<Label Text="Nom" Grid.Column="1" Grid.Row="2" Style="{StaticResource TitreWindows}" Margin="20"/> <Label Text="Planification d'une échéance" Grid.Column="1" Grid.Row="0" Grid.ColumnSpan="5" Style="{StaticResource TitreWindows}" VerticalOptions="Center"/>
<Label Text="Montant" Grid.Column="1" Grid.Row="3" Style="{StaticResource TitreWindows}" Margin="20"/> <Label Text="Nom" Grid.Column="1" Grid.Row="2" Style="{StaticResource TitreWindows}" Margin="20"/>
<Label Text="Type" Grid.Column="1" Grid.Row="4" Style="{StaticResource TitreWindows}" Margin="20"/> <Label Text="Montant" Grid.Column="1" Grid.Row="3" Style="{StaticResource TitreWindows}" Margin="20"/>
<Label Text="Date" Grid.Column="1" Grid.Row="5" Style="{StaticResource TitreWindows}" Margin="20"/> <Label Text="Type" Grid.Column="1" Grid.Row="4" Style="{StaticResource TitreWindows}" Margin="20"/>
<Label Text="Tag" Grid.Column="1" Grid.Row="5" Style="{StaticResource TitreWindows}" Margin="20"/>
<Label Text="Date" Grid.Column="1" Grid.Row="6" Style="{StaticResource TitreWindows}" Margin="20"/>
<Entry Placeholder="Entrez un nom" Grid.Column="3" Grid.Row="2" Style="{StaticResource zoneDeTexte}" Margin="20" x:Name="name" IsTextPredictionEnabled="True"/>
<Entry Placeholder="Entrez un montant" Grid.Column="3" Grid.Row="3" Style="{StaticResource zoneDeTexte}" Margin="20" x:Name="montant"/>
<Entry Placeholder="Entrez un moyen de paiement" Grid.Column="3" Grid.Row="4" Style="{StaticResource zoneDeTexte}" Margin="20" x:Name="type"/>
<Entry Placeholder="Entrez une catégorie" Grid.Column="3" Grid.Row="5" Style="{StaticResource zoneDeTexte}" Margin="20" x:Name="tag"/>
<DatePicker Grid.Column="3" Grid.Row="6" BackgroundColor="{StaticResource Secondary}" Margin="20" x:Name="date"/>
<Entry Placeholder="Entrez un nom" Grid.Column="3" Grid.Row="2" Style="{StaticResource zoneDeTexte}" Margin="20"/>
<Entry Placeholder="Entrez un montant" Grid.Column="3" Grid.Row="3" Style="{StaticResource zoneDeTexte}" Margin="20"/>
<Entry Placeholder="Entrez un type de transaction" Grid.Column="3" Grid.Row="4" Style="{StaticResource zoneDeTexte}" Margin="20"/>
<DatePicker Grid.Column="3" Grid.Row="5" BackgroundColor="{StaticResource Secondary}" Margin="20"/>
<Button Text="ANNULER" Clicked="annuler_button" Grid.Column="1" Grid.Row="6" Style="{StaticResource WindowsButton}"/> <Button Text="ANNULER" Clicked="Button_Annuler" Grid.Column="1" Grid.Row="7" Style="{StaticResource WindowsButton2}"/>
<Button Text="VALIDER" Clicked="annuler_button" Grid.Column="3" Grid.Row="6" Style="{StaticResource WindowsButton}"/> <Button Text="VALIDER" Clicked="Button_Valider" Grid.Column="3" Grid.Row="7" Style="{StaticResource WindowsButton}"/>
</Grid> </Grid>

@ -1,17 +1,58 @@
using Model;
namespace IHM.Desktop; namespace IHM.Desktop;
public partial class CV_AddPlanification : ContentView public partial class CV_AddPlanification : ContentView
{ {
public CV_AddPlanification() public Manager Mgr => (App.Current as App).Manager;
public CV_AddPlanification()
{ {
InitializeComponent(); InitializeComponent();
} Mgr.LoadBanque();
Mgr.LoadCompte();
private void annuler_button(object sender, EventArgs e)
{
} BindingContext = Mgr;
}
private void Button_Annuler(object sender, EventArgs e)
{
Navigation.PushAsync(new Dashboard());
}
private void Button_Valider(object sender, EventArgs e)
{
string nom = name.Text;
double Montant = Double.Parse(montant.Text);
string Type = type.Text;
string Tag = tag.Text;
DateTime Date = date.Date;
TagOperation to2 = new TagOperation();
MethodePayement mp2 = new MethodePayement();
foreach (string mp in Enum.GetNames(typeof(MethodePayement)))
{
if (Equals(Type, mp))
{
mp2 = (MethodePayement)Enum.Parse(typeof(MethodePayement), Type);
}
}
foreach (string to in Enum.GetNames(typeof(TagOperation)))
{
if (Equals(Tag, to))
{
to2 = (TagOperation)Enum.Parse(typeof(TagOperation), Tag);
}
}
Model.Planification planification = new(nom, Montant, Date, mp2, to2,false);
Mgr.ajouterPlanification(Mgr.SelectedCompte, planification);
Navigation.PushAsync(new Dashboard());
}
} }

@ -24,15 +24,16 @@
<ColumnDefinition Width="1*"/> <ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<Label Text="Supprimer une planification" Grid.Column="1" Grid.Row="0" Grid.ColumnSpan="3" Style="{StaticResource TitreWindows}"/> <Label Text="Supprimer une planification" Grid.Column="1" Grid.Row="0" Grid.ColumnSpan="3" Style="{StaticResource TitreWindows}" VerticalOptions="Center"/>
<Label Text="Selectionner la planification" Grid.ColumnSpan="3" Grid.Column="0" Grid.Row="3" Style="{StaticResource TitreWindows}" Margin="20"/> <Label Text="Selectionner la planification" Grid.ColumnSpan="3" Grid.Column="0" Grid.Row="3" Style="{StaticResource TitreWindows}" VerticalOptions="Center"/>
<inputs:SfComboBox HeightRequest="50" ItemsSource="{Binding Nom}" DisplayMemberPath="Name" Grid.Column="3" Grid.Row="3"/>
<Button Text="ANNULER" Clicked="Button_Clicked" Grid.Column="1" Grid.Row="6" Style="{StaticResource WindowsButton}"/> <inputs:SfComboBox HeightRequest="50" ItemsSource="{Binding SelectedCompte.LesPla}" Grid.Column="3" Grid.Row="3" x:Name="recup"/>
<Button Text="VALIDER" Clicked="Button_Clicked_1" Grid.Column="3" Grid.Row="6" Style="{StaticResource WindowsButton}"/>
<Button Text="ANNULER" Clicked="Button_Annuler" Grid.Column="1" Grid.Row="5" Style="{StaticResource WindowsButton2}"/>
<Button Text="VALIDER" Clicked="Button_Valider" Grid.Column="3" Grid.Row="5" Style="{StaticResource WindowsButton}"/>

@ -1,19 +1,29 @@
using Model;
namespace IHM.Desktop; namespace IHM.Desktop;
public partial class CV_DeletePlanification : ContentView public partial class CV_DeletePlanification : ContentView
{ {
public CV_DeletePlanification() public Manager Mgr => (App.Current as App).Manager;
public CV_DeletePlanification()
{ {
InitializeComponent(); InitializeComponent();
} Mgr.LoadBanque();
Mgr.LoadCompte();
private void Button_Clicked(object sender, EventArgs e)
{
} BindingContext = Mgr;
}
private void Button_Clicked_1(object sender, EventArgs e) private void Button_Annuler(object sender, EventArgs e)
{ {
Navigation.PushAsync(new Dashboard());
}
} private void Button_Valider(object sender, EventArgs e)
{
var s = recup.SelectedItem;
Model.Planification planification = (Model.Planification)s;
Mgr.supprimerPlanification(Mgr.SelectedCompte, planification);
Navigation.PushAsync(new Dashboard());
}
} }

@ -24,15 +24,15 @@
<ColumnDefinition Width="1*"/> <ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<Label Text="Enregistrer une échéance" Grid.Column="1" Grid.Row="0" Grid.ColumnSpan="3" Style="{StaticResource TitreWindows}"/> <Label Text="Enregistrer une échéance" Grid.Column="1" Grid.Row="0" Grid.ColumnSpan="3" Style="{StaticResource TitreWindows}" VerticalOptions="Center"/>
<Label Text="Selectionner l'échéance" Grid.ColumnSpan="3" Grid.Column="0" Grid.Row="3" Style="{StaticResource TitreWindows}" Margin="20"/> <Label Text="Selectionner l'échéance" Grid.ColumnSpan="3" Grid.Column="0" Grid.Row="3" Style="{StaticResource TitreWindows}" VerticalOptions="Center"/>
<inputs:SfComboBox HeightRequest="50" ItemsSource="{Binding Nom}" DisplayMemberPath="Name" Grid.Column="3" Grid.Row="3"/> <inputs:SfComboBox HeightRequest="50" ItemsSource="{Binding SelectedCompte.LesEch}" Grid.Column="3" Grid.Row="3" x:Name="recup"/>
<Button Text="ANNULER" Clicked="Button_Clicked" Grid.Column="1" Grid.Row="6" Style="{StaticResource WindowsButton}"/> <Button Text="ANNULER" Clicked="Button_Annuler" Grid.Column="1" Grid.Row="5" Style="{StaticResource WindowsButton2}"/>
<Button Text="VALIDER" Clicked="Button_Clicked_1" Grid.Column="3" Grid.Row="6" Style="{StaticResource WindowsButton}"/> <Button Text="VALIDER" Clicked="Button_Valider" Grid.Column="3" Grid.Row="5" Style="{StaticResource WindowsButton}"/>

@ -1,24 +1,35 @@
using Model;
namespace IHM.Desktop; namespace IHM.Desktop;
public partial class CV_EnregistrerEcheance : ContentView public partial class CV_EnregistrerEcheance : ContentView
{ {
public Manager Mgr => (App.Current as App).Manager;
public CV_EnregistrerEcheance() public CV_EnregistrerEcheance()
{ {
InitializeComponent(); InitializeComponent();
Mgr.LoadBanque();
Mgr.LoadCompte();
BindingContext = Mgr;
} }
private void Button_Clicked(object sender, EventArgs e) private void Button_Annuler(object sender, EventArgs e)
{ {
Navigation.PushAsync(new Dashboard());
}
} private void Button_Valider(object sender, EventArgs e)
private void Button_Clicked_1(object sender, EventArgs e)
{ {
var s = recup.SelectedItem;
Echeance ech = (Echeance)s;
Operation operation = new Operation(ech.Nom, ech.Montant, ech.DateOperation, ech.ModePayement,ech.Tag,ech.IsDebit);
} Mgr.effectuerOperation(Mgr.SelectedCompte, operation);
Mgr.supprimerEcheance(Mgr.SelectedCompte, ech);
Navigation.PushAsync(new Dashboard());
}
} }

@ -7,7 +7,7 @@
<Grid BackgroundColor="{StaticResource Tertiary}"> <Grid BackgroundColor="{StaticResource Tertiary}">
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="0.25*"/> <RowDefinition Height="0.25*"/>
<RowDefinition Height="0.25"/> <RowDefinition Height="1*"/>
<RowDefinition Height="1*"/> <RowDefinition Height="1*"/>
<RowDefinition Height="1*"/> <RowDefinition Height="1*"/>
@ -22,9 +22,7 @@
<Label Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" <Label Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2"
Text="Selection de banque" Text="BANQUE"
FontSize="Large"
FontAttributes="Bold"
VerticalOptions="Center" VerticalOptions="Center"
HorizontalOptions="Center" HorizontalOptions="Center"
Style="{StaticResource TitreWindows}" Style="{StaticResource TitreWindows}"

@ -27,6 +27,7 @@
<Label <Label
Grid.Column="0" Grid.Row="0" Grid.ColumnSpan="4" Grid.Column="0" Grid.Row="0" Grid.ColumnSpan="4"
VerticalOptions="Center"
Style="{StaticResource TitreWindows}" Style="{StaticResource TitreWindows}"
Text="GESTION DU COMPTE" Text="GESTION DU COMPTE"
HorizontalOptions="Center"/> HorizontalOptions="Center"/>
@ -41,6 +42,8 @@
<Label Grid.ColumnSpan="2" Grid.Column="2" Grid.Row="4" Style="{StaticResource TitreWindows}" Text="{Binding Mail}"/> <Label Grid.ColumnSpan="2" Grid.Column="2" Grid.Row="4" Style="{StaticResource TitreWindows}" Text="{Binding Mail}"/>
<Button Text="QUITTER" Clicked="Button_Quitter" Grid.Column="6" Grid.Row="0" Margin="25" Style="{StaticResource WindowsButton2}"/>

@ -1,5 +1,7 @@
using Model; using Model;
namespace IHM.Desktop; namespace IHM.Desktop;
public partial class CV_Log : ContentView public partial class CV_Log : ContentView
@ -11,4 +13,9 @@ public partial class CV_Log : ContentView
BindingContext = Mgr.User; BindingContext = Mgr.User;
} }
private void Button_Quitter(object sender, EventArgs e)
{
Microsoft.Maui.Controls.Application.Current?.CloseWindow(Microsoft.Maui.Controls.Application.Current.MainPage.Window);
}
} }

@ -11,7 +11,7 @@
<RowDefinition Height="0.75*"/> <RowDefinition Height="0.75*"/>
<RowDefinition Height="0.5*"/> <RowDefinition Height="0.5*"/>
<RowDefinition Height="5*"/> <RowDefinition Height="5*"/>
<RowDefinition Height="1*"/> <RowDefinition Height="0.7*"/>
</Grid.RowDefinitions> </Grid.RowDefinitions>
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
@ -24,7 +24,8 @@
Grid.Column="0" Grid.Row="0" Grid.ColumnSpan="2" Grid.Column="0" Grid.Row="0" Grid.ColumnSpan="2"
Style="{StaticResource TitreWindows}" Style="{StaticResource TitreWindows}"
Text="PLANIFICATION" Text="PLANIFICATION"
HorizontalOptions="Center"/> HorizontalOptions="Center"
VerticalOptions="Center"/>
<Button <Button
@ -53,11 +54,11 @@
<ColumnDefinition Width="1*"/> <ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<Label Text="Nom" Grid.Column="0" TextColor="{StaticResource Secondary}" HorizontalOptions="Center" FontSize="Micro" FontAttributes="Bold"></Label> <Label Text="Nom" Grid.Column="0" TextColor="{StaticResource Secondary}" HorizontalOptions="Center" FontSize="Micro" FontAttributes="Bold" VerticalOptions="Center"></Label>
<Label Text="Date" Grid.Column="1" TextColor="{StaticResource Secondary}" HorizontalOptions="Center" FontSize="Micro" FontAttributes="Bold"></Label> <Label Text="Date" Grid.Column="1" TextColor="{StaticResource Secondary}" HorizontalOptions="Center" FontSize="Micro" FontAttributes="Bold" VerticalOptions="Center"></Label>
<Label Text="Moyen de Paiement" Grid.Column="2" TextColor="{StaticResource Secondary}" HorizontalOptions="Center" FontSize="Micro" FontAttributes="Bold"></Label> <Label Text="Moyen de Paiement" Grid.Column="2" TextColor="{StaticResource Secondary}" HorizontalOptions="Center" FontSize="Micro" FontAttributes="Bold" VerticalOptions="Center"></Label>
<Label Text="Tag" Grid.Column="3" TextColor="{StaticResource Secondary}" HorizontalOptions="Center" FontSize="Micro" FontAttributes="Bold"></Label> <Label Text="Tag" Grid.Column="3" TextColor="{StaticResource Secondary}" HorizontalOptions="Center" FontSize="Micro" FontAttributes="Bold" VerticalOptions="Center"></Label>
<Label Text="Montant" Grid.Column="4" TextColor="{StaticResource Secondary}" HorizontalOptions="Center" FontSize="Micro" FontAttributes="Bold"></Label> <Label Text="Montant" Grid.Column="4" TextColor="{StaticResource Secondary}" HorizontalOptions="Center" FontSize="Micro" FontAttributes="Bold" VerticalOptions="Center"></Label>
</Grid> </Grid>
</Border> </Border>
@ -129,6 +130,19 @@
</ContentView> </ContentView>
<Border Stroke="{StaticResource Secondary}" BackgroundColor="{StaticResource Yellow100Accent}" Margin="10,10,10,10" Padding="3" StrokeThickness="4" StrokeShape="RoundRectangle 45,5,5,45" Grid.Row="5" Grid.Column="0" Grid.ColumnSpan="4">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="6*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Label Text="TOTAL" Grid.Column="0" Grid.ColumnSpan="2" HorizontalOptions="Center" TextColor="{StaticResource Secondary}" FontSize="Medium" FontAttributes="Bold" VerticalOptions="Center"></Label>
<Label Text="{Binding SelectedCompte.Solde}" Grid.Column="1" Grid.ColumnSpan="2" HorizontalOptions="Center" TextColor="{StaticResource Secondary}" FontSize="Medium" FontAttributes="Bold" VerticalOptions="Center"></Label>
<Label Text="€" Grid.Column="1" Grid.ColumnSpan="2" HorizontalOptions="End" Margin="0,0,50,0" TextColor="{StaticResource Secondary}" FontSize="Medium" FontAttributes="Bold" VerticalOptions="Center"></Label>
</Grid>
</Border>

@ -23,12 +23,13 @@
<ColumnDefinition Width="1*"/> <ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<StackLayout Grid.Row="0" Grid.ColumnSpan="2">
<Label <Label
Grid.Row="0" Grid.ColumnSpan="2"
Style="{StaticResource TitreWindows}" Style="{StaticResource TitreWindows}"
Text="STATISTIQUES" Text="STATISTIQUES"
VerticalOptions="Center"
HorizontalOptions="Center"/> HorizontalOptions="Center"/>
</StackLayout>
@ -60,7 +61,7 @@
<chart:ColumnSeries <chart:ColumnSeries
Label="Dépense en €" Label="Dépense en €"
ItemsSource="{Binding} " ItemsSource="{Binding SelectedCompte.LesEch} "
XBindingPath="Tag" XBindingPath="Tag"
YBindingPath="Montant" YBindingPath="Montant"
ShowDataLabels="True" ShowDataLabels="True"
@ -115,7 +116,7 @@
<chart:SfCircularChart.Title> <chart:SfCircularChart.Title>
<Label Text="Nombre d'achat par type" TextColor="{StaticResource Secondary}" Grid.Column="4" FontSize="Large" FontAttributes="Bold"/> <Label Text="Nombre d'achat par type" TextColor="{StaticResource Secondary}" Grid.Column="4" FontSize="Large" FontAttributes="Bold"/>
</chart:SfCircularChart.Title> </chart:SfCircularChart.Title>
<chart:PieSeries ItemsSource="{Binding}" <chart:PieSeries ItemsSource="{Binding SelectedCompte.LesOpe}"
XBindingPath="Montant" XBindingPath="Montant"
YBindingPath="Tag" YBindingPath="Tag"
Radius = "1" Radius = "1"

@ -3,23 +3,14 @@ using Model;
public partial class CV_Statistiques : ContentView public partial class CV_Statistiques : ContentView
{ {
public List<Operations> operations; public Manager Mgr => (App.Current as App).Manager;
public CV_Statistiques() public CV_Statistiques()
{ {
InitializeComponent(); InitializeComponent();
List<Operation> operations; Mgr.LoadBanque();
Mgr.LoadCompte();
BindingContext = Mgr;
// Temporaire pour établir le binding de la vue
operations = new List<Operation>();
operations.Add(new("op", 33.44, DateTime.Now, MethodePayement.CB, TagOperation.Divers, false));
operations.Add(new("course", 45.20, DateTime.Now, MethodePayement.CB, TagOperation.Divers, true));
operations.Add(new("Orange", 50, DateTime.Now, MethodePayement.CB, TagOperation.Divers, true));
operations.Add(new("EDF", 55.80, DateTime.Now, MethodePayement.Virement, TagOperation.Energie, true));
operations.Add(new("EDF", 55.80, DateTime.Now, MethodePayement.Virement, TagOperation.Energie, true));
operations.Add(new("EDF", 55.80, DateTime.Now, MethodePayement.Virement, TagOperation.Carburant, true));
BindingContext = operations;
} }
} }

@ -25,20 +25,20 @@
<ColumnDefinition Width="1*"/> <ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<Label Text="Supprimer une échéance" Grid.Column="1" Grid.Row="0" Grid.ColumnSpan="3" Style="{StaticResource TitreWindows}"/> <Label Text="Supprimer une échéance" Grid.Column="1" Grid.Row="0" Grid.ColumnSpan="3" Style="{StaticResource TitreWindows}" VerticalOptions="Center"/>
<Label Text="Selectionner l'échéance" Grid.ColumnSpan="3" Grid.Column="0" Grid.Row="3" Style="{StaticResource TitreWindows}" Margin="20"/> <Label Text="Selectionner l'échéance" Grid.ColumnSpan="3" Grid.Column="0" Grid.Row="3" Style="{StaticResource TitreWindows}" VerticalOptions="Center"/>
<inputs:SfComboBox HeightRequest="50" ItemsSource="{Binding SelectedCompte.LesEch}" Grid.Column="3" Grid.Row="3"/> <inputs:SfComboBox HeightRequest="50" ItemsSource="{Binding SelectedCompte.LesEch}" Grid.Column="3" Grid.Row="3" x:Name="recup"/>
<Button Text="ANNULER" Clicked="Button_Clicked" Grid.Column="1" Grid.Row="6" Style="{StaticResource WindowsButton}"/> <Button Text="ANNULER" Clicked="Button_Annuler" Grid.Column="1" Grid.Row="5" Style="{StaticResource WindowsButton2}"/>
<Button Text="VALIDER" Clicked="Button_Clicked_1" Grid.Column="3" Grid.Row="6" Style="{StaticResource WindowsButton}"/> <Button Text="VALIDER" Clicked="Button_Valider" Grid.Column="3" Grid.Row="5" Style="{StaticResource WindowsButton}"/>
</Grid> </Grid>

@ -1,3 +1,4 @@
using Model; using Model;
namespace IHM.Desktop; namespace IHM.Desktop;
@ -11,18 +12,23 @@ public partial class CV_SupprimerEcheance : ContentView
InitializeComponent(); InitializeComponent();
Mgr.LoadBanque();
Mgr.LoadCompte();
BindingContext = Mgr; BindingContext = Mgr;
} }
private void Button_Clicked(object sender, EventArgs e) private void Button_Annuler(object sender, EventArgs e)
{ {
Navigation.PushAsync(new Dashboard());
}
} private void Button_Valider(object sender, EventArgs e)
private void Button_Clicked_1(object sender, EventArgs e)
{ {
var s = recup.SelectedItem;
Echeance echeance = (Echeance)s;
Mgr.supprimerEcheance(Mgr.SelectedCompte, echeance);
Navigation.PushAsync(new Dashboard());
} }
} }

@ -13,6 +13,8 @@
<RowDefinition Height="2*"/> <RowDefinition Height="2*"/>
<RowDefinition Height="2*"/> <RowDefinition Height="2*"/>
<RowDefinition Height="2*"/> <RowDefinition Height="2*"/>
<RowDefinition Height="2*"/>
<RowDefinition Height="2*"/>
</Grid.RowDefinitions> </Grid.RowDefinitions>
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/> <ColumnDefinition Width="1*"/>
@ -23,20 +25,22 @@
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<Label Text="Effectuer un crédit" Grid.Column="1" Grid.Row="0" Grid.ColumnSpan="5" Style="{StaticResource TitreWindows}"/> <Label Text="Effectuer un crédit" VerticalOptions="Center" Grid.Column="0" Grid.Row="0" Grid.ColumnSpan="5" Style="{StaticResource TitreWindows}"/>
<Label Text="Nom" Grid.Column="1" Grid.Row="2" Style="{StaticResource TitreWindows}" Margin="20"/> <Label Text="Nom" Grid.Column="1" Grid.Row="2" Style="{StaticResource TitreWindows}" Margin="20"/>
<Label Text="Montant" Grid.Column="1" Grid.Row="3" Style="{StaticResource TitreWindows}" Margin="20"/> <Label Text="Montant" Grid.Column="1" Grid.Row="3" Style="{StaticResource TitreWindows}" Margin="20"/>
<Label Text="Type" Grid.Column="1" Grid.Row="4" Style="{StaticResource TitreWindows}" Margin="20"/> <Label Text="Type" Grid.Column="1" Grid.Row="4" Style="{StaticResource TitreWindows}" Margin="20"/>
<Label Text="Date" Grid.Column="1" Grid.Row="5" Style="{StaticResource TitreWindows}" Margin="20"/> <Label Text="Tag" Grid.Column="1" Grid.Row="5" Style="{StaticResource TitreWindows}" Margin="20"/>
<Label Text="Date" Grid.Column="1" Grid.Row="6" Style="{StaticResource TitreWindows}" Margin="20"/>
<Entry Placeholder="Entrez un nom" Grid.Column="3" Grid.Row="2" Style="{StaticResource zoneDeTexte}" Margin="20"/> <Entry Placeholder="Entrez un nom" Grid.Column="3" Grid.Row="2" Style="{StaticResource zoneDeTexte}" Margin="20" x:Name="name" IsTextPredictionEnabled="True"/>
<Entry Placeholder="Entrez un montant" Grid.Column="3" Grid.Row="3" Style="{StaticResource zoneDeTexte}" Margin="20"/> <Entry Placeholder="Entrez un montant" Grid.Column="3" Grid.Row="3" Style="{StaticResource zoneDeTexte}" Margin="20" x:Name="montant"/>
<Entry Placeholder="Entrez un type de transaction" Grid.Column="3" Grid.Row="4" Style="{StaticResource zoneDeTexte}" Margin="20"/> <Entry Placeholder="Entrez un moyen de paiement" Grid.Column="3" Grid.Row="4" Style="{StaticResource zoneDeTexte}" Margin="20" x:Name="type"/>
<DatePicker Grid.Column="3" Grid.Row="5" BackgroundColor="{StaticResource Secondary}" Margin="20"/> <Entry Placeholder="Entrez une catégorie" Grid.Column="3" Grid.Row="5" Style="{StaticResource zoneDeTexte}" Margin="20" x:Name="tag"/>
<DatePicker Grid.Column="3" Grid.Row="6" BackgroundColor="{StaticResource Secondary}" Margin="20" x:Name="date"/>
<Button Text="ANNULER" Clicked="Button_Annuler" Grid.Column="1" Grid.Row="6" Style="{StaticResource WindowsButton}"/> <Button Text="ANNULER" Clicked="Button_Annuler" Grid.Column="1" Grid.Row="7" Style="{StaticResource WindowsButton2}"/>
<Button Text="VALIDER" Clicked="Button_Valider" Grid.Column="3" Grid.Row="6" Style="{StaticResource WindowsButton}"/> <Button Text="VALIDER" Clicked="Button_Valider" Grid.Column="3" Grid.Row="7" Style="{StaticResource WindowsButton}"/>
</Grid> </Grid>

@ -1,20 +1,64 @@
using Model;
namespace IHM.Desktop; namespace IHM.Desktop;
public partial class CV_credit : ContentView public partial class CV_credit : ContentView
{ {
public CV_credit() public Manager Mgr => (App.Current as App).Manager;
public CV_credit()
{ {
InitializeComponent(); InitializeComponent();
} Mgr.LoadBanque();
Mgr.LoadCompte();
private async void Button_Annuler(object sender, EventArgs e) BindingContext = Mgr;
}
private void Button_Annuler(object sender, EventArgs e)
{ {
Navigation.PushAsync(new Dashboard());
} }
private void Button_Valider(object sender, EventArgs e) private void Button_Valider(object sender, EventArgs e)
{ {
string nom = name.Text;
double Montant = Double.Parse(montant.Text);
string Type = type.Text;
string Tag = tag.Text;
DateTime Date = date.Date;
TagOperation to2 = new TagOperation();
MethodePayement mp2 = new MethodePayement();
foreach (string mp in Enum.GetNames(typeof(MethodePayement)))
{
if (Equals(Type, mp))
{
mp2 = (MethodePayement) Enum.Parse(typeof(MethodePayement), Type);
}
}
foreach (string to in Enum.GetNames(typeof(TagOperation)))
{
if (Equals(Tag, to))
{
to2 = (TagOperation)Enum.Parse(typeof(TagOperation), Tag);
}
}
Operation operation = new Operation(nom, Montant, Date, mp2, to2, false, false) ;
Mgr.effectuerOperation(Mgr.SelectedCompte, operation);
Navigation.PushAsync(new Dashboard());
} }
} }

@ -13,6 +13,8 @@
<RowDefinition Height="2*"/> <RowDefinition Height="2*"/>
<RowDefinition Height="2*"/> <RowDefinition Height="2*"/>
<RowDefinition Height="2*"/> <RowDefinition Height="2*"/>
<RowDefinition Height="2*"/>
<RowDefinition Height="2*"/>
</Grid.RowDefinitions> </Grid.RowDefinitions>
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/> <ColumnDefinition Width="1*"/>
@ -23,20 +25,22 @@
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<Label Text="Effectuer un débit" Grid.Column="1" Grid.Row="0" Grid.ColumnSpan="3" Style="{StaticResource TitreWindows}"/> <Label Text="Effectuer un débit" Grid.Column="0" Grid.Row="0" Grid.ColumnSpan="5" Style="{StaticResource TitreWindows}" VerticalOptions="Center" />
<Label Text="Nom" Grid.Column="1" Grid.Row="2" Style="{StaticResource TitreWindows}" Margin="20"/> <Label Text="Nom" Grid.Column="1" Grid.Row="2" Style="{StaticResource TitreWindows}" Margin="20"/>
<Label Text="Montant" Grid.Column="1" Grid.Row="3" Style="{StaticResource TitreWindows}" Margin="20"/> <Label Text="Montant" Grid.Column="1" Grid.Row="3" Style="{StaticResource TitreWindows}" Margin="20"/>
<Label Text="Type" Grid.Column="1" Grid.Row="4" Style="{StaticResource TitreWindows}" Margin="20"/> <Label Text="Type" Grid.Column="1" Grid.Row="4" Style="{StaticResource TitreWindows}" Margin="20"/>
<Label Text="Date" Grid.Column="1" Grid.Row="5" Style="{StaticResource TitreWindows}" Margin="20"/> <Label Text="Tag" Grid.Column="1" Grid.Row="5" Style="{StaticResource TitreWindows}" Margin="20"/>
<Label Text="Date" Grid.Column="1" Grid.Row="6" Style="{StaticResource TitreWindows}" Margin="20"/>
<Entry Placeholder="Entrez un nom" Grid.Column="3" Grid.Row="2" Style="{StaticResource zoneDeTexte}" Margin="20"/> <Entry Placeholder="Entrez un nom" Grid.Column="3" Grid.Row="2" Style="{StaticResource zoneDeTexte}" Margin="20" x:Name="name" IsTextPredictionEnabled="True"/>
<Entry Placeholder="Entrez un montant" Grid.Column="3" Grid.Row="3" Style="{StaticResource zoneDeTexte}" Margin="20"/> <Entry Placeholder="Entrez un montant" Grid.Column="3" Grid.Row="3" Style="{StaticResource zoneDeTexte}" Margin="20" x:Name="montant"/>
<Entry Placeholder="Entrez un type de transaction" Grid.Column="3" Grid.Row="4" Style="{StaticResource zoneDeTexte}" Margin="20"/> <Entry Placeholder="Entrez un moyen de paiement" Grid.Column="3" Grid.Row="4" Style="{StaticResource zoneDeTexte}" Margin="20" x:Name="type"/>
<DatePicker Grid.Column="3" Grid.Row="5" BackgroundColor="{StaticResource Secondary}" Margin="20"/> <Entry Placeholder="Entrez une catégorie" Grid.Column="3" Grid.Row="5" Style="{StaticResource zoneDeTexte}" Margin="20" x:Name="tag"/>
<DatePicker Grid.Column="3" Grid.Row="6" BackgroundColor="{StaticResource Secondary}" Margin="20" x:Name="date"/>
<Button Text="ANNULER" Clicked="Button_Clicked" Grid.Column="1" Grid.Row="6" Style="{StaticResource WindowsButton}"/> <Button Text="ANNULER" Clicked="Button_Annuler" Grid.Column="1" Grid.Row="7" Style="{StaticResource WindowsButton2}"/>
<Button Text="VALIDER" Clicked="Button_Clicked_1" Grid.Column="3" Grid.Row="6" Style="{StaticResource WindowsButton}"/> <Button Text="VALIDER" Clicked="Button_Valider" Grid.Column="3" Grid.Row="7" Style="{StaticResource WindowsButton}"/>
</Grid> </Grid>

@ -1,19 +1,56 @@
using Model;
namespace IHM.Desktop; namespace IHM.Desktop;
public partial class CV_debit : ContentView public partial class CV_debit : ContentView
{ {
public CV_debit() public Manager Mgr => (App.Current as App).Manager;
public CV_debit()
{ {
InitializeComponent(); InitializeComponent();
} Mgr.LoadBanque();
Mgr.LoadCompte();
private void Button_Clicked(object sender, EventArgs e) BindingContext = Mgr;
{ }
} private void Button_Annuler(object sender, EventArgs e)
{
Navigation.PushAsync(new Dashboard());
}
private void Button_Clicked_1(object sender, EventArgs e) private void Button_Valider(object sender, EventArgs e)
{ {
string nom = name.Text;
double Montant = Double.Parse(montant.Text);
string Type = type.Text;
string Tag = tag.Text;
DateTime Date = date.Date;
TagOperation to2 = new TagOperation();
MethodePayement mp2 = new MethodePayement();
foreach (string mp in Enum.GetNames(typeof(MethodePayement)))
{
if (Equals(Type, mp))
{
mp2 = (MethodePayement)Enum.Parse(typeof(MethodePayement), Type);
}
}
foreach (string to in Enum.GetNames(typeof(TagOperation)))
{
if (Equals(Tag, to))
{
to2 = (TagOperation)Enum.Parse(typeof(TagOperation), Tag);
}
}
} Operation operation = new Operation(nom, Montant, Date, mp2, to2, false, true);
Mgr.effectuerOperation(Mgr.SelectedCompte, operation);
Navigation.PushAsync(new Dashboard());
}
} }

@ -23,7 +23,7 @@
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<Label Text="Modification du solde" Grid.Column="1" Grid.Row="0" Grid.ColumnSpan="3" Style="{StaticResource TitreWindows}"/> <Label Text="Modification du solde" Grid.Column="1" Grid.Row="0" Grid.ColumnSpan="3" Style="{StaticResource TitreWindows}" VerticalOptions="Center"/>
<Label Text="Montant" Grid.Column="1" Grid.Row="3" Style="{StaticResource TitreWindows}" Margin="20"/> <Label Text="Montant" Grid.Column="1" Grid.Row="3" Style="{StaticResource TitreWindows}" Margin="20"/>
@ -33,7 +33,7 @@
<Entry Placeholder="Entrez un montant" Grid.Column="3" Grid.Row="3" Style="{StaticResource zoneDeTexte}" Margin="20"/> <Entry Placeholder="Entrez un montant" Grid.Column="3" Grid.Row="3" Style="{StaticResource zoneDeTexte}" Margin="20"/>
<Button Text="ANNULER" Clicked="Button_Clicked" Grid.Column="1" Grid.Row="6" Style="{StaticResource WindowsButton}"/> <Button Text="ANNULER" Clicked="Button_Clicked" Grid.Column="1" Grid.Row="6" Style="{StaticResource WindowsButton2}"/>
<Button Text="VALIDER" Clicked="Button_Clicked_1" Grid.Column="3" Grid.Row="6" Style="{StaticResource WindowsButton}"/> <Button Text="VALIDER" Clicked="Button_Clicked_1" Grid.Column="3" Grid.Row="6" Style="{StaticResource WindowsButton}"/>
</Grid> </Grid>

@ -9,11 +9,11 @@ public partial class CV_modificationSolde : ContentView
private void Button_Clicked(object sender, EventArgs e) private void Button_Clicked(object sender, EventArgs e)
{ {
Navigation.PushAsync(new Dashboard());
} }
private void Button_Clicked_1(object sender, EventArgs e) private void Button_Clicked_1(object sender, EventArgs e)
{ {
Navigation.PushAsync(new Dashboard());
} }
} }

@ -25,16 +25,16 @@
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<Label Text="Retirer une opération" Grid.Column="1" Grid.Row="0" Grid.ColumnSpan="3" Style="{StaticResource TitreWindows}"/> <Label Text="Retirer une opération" Grid.Column="1" Grid.Row="0" Grid.ColumnSpan="3" Style="{StaticResource TitreWindows}" VerticalOptions="Center"/>
<Label Text="Selectionner l'opération" Grid.ColumnSpan="2" Grid.Column="1" Grid.Row="3" Style="{StaticResource TitreWindows}" Margin="20"/> <Label Text="Selectionner l'opération" Grid.ColumnSpan="2" Grid.Column="1" Grid.Row="3" Style="{StaticResource TitreWindows}" VerticalOptions="Center"/>
<inputs:SfComboBox HeightRequest="50" ItemsSource="{Binding }" DisplayMemberPath="Name" Grid.Column="3" Grid.Row="3"/>
<inputs:SfComboBox HeightRequest="50" ItemsSource="{Binding SelectedCompte.LesOpe}" Grid.Column="3" Grid.Row="3" x:Name="recup"/>
<Button Text="ANNULER" Clicked="Button_Clicked" Grid.Column="1" Grid.Row="6" Style="{StaticResource WindowsButton}"/> <Button Text="ANNULER" Clicked="Button_Annuler" Grid.Column="1" Grid.Row="5" Style="{StaticResource WindowsButton2}"/>
<Button Text="VALIDER" Clicked="Button_Clicked_1" Grid.Column="3" Grid.Row="6" Style="{StaticResource WindowsButton}"/> <Button Text="VALIDER" Clicked="Button_Valider" Grid.Column="3" Grid.Row="5" Style="{StaticResource WindowsButton}"/>
</Grid> </Grid>

@ -1,19 +1,30 @@
using Model;
namespace IHM.Desktop; namespace IHM.Desktop;
public partial class CV_retirer : ContentView public partial class CV_retirer : ContentView
{ {
public CV_retirer() public Manager Mgr => (App.Current as App).Manager;
public CV_retirer()
{ {
InitializeComponent(); InitializeComponent();
} Mgr.LoadBanque();
Mgr.LoadCompte();
private void Button_Clicked(object sender, EventArgs e) BindingContext = Mgr;
{ }
} private void Button_Annuler(object sender, EventArgs e)
{
Navigation.PushAsync(new Dashboard());
}
private void Button_Clicked_1(object sender, EventArgs e) private void Button_Valider(object sender, EventArgs e)
{ {
var s = recup.SelectedItem;
Operation operation = (Operation)s;
Mgr.supprimerOperation(Mgr.SelectedCompte, operation);
Navigation.PushAsync(new Dashboard());
} }
} }

@ -23,15 +23,16 @@
<ColumnDefinition Width="1*"/> <ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<Label Text="Supprimer une opération" Grid.Column="1" Grid.Row="0" Grid.ColumnSpan="3" Style="{StaticResource TitreWindows}"/> <Label Text="Supprimer une opération" Grid.Column="1" Grid.Row="0" Grid.ColumnSpan="3" Style="{StaticResource TitreWindows}" VerticalOptions="Center"/>
<Label Text="Selectionner l'opération" Grid.ColumnSpan="2" Grid.Column="1" Grid.Row="3" Style="{StaticResource TitreWindows}" Margin="20"/> <Label Text="Selectionner l'opération" Grid.ColumnSpan="2" Grid.Column="1" Grid.Row="3" Style="{StaticResource TitreWindows}" VerticalOptions="Center"/>
<inputs:SfComboBox HeightRequest="50" ItemsSource="{Binding }" DisplayMemberPath="Name" Grid.Column="3" Grid.Row="3"/>
<inputs:SfComboBox HeightRequest="50" ItemsSource="{Binding SelectedCompte.LesOpe}" Grid.Column="3" Grid.Row="3" x:Name="recup"/>
<Button Text="ANNULER" Clicked="Button_Clicked" Grid.Column="1" Grid.Row="6" Style="{StaticResource WindowsButton}"/>
<Button Text="VALIDER" Clicked="Button_Clicked_1" Grid.Column="3" Grid.Row="6" Style="{StaticResource WindowsButton}"/> <Button Text="ANNULER" Clicked="Button_Annuler" Grid.Column="1" Grid.Row="5" Style="{StaticResource WindowsButton2}"/>
<Button Text="VALIDER" Clicked="Button_Valider" Grid.Column="3" Grid.Row="5" Style="{StaticResource WindowsButton}"/>
</Grid> </Grid>

@ -1,19 +1,29 @@
using Model;
namespace IHM.Desktop; namespace IHM.Desktop;
public partial class CV_supprimerOp : ContentView public partial class CV_supprimerOp : ContentView
{ {
public CV_supprimerOp() public Manager Mgr => (App.Current as App).Manager;
public CV_supprimerOp()
{ {
InitializeComponent(); InitializeComponent();
} Mgr.LoadBanque();
Mgr.LoadCompte();
private void Button_Clicked(object sender, EventArgs e)
{
} BindingContext = Mgr;
}
private void Button_Clicked_1(object sender, EventArgs e) private void Button_Annuler(object sender, EventArgs e)
{ {
Navigation.PushAsync(new Dashboard());
}
} private void Button_Valider(object sender, EventArgs e)
{
var s = recup.SelectedItem;
Operation operation = (Operation)s;
Mgr.supprimerOperation(Mgr.SelectedCompte,operation);
Navigation.PushAsync(new Dashboard());
}
} }

@ -21,6 +21,7 @@
<Label <Label
Grid.Column="0" Grid.Row="0" Grid.ColumnSpan="2" Grid.Column="0" Grid.Row="0" Grid.ColumnSpan="2"
VerticalOptions="Center"
Style="{StaticResource TitreWindows}" Style="{StaticResource TitreWindows}"
Text="COMPTE" Text="COMPTE"
HorizontalOptions="Center"/> HorizontalOptions="Center"/>

@ -12,7 +12,7 @@
<RowDefinition Height="0.75*"/> <RowDefinition Height="0.75*"/>
<RowDefinition Height="0.5*"/> <RowDefinition Height="0.5*"/>
<RowDefinition Height="5*"/> <RowDefinition Height="5*"/>
<RowDefinition Height="1*"/> <RowDefinition Height="0.7*"/>
</Grid.RowDefinitions> </Grid.RowDefinitions>
@ -27,6 +27,7 @@
Grid.Column="0" Grid.Row="0" Grid.ColumnSpan="2" Grid.Column="0" Grid.Row="0" Grid.ColumnSpan="2"
Style="{StaticResource TitreWindows}" Style="{StaticResource TitreWindows}"
Text="ECHEANCIER" Text="ECHEANCIER"
VerticalOptions="Center"
HorizontalOptions="Center"/> HorizontalOptions="Center"/>
@ -46,7 +47,7 @@
Style="{StaticResource WindowsButton}"/> Style="{StaticResource WindowsButton}"/>
<Border Stroke="{StaticResource Secondary}" Margin="10,0,10,0" Padding="3" StrokeThickness="4" StrokeShape="RoundRectangle 45,5,5,45" Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="4"> <Border Stroke="{StaticResource Secondary}" Margin="10,0,10,0" Padding="5" StrokeThickness="4" StrokeShape="RoundRectangle 45,5,5,45" Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="4" >
<Grid Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="4"> <Grid Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="4">
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
@ -57,11 +58,11 @@
<ColumnDefinition Width="1*"/> <ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<Label Text="Nom" Grid.Column="0" TextColor="{StaticResource Secondary}" HorizontalOptions="Center" FontSize="Micro" FontAttributes="Bold"></Label> <Label Text="Nom" Grid.Column="0" TextColor="{StaticResource Secondary}" HorizontalOptions="Center" FontSize="Micro" FontAttributes="Bold" VerticalOptions="Center"></Label>
<Label Text="Date" Grid.Column="1" TextColor="{StaticResource Secondary}" HorizontalOptions="Center" FontSize="Micro" FontAttributes="Bold"></Label> <Label Text="Date" Grid.Column="1" TextColor="{StaticResource Secondary}" HorizontalOptions="Center" FontSize="Micro" FontAttributes="Bold" VerticalOptions="Center"></Label>
<Label Text="Moyen de Paiement" Grid.Column="2" TextColor="{StaticResource Secondary}" HorizontalOptions="Center" FontSize="Micro" FontAttributes="Bold"></Label> <Label Text="Moyen de Paiement" Grid.Column="2" TextColor="{StaticResource Secondary}" HorizontalOptions="Center" FontSize="Micro" FontAttributes="Bold" VerticalOptions="Center"></Label>
<Label Text="Tag" Grid.Column="3" TextColor="{StaticResource Secondary}" HorizontalOptions="Center" FontSize="Micro" FontAttributes="Bold"></Label> <Label Text="Tag" Grid.Column="3" TextColor="{StaticResource Secondary}" HorizontalOptions="Center" FontSize="Micro" FontAttributes="Bold" VerticalOptions="Center"></Label>
<Label Text="Montant" Grid.Column="4" TextColor="{StaticResource Secondary}" HorizontalOptions="Center" FontSize="Micro" FontAttributes="Bold"></Label> <Label Text="Montant" Grid.Column="4" TextColor="{StaticResource Secondary}" HorizontalOptions="Center" FontSize="Micro" FontAttributes="Bold" VerticalOptions="Center"></Label>
</Grid> </Grid>
</Border> </Border>
@ -174,6 +175,20 @@
</ContentView> </ContentView>
<Border Stroke="{StaticResource Secondary}" BackgroundColor="{StaticResource Yellow100Accent}" Margin="10,10,10,10" Padding="3" StrokeThickness="4" StrokeShape="RoundRectangle 45,5,5,45" Grid.Row="5" Grid.Column="0" Grid.ColumnSpan="4">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="6*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Label Text="TOTAL" Grid.Column="0" Grid.ColumnSpan="2" HorizontalOptions="Center" TextColor="{StaticResource Secondary}" FontSize="Medium" FontAttributes="Bold" VerticalOptions="Center"></Label>
<Label Text="{Binding SelectedCompte.Solde}" Grid.Column="1" Grid.ColumnSpan="2" HorizontalOptions="Center" TextColor="{StaticResource Secondary}" FontSize="Medium" FontAttributes="Bold" VerticalOptions="Center"></Label>
<Label Text="€" Grid.Column="1" Grid.ColumnSpan="2" HorizontalOptions="End" Margin="0,0,50,0" TextColor="{StaticResource Secondary}" FontSize="Medium" FontAttributes="Bold" VerticalOptions="Center"></Label>
</Grid>
</Border>
</Grid> </Grid>
</Border> </Border>

@ -12,7 +12,7 @@
<RowDefinition Height="0.75*"/> <RowDefinition Height="0.75*"/>
<RowDefinition Height="0.5*"/> <RowDefinition Height="0.5*"/>
<RowDefinition Height="5*"/> <RowDefinition Height="5*"/>
<RowDefinition Height="1*"/> <RowDefinition Height="0.7*"/>
</Grid.RowDefinitions> </Grid.RowDefinitions>
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
@ -26,6 +26,7 @@
Grid.Column="0" Grid.Row="0" Grid.ColumnSpan="4" Grid.Column="0" Grid.Row="0" Grid.ColumnSpan="4"
Style="{StaticResource TitreWindows}" Style="{StaticResource TitreWindows}"
Text="OPERATIONS" Text="OPERATIONS"
VerticalOptions="Center"
HorizontalOptions="Center"/> HorizontalOptions="Center"/>
@ -73,16 +74,16 @@
<ColumnDefinition Width="1*"/> <ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<Label Text="Nom" Grid.Column="0" TextColor="{StaticResource Secondary}" HorizontalOptions="Center" FontSize="Micro" FontAttributes="Bold"></Label> <Label Text="Nom" Grid.Column="0" TextColor="{StaticResource Secondary}" HorizontalOptions="Center" FontSize="Micro" FontAttributes="Bold" VerticalOptions="Center"></Label>
<Label Text="Date" Grid.Column="1" TextColor="{StaticResource Secondary}" HorizontalOptions="Center" FontSize="Micro" FontAttributes="Bold"></Label> <Label Text="Date" Grid.Column="1" TextColor="{StaticResource Secondary}" HorizontalOptions="Center" FontSize="Micro" FontAttributes="Bold" VerticalOptions="Center"></Label>
<Label Text="Moyen de Paiement" Grid.Column="2" TextColor="{StaticResource Secondary}" HorizontalOptions="Center" FontSize="Micro" FontAttributes="Bold"></Label> <Label Text="Moyen de Paiement" Grid.Column="2" TextColor="{StaticResource Secondary}" HorizontalOptions="Center" FontSize="Micro" FontAttributes="Bold" VerticalOptions="Center"></Label>
<Label Text="Tag" Grid.Column="3" TextColor="{StaticResource Secondary}" HorizontalOptions="Center" FontSize="Micro" FontAttributes="Bold"></Label> <Label Text="Tag" Grid.Column="3" TextColor="{StaticResource Secondary}" HorizontalOptions="Center" FontSize="Micro" FontAttributes="Bold" VerticalOptions="Center"></Label>
<Label Text="Montant" Grid.Column="4" TextColor="{StaticResource Secondary}" HorizontalOptions="Center" FontSize="Micro" FontAttributes="Bold"></Label> <Label Text="Montant" Grid.Column="4" TextColor="{StaticResource Secondary}" HorizontalOptions="Center" FontSize="Micro" FontAttributes="Bold" VerticalOptions="Center"></Label>
</Grid> </Grid>
</Border> </Border>
<ContentView Grid.Column="0" Grid.Row="3" Grid.ColumnSpan="4" Grid.RowSpan="2" Margin="10,0,10,0"> <ContentView Grid.Column="0" Grid.Row="3" Grid.ColumnSpan="4" Grid.RowSpan="1" Margin="10,0,10,0" >
<CollectionView ItemsSource="{Binding SelectedCompte.LesOpe}" Grid.Row="3" Grid.ColumnSpan="4" Grid.RowSpan="2"> <CollectionView ItemsSource="{Binding SelectedCompte.LesOpe}" Grid.Row="3" Grid.ColumnSpan="4" Grid.RowSpan="2">
@ -144,7 +145,19 @@
</ContentView> </ContentView>
<Border Stroke="{StaticResource Secondary}" BackgroundColor="{StaticResource Yellow100Accent}" Margin="10,10,10,10" Padding="3" StrokeThickness="4" StrokeShape="RoundRectangle 45,5,5,45" Grid.Row="5" Grid.Column="0" Grid.ColumnSpan="4">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="6*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Label Text="TOTAL" Grid.Column="0" Grid.ColumnSpan="2" HorizontalOptions="Center" TextColor="{StaticResource Secondary}" FontSize="Medium" FontAttributes="Bold" VerticalOptions="Center"></Label>
<Label Text="{Binding SelectedCompte.Solde}" Grid.Column="1" Grid.ColumnSpan="2" HorizontalOptions="Center" TextColor="{StaticResource Secondary}" FontSize="Medium" FontAttributes="Bold" VerticalOptions="Center"></Label>
<Label Text="€" Grid.Column="1" Grid.ColumnSpan="2" HorizontalOptions="End" Margin="0,0,50,0" TextColor="{StaticResource Secondary}" FontSize="Medium" FontAttributes="Bold" VerticalOptions="Center"></Label>
</Grid>
</Border>
</Grid> </Grid>

@ -5,23 +5,11 @@ namespace IHM.Desktop;
public partial class Operations : ContentView public partial class Operations : ContentView
{ {
/* List<Operation> operations;*/
public Manager Mgr => (App.Current as App).Manager; public Manager Mgr => (App.Current as App).Manager;
public Operations() public Operations()
{ {
InitializeComponent(); InitializeComponent();
/* operations = new List<Operation>();
operations.Add(new("op", 33.44, DateTime.Now, MethodePayement.CB, TagOperation.Divers, false));
operations.Add(new("course", 45.20, DateTime.Now, MethodePayement.CB, TagOperation.Divers, true));
operations.Add(new("Orange", 50, DateTime.Now, MethodePayement.CB, TagOperation.Divers, true));
operations.Add(new("EDF", 55.80, DateTime.Now, MethodePayement.Virement, TagOperation.Energie, true));
operations.Add(new("EDF", 55.80, DateTime.Now, MethodePayement.Virement, TagOperation.Energie, true));
operations.Add(new("EDF", 55.80, DateTime.Now, MethodePayement.Virement, TagOperation.Carburant, true));
BindingContext = operations;*/
Mgr.LoadBanque(); Mgr.LoadBanque();
Mgr.LoadCompte(); Mgr.LoadCompte();

@ -416,6 +416,16 @@
<Setter Property="Background" Value="{StaticResource Primary}"/> <Setter Property="Background" Value="{StaticResource Primary}"/>
</Style> </Style>
<Style TargetType="Button" x:Key="WindowsButton2">
<Setter Property="TextColor" Value="Black"/>
<Setter Property="Margin" Value="10"/>
<Setter Property="CornerRadius" Value="20"/>
<Setter Property="BorderWidth" Value="1"/>
<Setter Property="BorderColor" Value="Black"/>
<Setter Property="FontFamily" Value="Comic sans MS"/>
<Setter Property="Background" Value="{StaticResource Corail}"/>
</Style>
<Style TargetType="Border" x:Key="TotalButton"> <Style TargetType="Border" x:Key="TotalButton">
<Setter Property="StrokeThickness" Value="1"/> <Setter Property="StrokeThickness" Value="1"/>
<Setter Property="Padding" Value="200,8"/> <Setter Property="Padding" Value="200,8"/>

@ -250,6 +250,46 @@ namespace Model
{ {
User = await Pers.RecupererInscrit(mail); User = await Pers.RecupererInscrit(mail);
} }
// Intégralité des méthodes (Débit, Crédit, planification echeance)
//Operation
public void effectuerOperation(Compte compte, Operation operation)
{
Pers.AjouterOperation(compte, operation);
}
public void supprimerOperation(Compte compte, Operation operation)
{
Pers.SupprimerOperation(compte, operation);
}
//Echeance
public void supprimerEcheance(Compte compte, Echeance echeance)
{
Pers.SupprimerEcheance(compte, echeance);
}
public void ajouterEcheance(Compte compte, Echeance echeance)
{
Pers.AjouterEcheance(compte, echeance);
}
// Planification
public void ajouterPlanification(Compte compte, Planification planification)
{
Pers.AjouterPlanification(compte, planification);
}
public void supprimerPlanification(Compte compte, Planification planification)
{
Pers.SupprimerPlanification(compte, planification);
}
} }
} }

@ -55,5 +55,9 @@ namespace Model
{ {
return Nom + " " + DateOperation + " " + Montant + " " + ModePayement + " " + IsDebit + " " + FromBanque + " " + Tag; return Nom + " " + DateOperation + " " + Montant + " " + ModePayement + " " + IsDebit + " " + FromBanque + " " + Tag;
} }
} }
} }
Loading…
Cancel
Save