fix issues with pull request from C# to master

pull/41/head
Antoine PEREDERII 2 years ago
parent d71d636358
commit 0108ee0c3b

@ -12,63 +12,80 @@ namespace Banquale.Model
{ {
public event PropertyChangedEventHandler PropertyChanged; public event PropertyChangedEventHandler PropertyChanged;
public int Balance { get; set; }
public string Name { get; set;}
void OnPropertyChanged(string propertyName) void OnPropertyChanged(string propertyName)
{ {
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName)); PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
} }
public double Solde public double Balance
{ {
get => solde; get => Balance;
set set
{ {
if (solde == value) if (balance == value)
return; return;
solde = value; balance = value;
OnPropertyChanged(nameof(Solde)); OnPropertyChanged(nameof(Balance));
} }
} }
private double solde; private double balance;
public string Nom public string Name
{ {
get => nom; get => name;
set set
{ {
if (nom == value) if (name == value)
return; return;
nom = value; name = value;
OnPropertyChanged(nameof(Nom)); OnPropertyChanged(nameof(Name));
} }
} }
private string nom; private string name;
public string IBAN public string IBAN
{ {
get => iBAN; get => iban;
set set
{ {
if (iBAN == value) if (iban == value)
return; return;
iBAN = value; iban = value;
OnPropertyChanged(nameof(IBAN)); OnPropertyChanged(nameof(IBAN));
} }
} }
private string iBAN; private string iban;
public Compte(int solde, string nom, string iBAN) public Account(int balance, string name, string iban)
{ {
Solde = solde; Balance = balance;
Nom = nom; Name = name;
IBAN = iBAN; IBAN = iban;
} }
public List<Transactions> TransactionsList { get; set; } public List<Transactions> TransactionsList { get; set; }
//public bool DoTransactions(string name, string IBAN, float sum)
//{
// List<Transactions> transactions.add(sum);
// if ()
// return true;
//}
//public bool DoRequest(string name, string IBAN, float sum)
//{
// List<Transactions> transactions.add(sum);
// if ()
// return true;
//}
//public void AskForHelp(string type, string type2, string message)
//{
//}
} }
} }

@ -14,23 +14,13 @@ namespace Banquale.Model
[DataMember] [DataMember]
public List<Account> AccountsList { get; private set; } public List<Account> AccountsList { get; private set; }
//private unsigned int NbAccounts { get; private set; }
public Customer(string name, string firstName, string password) : base(name, firstName, password) public Customer(string name, string firstName, string password) : base(name, firstName, password)
{} {}
//public bool DoTransactions(string name, string IBAN, float montant)
//{
// List<Transactions> transactions.add(montant);
// if ()
// return true;
//}
//public bool DoRequest(string name, string IBAN, float montant)
//{
// List<Transactions> transactions.add(montant);
// if ()
// return true;
//}
} }

Loading…
Cancel
Save