binding partie échéancier
continuous-integration/drone/push Build was killed Details

pull/143/head
Nicolas MAYE 2 years ago
parent ec757cad9f
commit c82de40d19

@ -423,7 +423,7 @@ namespace Data
var dataBody = new Dictionary<string, string> var dataBody = new Dictionary<string, string>
{ {
{ "compte", compte.Identifiant }, { "compte", compte.Identifiant },
{ "nom", echeance.IntituleOperation }, { "nom", echeance.Nom },
{ "montant", echeance.Montant.ToString() }, { "montant", echeance.Montant.ToString() },
{ "dateO", echeance.DateOperation.ToString() }, { "dateO", echeance.DateOperation.ToString() },
{ "methodePayement", echeance.ModePayement.ToString() }, { "methodePayement", echeance.ModePayement.ToString() },

@ -117,7 +117,7 @@ namespace Data
} }
public async Task<bool> SupprimerEcheance(Compte compte, Echeance echeance) public async Task<bool> SupprimerEcheance(Compte compte, Echeance echeance)
{ {
return await ClientAPI.DeleteEcheanceInscritAsync(compte.Identifiant, echeance.IntituleOperation); return await ClientAPI.DeleteEcheanceInscritAsync(compte.Identifiant, echeance.Nom);
} }
public async Task<IList<Echeance>> RecupererEcheance(Compte compte) public async Task<IList<Echeance>> RecupererEcheance(Compte compte)
{ {

@ -49,13 +49,13 @@
<Label Grid.Column="0" Text="{Binding Nom}" <Label Grid.Column="0" Text="{Binding SeletedCompte.Nom}"
TextColor="{StaticResource Secondary}" TextColor="{StaticResource Secondary}"
FontAttributes="Bold" FontSize="Large" FontAttributes="Bold" FontSize="Large"
HorizontalOptions="Center" HorizontalOptions="Center"
VerticalOptions="Center"/> VerticalOptions="Center"/>
<Label Grid.Column="1" Text="{Binding Solde}" <Label Grid.Column="1" Text="{Binding SelectedCompte.Solde}"
TextColor="{StaticResource Secondary}" TextColor="{StaticResource Secondary}"
FontAttributes="Bold" FontSize="Large" FontAttributes="Bold" FontSize="Large"
HorizontalOptions="Center" HorizontalOptions="Center"

@ -4,17 +4,20 @@ namespace IHM.Desktop;
public partial class Compte : ContentView public partial class Compte : ContentView
{ {
public Manager Mgr => (App.Current as App).Manager;
public Compte() public Compte()
{ {
InitializeComponent(); InitializeComponent();
Model.Compte compte = new Model.Compte("", "Compte courant", 2000);
BindingContext = compte;
Mgr.LoadBanque();
Mgr.LoadCompte();
BindingContext = Mgr;
}
}
private void AddCredit_Clicked(object sender, EventArgs e) private void AddCredit_Clicked(object sender, EventArgs e)
{ {

@ -70,7 +70,7 @@
<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="2" Margin="10,0,10,0">
<CollectionView ItemsSource="{Binding}" Grid.Row="3" Grid.ColumnSpan="4" Grid.RowSpan="2"> <CollectionView ItemsSource="{Binding SelectedCompte.LesEch}" Grid.Row="3" Grid.ColumnSpan="4" Grid.RowSpan="2">
<CollectionView.ItemTemplate> <CollectionView.ItemTemplate>
@ -87,7 +87,7 @@
<Label Grid.Column="0" Text="{Binding IntituleOperation}" <Label Grid.Column="0" Text="{Binding Nom}"
TextColor="{StaticResource Secondary}" TextColor="{StaticResource Secondary}"
FontAttributes="Bold" FontSize="Body" FontAttributes="Bold" FontSize="Body"
HorizontalOptions="Center" HorizontalOptions="Center"

@ -9,8 +9,8 @@ public partial class Echeancier : ContentView
{ {
InitializeComponent(); InitializeComponent();
/* Mgr.LoadBanque(); Mgr.LoadBanque();
Mgr.LoadCompte();*/ Mgr.LoadCompte();
BindingContext = Mgr; BindingContext = Mgr;

@ -11,7 +11,7 @@ namespace Model
public class Echeance public class Echeance
{ {
public string IntituleOperation { get; private set; } public string Nom { get; private set; }
public double Montant { get; private set; } public double Montant { get; private set; }
@ -23,9 +23,9 @@ namespace Model
public TagOperation Tag { get; private set; } public TagOperation Tag { get; private set; }
[JsonConstructor] [JsonConstructor]
public Echeance(string intituleOperation, double montant, DateTime dateOperation, MethodePayement modePayement, TagOperation tag, bool isDebit = true) public Echeance(string nom, double montant, DateTime dateOperation, MethodePayement modePayement, TagOperation tag, bool isDebit = true)
{ {
IntituleOperation = intituleOperation; Nom = nom;
Montant = montant; Montant = montant;
DateOperation = dateOperation; DateOperation = dateOperation;
ModePayement = modePayement; ModePayement = modePayement;
@ -35,7 +35,7 @@ namespace Model
public override string ToString() public override string ToString()
{ {
return IntituleOperation + " " + DateOperation + " " + Montant + " " + ModePayement + " " + IsDebit + " " + Tag; return Nom + " " + DateOperation + " " + Montant + " " + ModePayement + " " + IsDebit + " " + Tag;
} }
} }

Loading…
Cancel
Save