Modified manager and data contract on balancePage

pull/42/head
Titouan LOUVET 2 years ago
parent e921eff814
commit e1a8ec8828

@ -12,6 +12,8 @@ namespace Banquale.Model
[DataMember]
public List<Transactions> TransactionsList { get; private set; }
public List<Account> AccountList { get; private set; }
public IPersistenceManager Persistence { get; set; }
public Manager(IPersistenceManager persistence) {

@ -22,17 +22,17 @@ namespace Banquale.Stub
Transactions Transactions3 = new Transactions(0, 1000, Account3, "Test", new DateTime(2020, 9, 1));
Console.WriteLine(Customer1);
List<Customer> ListeCustomers = new List<Customer>();
List<Transactions> ListeTransactions = new List<Transactions>();
//List<Account> ListeAccount = new List<Account>();
//ListeAccount.Add( Account1 );
//ListeAccount.Add(Account2);
//ListeAccount.Add(Account3);
ListeCustomers.Add(Customer1);
ListeCustomers.Add(Customer2);
ListeCustomers.Add(Customer3);
return (ListeCustomers, ListeTransactions /*, ListeAccount*/);
List<Customer> CustomersList = new List<Customer>();
List<Transactions> TransactionsList= new List<Transactions>();
List<Account> AcountsList = new List<Account>();
AcountsList.Add(Account1);
AcountsList.Add(Account2);
AcountsList.Add(Account3);
CustomersList.Add(Customer1);
CustomersList.Add(Customer2);
CustomersList.Add(Customer3);
return (CustomersList, TransactionsList /*, AccountsList*/);
}
public void DataSave(List<Customer> c, List<Transactions> t)

@ -28,7 +28,7 @@
BackgroundColor="AliceBlue"
Margin="0, 15, 0, 0"/>
<Label
Text="{Binding Name}"
Text="{Binding AccountList[0].Name}"
Grid.Row="1"
Grid.ColumnSpan="2"
HorizontalOptions="Center"
@ -42,7 +42,7 @@
TextColor="Black"
HorizontalOptions="Center"/>
<Label
Text="{Binding Balance}"
Text="{Binding AccountList[0].Balance}"
Grid.Column="1"
MinimumWidthRequest="70"
TextColor="Black"

@ -4,15 +4,16 @@ namespace Banquale.Views;
public partial class BalancePage : ContentPage
{
//public Manager Mgr { get; private set; } = new Manager();
public Manager Mgr => (App.Current as App).MyManager;
public BalancePage()
{
InitializeComponent();
BindingContext = new Account(999, "Tatouille", "FR76 9161 9581 6296 8415 2361 004"); ;
}
BindingContext = Mgr;
//BindingContext = new Account(999, "Tatouille", "FR76 9161 9581 6296 8415 2361 004");
}
public async void OnButtonClicked(object sender, EventArgs e)
public async void OnButtonClicked(object sender, EventArgs e)
{
await Shell.Current.Navigation.PushAsync(new NewPage1());
}

Loading…
Cancel
Save