diff --git a/Sources/IHM/Desktop/CV_EnregistrerEcheance.xaml b/Sources/IHM/Desktop/CV_EnregistrerEcheance.xaml
index 260cd5a..1098cfa 100644
--- a/Sources/IHM/Desktop/CV_EnregistrerEcheance.xaml
+++ b/Sources/IHM/Desktop/CV_EnregistrerEcheance.xaml
@@ -29,10 +29,10 @@
-
+
-
-
+
+
diff --git a/Sources/IHM/Desktop/CV_EnregistrerEcheance.xaml.cs b/Sources/IHM/Desktop/CV_EnregistrerEcheance.xaml.cs
index ec38b24..3a02a20 100644
--- a/Sources/IHM/Desktop/CV_EnregistrerEcheance.xaml.cs
+++ b/Sources/IHM/Desktop/CV_EnregistrerEcheance.xaml.cs
@@ -1,24 +1,35 @@
+using Model;
+
namespace IHM.Desktop;
public partial class CV_EnregistrerEcheance : ContentView
{
-
- public CV_EnregistrerEcheance()
+ public Manager Mgr => (App.Current as App).Manager;
+ public CV_EnregistrerEcheance()
{
InitializeComponent();
+ Mgr.LoadBanque();
+ Mgr.LoadCompte();
+ BindingContext = Mgr;
}
- private void Button_Clicked(object sender, EventArgs e)
+ private void Button_Annuler(object sender, EventArgs e)
{
}
- private void Button_Clicked_1(object sender, EventArgs e)
+ private void Button_Valider(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);
+ Thread.Sleep(1000);
+ }
}
\ No newline at end of file
diff --git a/Sources/IHM/Desktop/CV_SupprimerEcheance.xaml b/Sources/IHM/Desktop/CV_SupprimerEcheance.xaml
index 3e3c3ab..5884b5b 100644
--- a/Sources/IHM/Desktop/CV_SupprimerEcheance.xaml
+++ b/Sources/IHM/Desktop/CV_SupprimerEcheance.xaml
@@ -32,13 +32,13 @@
-
+
-
-
+
+
diff --git a/Sources/IHM/Desktop/CV_SupprimerEcheance.xaml.cs b/Sources/IHM/Desktop/CV_SupprimerEcheance.xaml.cs
index 98984ab..66f5832 100644
--- a/Sources/IHM/Desktop/CV_SupprimerEcheance.xaml.cs
+++ b/Sources/IHM/Desktop/CV_SupprimerEcheance.xaml.cs
@@ -1,3 +1,4 @@
+
using Model;
namespace IHM.Desktop;
@@ -11,18 +12,22 @@ public partial class CV_SupprimerEcheance : ContentView
InitializeComponent();
-
+ Mgr.LoadBanque();
+ Mgr.LoadCompte();
BindingContext = Mgr;
}
- private void Button_Clicked(object sender, EventArgs e)
+ private void Button_Annuler(object sender, EventArgs e)
{
}
- private void Button_Clicked_1(object sender, EventArgs e)
+ private void Button_Valider(object sender, EventArgs e)
{
-
+ var s = recup.SelectedItem;
+ Echeance echeance = (Echeance)s;
+ Mgr.supprimerEcheance(Mgr.SelectedCompte, echeance);
+
}
}
\ No newline at end of file
diff --git a/Sources/IHM/Desktop/CV_retirer.xaml b/Sources/IHM/Desktop/CV_retirer.xaml
index 4d3ebc1..c3e29d1 100644
--- a/Sources/IHM/Desktop/CV_retirer.xaml
+++ b/Sources/IHM/Desktop/CV_retirer.xaml
@@ -30,11 +30,11 @@
-
+
+
-
-
-
+
+
diff --git a/Sources/IHM/Desktop/CV_retirer.xaml.cs b/Sources/IHM/Desktop/CV_retirer.xaml.cs
index 0654522..0e6a258 100644
--- a/Sources/IHM/Desktop/CV_retirer.xaml.cs
+++ b/Sources/IHM/Desktop/CV_retirer.xaml.cs
@@ -1,19 +1,29 @@
+using Model;
+
namespace IHM.Desktop;
public partial class CV_retirer : ContentView
{
- public CV_retirer()
+ public Manager Mgr => (App.Current as App).Manager;
+ public CV_retirer()
{
InitializeComponent();
- }
+ Mgr.LoadBanque();
+ Mgr.LoadCompte();
- private void Button_Clicked(object sender, EventArgs e)
+ BindingContext = Mgr;
+ }
+
+ private void Button_Annuler(object sender, EventArgs e)
{
}
- 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);
- }
+ }
}
\ No newline at end of file
diff --git a/Sources/IHM/Desktop/CV_supprimerOp.xaml b/Sources/IHM/Desktop/CV_supprimerOp.xaml
index d89a990..09a63e9 100644
--- a/Sources/IHM/Desktop/CV_supprimerOp.xaml
+++ b/Sources/IHM/Desktop/CV_supprimerOp.xaml
@@ -27,11 +27,12 @@
-
+
+
-
-
+
+
diff --git a/Sources/IHM/Desktop/CV_supprimerOp.xaml.cs b/Sources/IHM/Desktop/CV_supprimerOp.xaml.cs
index c04a981..2c4004e 100644
--- a/Sources/IHM/Desktop/CV_supprimerOp.xaml.cs
+++ b/Sources/IHM/Desktop/CV_supprimerOp.xaml.cs
@@ -1,19 +1,28 @@
+using Model;
+
namespace IHM.Desktop;
public partial class CV_supprimerOp : ContentView
{
- public CV_supprimerOp()
+ public Manager Mgr => (App.Current as App).Manager;
+ public CV_supprimerOp()
{
InitializeComponent();
- }
+ Mgr.LoadBanque();
+ Mgr.LoadCompte();
+
+ BindingContext = Mgr;
+ }
- private void Button_Clicked(object sender, EventArgs e)
+ private void Button_Annuler(object sender, EventArgs e)
{
}
- 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);
+ }
}
\ No newline at end of file
diff --git a/Sources/Modele/Manager.cs b/Sources/Modele/Manager.cs
index f5f09de..35a01cb 100644
--- a/Sources/Modele/Manager.cs
+++ b/Sources/Modele/Manager.cs
@@ -196,6 +196,8 @@ namespace Model
// Intégralité des méthodes (Débit, Crédit, planification echeance)
+
+ //Operation
public void effectuerOperation(Compte compte, Operation operation)
{
Pers.AjouterOperation(compte, operation);
@@ -205,6 +207,17 @@ namespace Model
{
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);
+ }
}
}