implémentation des fonctionnalités enregistrer et supprimer echeance + retirer et supprimer operation
parent
4f0099fcef
commit
fe1f1f8ff9
@ -1,24 +1,35 @@
|
||||
|
||||
|
||||
using Model;
|
||||
|
||||
namespace IHM.Desktop;
|
||||
|
||||
public partial class CV_EnregistrerEcheance : ContentView
|
||||
{
|
||||
|
||||
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);
|
||||
}
|
||||
}
|
@ -1,19 +1,29 @@
|
||||
using Model;
|
||||
|
||||
namespace IHM.Desktop;
|
||||
|
||||
public partial class CV_retirer : ContentView
|
||||
{
|
||||
public Manager Mgr => (App.Current as App).Manager;
|
||||
public CV_retirer()
|
||||
{
|
||||
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);
|
||||
|
||||
}
|
||||
}
|
@ -1,19 +1,28 @@
|
||||
using Model;
|
||||
|
||||
namespace IHM.Desktop;
|
||||
|
||||
public partial class CV_supprimerOp : ContentView
|
||||
{
|
||||
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);
|
||||
}
|
||||
}
|
Loading…
Reference in new issue