Modification majeur interface utilisateur (modification style global + navigation + binding statistique...)
continuous-integration/drone/push Build is failing Details

pull/143/head
Nicolas MAYE 2 years ago
parent fe1f1f8ff9
commit 3c93c66374

@ -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="Planification d'une échéance" Grid.Column="1" 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" 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 Manager Mgr => (App.Current as App).Manager;
public CV_AddPlanification() public CV_AddPlanification()
{ {
InitializeComponent(); InitializeComponent();
Mgr.LoadBanque();
Mgr.LoadCompte();
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);
}
} }
private void annuler_button(object sender, EventArgs e) 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 Manager Mgr => (App.Current as App).Manager;
public CV_DeletePlanification() public CV_DeletePlanification()
{ {
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_Clicked_1(object sender, EventArgs e) 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 SelectedCompte.LesEch}" Grid.Column="3" Grid.Row="3" x:Name="recup"/> <inputs:SfComboBox HeightRequest="50" ItemsSource="{Binding SelectedCompte.LesEch}" Grid.Column="3" Grid.Row="3" x:Name="recup"/>
<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="5" 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="5" Style="{StaticResource WindowsButton}"/>

@ -19,7 +19,7 @@ public partial class CV_EnregistrerEcheance : ContentView
private void Button_Annuler(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_Valider(object sender, EventArgs e)
@ -30,6 +30,6 @@ public partial class CV_EnregistrerEcheance : ContentView
Mgr.effectuerOperation(Mgr.SelectedCompte, operation); Mgr.effectuerOperation(Mgr.SelectedCompte, operation);
Mgr.supprimerEcheance(Mgr.SelectedCompte, ech); Mgr.supprimerEcheance(Mgr.SelectedCompte, ech);
Thread.Sleep(1000); 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
@ -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,9 +25,9 @@
<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"/>
@ -37,8 +37,8 @@
<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="5" 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="5" Style="{StaticResource WindowsButton}"/>
</Grid> </Grid>

@ -20,7 +20,7 @@ public partial class CV_SupprimerEcheance : ContentView
private void Button_Annuler(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_Valider(object sender, EventArgs e)
@ -28,6 +28,7 @@ public partial class CV_SupprimerEcheance : ContentView
var s = recup.SelectedItem; var s = recup.SelectedItem;
Echeance echeance = (Echeance)s; Echeance echeance = (Echeance)s;
Mgr.supprimerEcheance(Mgr.SelectedCompte, echeance); Mgr.supprimerEcheance(Mgr.SelectedCompte, echeance);
Navigation.PushAsync(new Dashboard());
} }
} }

@ -14,6 +14,7 @@
<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*"/>
@ -24,7 +25,7 @@
</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"/>
@ -38,7 +39,7 @@
<Entry Placeholder="Entrez une catégorie" Grid.Column="3" Grid.Row="5" Style="{StaticResource zoneDeTexte}" Margin="20" x:Name="tag"/> <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"/> <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="7" 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="7" Style="{StaticResource WindowsButton}"/> <Button Text="VALIDER" Clicked="Button_Valider" Grid.Column="3" Grid.Row="7" Style="{StaticResource WindowsButton}"/>
</Grid> </Grid>

@ -1,3 +1,4 @@
using Model; using Model;
namespace IHM.Desktop; namespace IHM.Desktop;
@ -14,8 +15,9 @@ public partial class CV_credit : ContentView
BindingContext = Mgr; BindingContext = Mgr;
} }
private async void Button_Annuler(object sender, EventArgs e) private void Button_Annuler(object sender, EventArgs e)
{ {
Navigation.PushAsync(new Dashboard());
} }
@ -52,6 +54,10 @@ public partial class CV_credit : ContentView
Operation operation = new Operation(nom, Montant, Date, mp2, to2, false, false) ; Operation operation = new Operation(nom, Montant, Date, mp2, to2, false, false) ;
Mgr.effectuerOperation(Mgr.SelectedCompte, operation); Mgr.effectuerOperation(Mgr.SelectedCompte, operation);
Navigation.PushAsync(new Dashboard());
} }

@ -14,6 +14,7 @@
<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*"/>
@ -24,7 +25,7 @@
</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 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"/>
@ -38,7 +39,7 @@
<Entry Placeholder="Entrez une catégorie" Grid.Column="3" Grid.Row="5" Style="{StaticResource zoneDeTexte}" Margin="20" x:Name="tag"/> <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"/> <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="7" 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="7" Style="{StaticResource WindowsButton}"/> <Button Text="VALIDER" Clicked="Button_Valider" Grid.Column="3" Grid.Row="7" Style="{StaticResource WindowsButton}"/>
</Grid> </Grid>

@ -16,7 +16,7 @@ public partial class CV_debit : ContentView
private void Button_Annuler(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_Valider(object sender, EventArgs e)
@ -51,5 +51,6 @@ public partial class CV_debit : ContentView
Operation operation = new Operation(nom, Montant, Date, mp2, to2, false, true); Operation operation = new Operation(nom, Montant, Date, mp2, to2, false, true);
Mgr.effectuerOperation(Mgr.SelectedCompte, operation); 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 SelectedCompte.LesOpe}" Grid.Column="3" Grid.Row="3" x:Name="recup"/> <inputs:SfComboBox HeightRequest="50" ItemsSource="{Binding SelectedCompte.LesOpe}" Grid.Column="3" Grid.Row="3" x:Name="recup"/>
<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="5" 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="5" Style="{StaticResource WindowsButton}"/>
</Grid> </Grid>

@ -16,7 +16,7 @@ public partial class CV_retirer : ContentView
private void Button_Annuler(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_Valider(object sender, EventArgs e)
@ -24,6 +24,7 @@ public partial class CV_retirer : ContentView
var s = recup.SelectedItem; var s = recup.SelectedItem;
Operation operation = (Operation)s; Operation operation = (Operation)s;
Mgr.supprimerOperation(Mgr.SelectedCompte, operation); Mgr.supprimerOperation(Mgr.SelectedCompte, operation);
Navigation.PushAsync(new Dashboard());
} }
} }

@ -23,16 +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 SelectedCompte.LesOpe}" Grid.Column="3" Grid.Row="3" x:Name="recup"/> <inputs:SfComboBox HeightRequest="50" ItemsSource="{Binding SelectedCompte.LesOpe}" Grid.Column="3" Grid.Row="3" x:Name="recup"/>
<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="5" 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="5" Style="{StaticResource WindowsButton}"/>
</Grid> </Grid>

@ -16,7 +16,7 @@ public partial class CV_supprimerOp : ContentView
private void Button_Annuler(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_Valider(object sender, EventArgs e)
@ -24,5 +24,6 @@ public partial class CV_supprimerOp : ContentView
var s = recup.SelectedItem; var s = recup.SelectedItem;
Operation operation = (Operation)s; Operation operation = (Operation)s;
Mgr.supprimerOperation(Mgr.SelectedCompte,operation); 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"/>
@ -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"/>
@ -82,7 +83,7 @@
</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"/>

@ -219,6 +219,18 @@ namespace Model
Pers.AjouterEcheance(compte, 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);
}
} }
} }

Loading…
Cancel
Save