Changed language

pull/41/head
Titouan LOUVET 2 years ago
parent d71d636358
commit d37e7047cd

@ -1,15 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Banquale.Model
{
public interface IPersistanceManager
{
public (List<Client>, List<Transactions>) ChargeDonnee();
void SauvegardeDonnee(List<Client> c, List<Transactions> t /*, List<Compte> c2*/);
}
}

@ -10,6 +10,6 @@ namespace Banquale.Model
{
public (List<Customer>, List<Transactions>) DataLoad();
void DataSave(List<Customer> c, List<Transactions> t);
void DataSave(List<Customer> c, List<Transactions> t /*, List<Account> c2*/);
}
}

@ -1,4 +1,5 @@
using System;
using Org.Apache.Http.Cookies;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
@ -28,44 +29,44 @@ namespace Banquale.Model
private int type;
public Double Somme
public Double Sum
{
get => somme;
get => sum;
set
{
if (somme == value)
if (sum == value)
return;
somme = value;
OnPropertyChanged(nameof(Somme));
sum = value;
OnPropertyChanged(nameof(Sum));
}
}
private Double somme;
private Double sum;
public Compte CompteImplique
public Account InvolvedAccounts
{
get => compteImplique;
get => involvedAccounts;
set
{
if (compteImplique == value)
if (involvedAccounts == value)
return;
compteImplique = value;
OnPropertyChanged(nameof(CompteImplique));
involvedAccounts = value;
OnPropertyChanged(nameof(InvolvedAccounts));
}
}
private Compte compteImplique;
private Account involvedAccounts;
public string Categorie
public string Category
{
get => categorie;
get => category;
set
{
if (categorie == value)
if (category == value)
return;
categorie = value;
OnPropertyChanged(nameof(Categorie));
category = value;
OnPropertyChanged(nameof(Category));
}
}
private string categorie;
private string category;
public DateTime Date
{
@ -80,23 +81,13 @@ namespace Banquale.Model
}
private DateTime date;
public Transactions(int type, Double somme, Compte compteImplique, string categorie, DateTime date) {
Type = type;
Somme = somme;
CompteImplique = compteImplique;
Categorie = categorie;
Date = date;
public int Sum { get; private set; }
public Account InvolvedAccounts { get; private set; }
public string Category { get; private set; }
public Transactions(int type, int sum, Account involvedAccounts, string category) {
public Transactions(int type, Double sum, Account involvedAccounts, string category, DateTime date)
{
Type = type;
Sum = sum;
InvolvedAccounts = involvedAccounts;
Category = category;
Date = date;
}
public event PropertyChangedEventHandler PropertyChanged;

@ -3,54 +3,36 @@ using Banquale.Model;
namespace Banquale.Stub
{
<<<<<<< HEAD
public class Stub : IPersistanceManager
public class Stub : IPersistenceManager
{
public (List<Client>, List<Transactions> /*, List<Compte>*/) ChargeDonnee()
public (List<Customer>, List<Transactions> /*, List<Account>*/) DataLoad()
{
Client Client1 = new Client("Jacques", "Morice", "J'aimeLesFrites");
Client Client2 = new Client("Francis", "Begore", "J'aimeLes");
Client Client3 = new Client("Michel", "Boudout", "MonMdP");
Compte Compte1 = new Compte(999, "Tatouille", "FR76 9161 9581 6296 8415 2361 004");
Compte Compte2 = new Compte(9510, "Despoints", "FR76 4785 8569 6914 4152 5263 003");
Compte Compte3 = new Compte(3519, "Perotte", "FR76 6352 2541 4169 6958 5847 002");
Customer Customer1 = new Customer("Jacques", "Morice", "J'aimeLesFrites");
Customer Customer2 = new Customer("Francis", "Begore", "J'aimeLes");
Customer Customer3 = new Customer("Michel", "Boudout", "MonMdP");
Transactions Transactions1 = new Transactions(0, 55, Compte1, "Test", new DateTime(2023, 6, 21));
Transactions Transactions2 = new Transactions(1, 54.99, Compte2, "Test", new DateTime(2022, 8, 15));
Transactions Transactions3 = new Transactions(0, 1000, Compte3, "Test", new DateTime(2020, 9, 1));
Account Account1 = new Account(999, "Tatouille", "FR76 9161 9581 6296 8415 2361 004");
Account Account2 = new Account(9510, "Despoints", "FR76 4785 8569 6914 4152 5263 003");
Account Account3 = new Account(3519, "Perotte", "FR76 6352 2541 4169 6958 5847 002");
Console.WriteLine(Client1);
List<Client> ListeClients = new List<Client>();
List<Transactions> ListeTransactions = new List<Transactions>();
//List<Compte> ListeCompte = new List<Compte>();
//ListeCompte.Add( Compte1 );
//ListeCompte.Add(Compte2);
//ListeCompte.Add(Compte3);
ListeClients.Add(Client1);
ListeClients.Add(Client2);
ListeClients.Add(Client3);
return (ListeClients, ListeTransactions /*, ListeCompte*/);
=======
public class Stub : IPersistenceManager
{
Transactions Transactions1 = new Transactions(0, 55, Account1, "Test", new DateTime(2023, 6, 21));
Transactions Transactions2 = new Transactions(1, 54.99, Account2, "Test", new DateTime(2022, 8, 15));
Transactions Transactions3 = new Transactions(0, 1000, Account3, "Test", new DateTime(2020, 9, 1));
public (List<Customer>, List<Transactions>) DataLoad()
{
Customer Customer1 = new Customer("Jacques", "Morice", "J'aimeLesFrites");
Customer Customer2 = new Customer("Francis", "Begore", "J'aimeLes");
Customer Customer3 = new Customer("Michel", "Boudout", "MonMdP");
Console.WriteLine(Customer1);
List<Customer> CustomersList = new List<Customer>();
List<Transactions> TransactionsList = new List<Transactions>();
CustomersList.Add(Customer1);
CustomersList.Add(Customer2);
CustomersList.Add(Customer3);
return (CustomersList, TransactionsList);
>>>>>>> origin/master
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*/);
}
public void DataSave(List<Customer> c, List<Transactions> t)

Loading…
Cancel
Save