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>
{
{ "compte", compte.Identifiant },
{ "nom", echeance.IntituleOperation },
{ "nom", echeance.Nom },
{ "montant", echeance.Montant.ToString() },
{ "dateO", echeance.DateOperation.ToString() },
{ "methodePayement", echeance.ModePayement.ToString() },

@ -117,7 +117,7 @@ namespace Data
}
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)
{

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

@ -4,17 +4,20 @@ namespace IHM.Desktop;
public partial class Compte : ContentView
{
public Manager Mgr => (App.Current as App).Manager;
public Compte()
{
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)
{

@ -70,7 +70,7 @@
<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>
@ -87,7 +87,7 @@
<Label Grid.Column="0" Text="{Binding IntituleOperation}"
<Label Grid.Column="0" Text="{Binding Nom}"
TextColor="{StaticResource Secondary}"
FontAttributes="Bold" FontSize="Body"
HorizontalOptions="Center"

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

@ -11,7 +11,7 @@ namespace Model
public class Echeance
{
public string IntituleOperation { get; private set; }
public string Nom { get; private set; }
public double Montant { get; private set; }
@ -23,9 +23,9 @@ namespace Model
public TagOperation Tag { get; private set; }
[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;
DateOperation = dateOperation;
ModePayement = modePayement;
@ -35,7 +35,7 @@ namespace Model
public override string ToString()
{
return IntituleOperation + " " + DateOperation + " " + Montant + " " + ModePayement + " " + IsDebit + " " + Tag;
return Nom + " " + DateOperation + " " + Montant + " " + ModePayement + " " + IsDebit + " " + Tag;
}
}

Loading…
Cancel
Save