merge xaml/views into master

pull/43/head
Antoine PEREDERII 2 years ago
commit 7c8426ce1e

@ -40,8 +40,8 @@ steps:
- dotnet restore Banquale.sln
- dotnet sonarscanner begin /k:"Banquale" /d:sonar.host.url=$${PLUGIN_SONAR_HOST} /d:sonar.login=$${PLUGIN_SONAR_TOKEN}
- dotnet build Banquale.sln -c Release --no-restore
# - dotnet test Banquale.sln --logger trx --no-restore /p:CollectCoverage=true /p:CoverletOutputFormat=cobertura --collect "XPlat Code Coverage"
# - reportgenerator -reports:"**/coverage.cobertura.xml" -reporttypes:SonarQube -targetdir:"coveragereport"
- dotnet test Banquale.sln --logger trx --no-restore /p:CollectCoverage=true /p:CoverletOutputFormat=cobertura --collect "XPlat Code Coverage"
- reportgenerator -reports:"**/coverage.cobertura.xml" -reporttypes:SonarQube -targetdir:"coveragereport"
# - dotnet publish Banquale/Banquale.csproj -c Release --no-restore -o $CI_PROJECT_DIR/build/release -f:net7.0-android /p:AndroidSdkDirectory=/usr/lib/android-sdk
- dotnet sonarscanner end /d:sonar.login=$${PLUGIN_SONAR_TOKEN}
depends_on: [tests]

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

Binary file not shown.

After

Width:  |  Height:  |  Size: 191 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 10 KiB

@ -13,14 +13,15 @@ public partial class App : Application
public App()
{
MyManager.ChargeDonnee();
MyManager.Persistance = new DataContractPersistance.DataContractPers();
MyManager.SauvegardeDonnee();
MyManager.DataLoad();
MyManager.Persistence = new DataContractPersistance.DataContractPers();
InitializeComponent();
MainPage = new AppShell();
//MyManager.DataSave();
}
}
}

@ -4,28 +4,25 @@
xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:views="clr-namespace:Banquale.Views"
xmlns:balance="clr-namespace:Banquale.Views.Balance"
xmlns:transfer="clr-namespace:Banquale.Views.Transfer"
Shell.FlyoutBehavior="Disabled">
<!--<ShellContent
Title="Connection"
ContentTemplate="{DataTemplate views:ConnectionPage}"
Route="connection" />-->
<ShellContent ContentTemplate="{DataTemplate views:ConnectionPage}"
Route="connection"/>
<!--<ShellContent ContentTemplate="{DataTemplate views:ConnectionPage}"
Route="connection"/>-->
<TabBar>
<ShellContent
Title="Solde"
ContentTemplate="{DataTemplate views:BalancePage}"
ContentTemplate="{DataTemplate balance:BalancePage}"
Route="balance"
Icon="home.png"/>
<ShellContent
Title="Transactions"
ContentTemplate="{DataTemplate views:MenuTransferPage}"
ContentTemplate="{DataTemplate transfer:MenuTransferPage}"
Route="menu"
Icon="transactions.png"/>

@ -1,5 +1,6 @@
using Banquale.Views;
using Banquale.Views.Category;
using Banquale.Views.Transfer;
namespace Banquale;
public partial class AppShell : Shell
@ -8,7 +9,7 @@ public partial class AppShell : Shell
{
InitializeComponent();
Routing.RegisterRoute("balance/categorydetails", typeof(CategoryPage));
Routing.RegisterRoute("newpagedetails", typeof(NewPage1));
Routing.RegisterRoute("balance/newpagedetails", typeof(NewPage1));
Routing.RegisterRoute("menu/requestdetails", typeof(RequestPage));
Routing.RegisterRoute("menu/ribdetails", typeof(RibPage));
Routing.RegisterRoute("menu/transferdetails", typeof(TransferPage));

@ -66,6 +66,8 @@
<None Remove="Resources\Images\helpIcon.svg" />
<None Remove="Stub\" />
<None Remove="DataContractPersistance\" />
<None Remove="Views\Balance\" />
<None Remove="Views\Category\" />
</ItemGroup>
<ItemGroup>
<MauiXaml Remove="Resources\Images\Images.xaml" />
@ -78,5 +80,7 @@
<Folder Include="Persistances\" />
<Folder Include="Stub\" />
<Folder Include="DataContractPersistance\" />
<Folder Include="Views\Balance\" />
<Folder Include="Views\Category\" />
</ItemGroup>
</Project>

@ -8,31 +8,31 @@ using System.Xml;
namespace Banquale.DataContractPersistance
{
public class DataContractPers : IPersistanceManager
public class DataContractPers : IPersistenceManager
{
public string FilePath { get; set; } = Environment.GetFolderPath(Environment.SpecialFolder.Personal) + "/datbase.xml";
public string FileName { get; set; } = "ClientAndTransactionsList.xml";
public (List<Client>, List<Transactions>) ChargeDonnee()
public (List<Customer>, List<Transactions>) DataLoad()
{
var serializer = new DataContractSerializer(typeof(List<Client>));
var serializer = new DataContractSerializer(typeof(List<Customer>));
List<Client> ListClients;
List<Customer> CustomersList;
using (Stream s = File.OpenRead(Path.Combine(FilePath, FileName)))
{
ListClients = serializer.ReadObject(s) as List<Client>;
CustomersList = serializer.ReadObject(s) as List<Customer>;
}
return (ListClients, new List<Transactions>());
return (CustomersList, new List<Transactions>());
}
public void SauvegardeDonnee(List<Client> c, List<Transactions> t)
public void DataSave(List<Customer> c, List<Transactions> t)
{
var serializer = new DataContractSerializer(typeof(List<Client>));
var serializer = new DataContractSerializer(typeof(List<Customer>));
if(!Directory.Exists(FilePath))
{
Debug.WriteLine("Directory crée à l'instant");
Debug.WriteLine("Directory created");
Debug.WriteLine(FilePath);
Directory.CreateDirectory(FilePath);
}

@ -5,7 +5,7 @@ namespace Banquale.DataContractPersistance
{
public class DataToPersist
{
public List<Client> clients { get; set; } = new List<Client>();
public List<Customer> customer { get; set; } = new List<Customer>();
public List<Transactions> transactions { get; set; } = new List<Transactions>();
}
}

@ -0,0 +1,118 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics;
using System.Linq;
using System.Runtime.Serialization;
using System.Text;
using System.Threading.Tasks;
namespace Banquale.Model
{
[DataContract]
public class Account : INotifyPropertyChanged
{
public event PropertyChangedEventHandler PropertyChanged;
void OnPropertyChanged(string propertyName)
{
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
}
[DataMember]
public double Balance
{
get => balance;
set
{
if (balance == value)
return;
balance = value;
OnPropertyChanged(nameof(Balance));
}
}
private double balance;
[DataMember]
public string Name
{
get => name;
set
{
if (name == value)
return;
name = value;
OnPropertyChanged(nameof(Name));
}
}
private string name;
[DataMember]
public string IBAN
{
get => iban;
set
{
if (iban == value)
return;
iban = value;
OnPropertyChanged(nameof(IBAN));
}
}
private string iban;
public Account(int balance, string name, string iban)
{
Balance = balance;
Name = name;
IBAN = iban;
}
[DataMember]
public List<Transactions> TransactionsList { get; set; } = new List<Transactions>();
//public bool DoTransactions(string name, string IBAN, float sum)
//{
// List<Transactions> transactions.add(sum);
// if()
// return true;
//}
internal static void DoTransactions(Entry name, Entry iban, Entry sum)
{
Debug.WriteLine(name);
Debug.WriteLine(iban);
Debug.WriteLine(sum);
Debug.WriteLine("Transaction successed !");
}
//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)
//{
// Console.WriteLine("Help button pressed !");
//}
internal static void AskForHelp(Entry request, Entry subject, Editor message)
{
Debug.WriteLine(request.Text);
Debug.WriteLine(subject);
Debug.WriteLine(message);
Debug.WriteLine("Help button pressed !");
//throw new NotImplementedException();
}
internal static void DoRequest(Entry name, Entry iBAN, Entry sum)
{
throw new NotImplementedException();
}
}
}

@ -1,24 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.Text;
using System.Threading.Tasks;
namespace Banquale.Model
{
[DataContract]
public class Client: Personne
{
[DataMember]
public List<Compte> ListeComptes { get; private set; }
public Client(string nom, string prenom, string mdp) : base(nom, prenom, mdp)
{}
}
}

@ -1,20 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Banquale.Model
{
public class Compte
{
public int Solde { get; set; }
public string Nom { get; set;}
public string IBAN { get; set; }
public List<Transactions> CompteList { get; set; }
}
}

@ -0,0 +1,28 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.Text;
using System.Threading.Tasks;
namespace Banquale.Model
{
[DataContract]
public class Customer : Person
{
[DataMember]
public List<Account> AccountsList { get; private set; } = new List<Account>();
//private uint NbAccounts { get; set; } = AccountsList.Count;
public Customer(string name, string firstName, string password) : base(name, firstName, password)
{}
}
}

@ -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);
}
}

@ -0,0 +1,15 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Banquale.Model
{
public interface IPersistenceManager
{
public (List<Customer>, List<Transactions>) DataLoad();
void DataSave(List<Customer> c, List<Transactions> t /*, List<Account> c2*/);
}
}

@ -7,56 +7,58 @@ namespace Banquale.Model
public class Manager
{
[DataMember]
public List<Client> ListeClients { get; private set; }
public List<Customer> CustomersList { get; private set; }
[DataMember]
public List<Transactions> ListeTransactions { get; private set; }
public List<Transactions> TransactionsList { get; private set; }
public IPersistanceManager Persistance { get; set; }
public List<Account> AccountList { get; private set; }
public Manager(IPersistanceManager persistance) {
public IPersistenceManager Persistence { get; set; }
ListeTransactions = new List<Transactions>();
ListeClients = new List<Client>();
Persistance = persistance;
public Manager(IPersistenceManager persistence) {
TransactionsList = new List<Transactions>();
CustomersList = new List<Customer>();
Persistence = persistence;
}
public Manager()
{
ListeClients = new List<Client>();
ListeTransactions = new List<Transactions>();
CustomersList = new List<Customer>();
TransactionsList = new List<Transactions>();
}
public bool AjouterClient(Client MonClient)
public bool AddCustomer(Customer MyCustomer)
{
ListeClients.Add(MonClient);
CustomersList.Add(MyCustomer);
return true;
}
public Client GetClient(int place) {
return ListeClients[place];
public Customer GetCustomer(int place) {
return CustomersList[place];
}
public void SauvegardeDonnee()
public void DataSave()
{
Persistance.SauvegardeDonnee(ListeClients, ListeTransactions);
Persistence.DataSave(CustomersList, TransactionsList);
}
public void ChargeDonnee()
public void DataLoad()
{
var donnees = Persistance.ChargeDonnee();
var data = Persistence.DataLoad();
ListeClients.AddRange(donnees.Item1);
ListeTransactions.AddRange(donnees.Item2);
CustomersList.AddRange(data.Item1);
TransactionsList.AddRange(data.Item2);
foreach (var j in donnees.Item1)
foreach (var j in data.Item1)
{
ListeClients.Add(j);
CustomersList.Add(j);
}
foreach (var i in donnees.Item2)
foreach (var i in data.Item2)
{
ListeTransactions.Add(i);
TransactionsList.Add(i);
}
}

@ -9,23 +9,23 @@ using System.Threading.Tasks;
namespace Banquale.Model
{
[DataContract]
public class Personne
public class Person
{
[DataMember]
public string Nom { get; private set; }
public string Name { get; private set; }
[DataMember]
public string Prenom { get; private set; }
public string FirstName { get; private set; }
[DataMember]
public int Id { get; private set; }
[DataMember]
public string Mdp { get; private set; }
public string Password { get; private set; }
public Personne(string nom, string prenom, string mdp)
public Person(string name, string firstName, string password)
{
Nom = nom;
Prenom = prenom;
Name = name;
FirstName = firstName;
Id = 0;
Mdp = mdp;
Password = password;
}
}

@ -1,26 +1,102 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.ComponentModel;
using System.Runtime.Serialization;
namespace Banquale.Model
{
public class Transactions
[DataContract]
public class Transactions : INotifyPropertyChanged
{
public int Type { get; private set; }
public int Somme { get; private set; }
void OnPropertyChanged(string propertyName)
{
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
}
[DataMember]
public int Type
{
get => type;
set
{
if(type == value)
return;
type = value;
OnPropertyChanged(nameof(Type));
}
}
[DataMember]
public Compte CompteImplique { get; private set; }
private int type;
public string Categorie { get; private set; }
[DataMember]
public Double Sum
{
get => sum;
set
{
if (sum == value)
return;
sum = value;
OnPropertyChanged(nameof(Sum));
}
}
[DataMember]
private Double sum;
[DataMember]
public Account InvolvedAccounts
{
get => involvedAccounts;
set
{
if (involvedAccounts == value)
return;
involvedAccounts = value;
OnPropertyChanged(nameof(InvolvedAccounts));
}
}
[DataMember]
private Account involvedAccounts;
public Transactions(int type, int somme, Compte compteImplique, string categorie) {
[DataMember]
public string Category
{
get => category;
set
{
if (category == value)
return;
category = value;
OnPropertyChanged(nameof(Category));
}
}
[DataMember]
private string category;
[DataMember]
public DateTime Date
{
get => date;
set
{
if (date == value)
return;
date = value;
OnPropertyChanged(nameof(Date));
}
}
[DataMember]
private DateTime date;
public Transactions(int type, Double sum, Account involvedAccounts, string category, DateTime date)
{
Type = type;
Somme = somme;
CompteImplique = compteImplique;
Categorie = categorie;
Sum = sum;
InvolvedAccounts = involvedAccounts;
Category = category;
Date = date;
}
public event PropertyChangedEventHandler PropertyChanged;
}
}

@ -1,26 +1,53 @@
using System;
using System.Diagnostics;
using Banquale.Model;
namespace Banquale.Stub
{
public class Stub : IPersistanceManager
{
public class Stub : IPersistenceManager
{
public (List<Client>, List<Transactions>) 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");
Console.WriteLine(Client1);
List<Client> ListeClients = new List<Client>();
List<Transactions> ListeTransactions = new List<Transactions>();
ListeClients.Add(Client1);
ListeClients.Add(Client2);
ListeClients.Add(Client3);
return (ListeClients, ListeTransactions);
Customer Customer1 = new Customer("Jacques", "Morice", "J'aimeLesFrites");
Customer Customer2 = new Customer("Francis", "Begore", "J'aimeLes");
Customer Customer3 = new Customer("Michel", "Boudout", "MonMdP");
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");
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));
Debug.WriteLine(Customer1.Name, Customer1.Password);
List<Customer> CustomersList = new List<Customer>();
List<Transactions> TransactionsList= new List<Transactions>();
List<Account> AccountsList = new List<Account>();
Account1.TransactionsList.Add(Transactions1);
Account2.TransactionsList.Add(Transactions2);
//AccountsList.Add(Account1);
//AccountsList.Add(Account2);
//AccountsList.Add(Account3);
Customer1.AccountsList.Add(Account1);
Customer1.AccountsList.Add(Account2);
CustomersList.Add(Customer1);
CustomersList.Add(Customer2);
CustomersList.Add(Customer3);
return (CustomersList, TransactionsList /*, AccountsList*/);
}
public void SauvegardeDonnee(List<Client> c, List<Transactions> t)
public void DataSave(List<Customer> c, List<Transactions> t)
{
throw new NotImplementedException();
}

@ -1,8 +1,9 @@
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:local="clr-namespace:Banquale.Views"
x:Class="Banquale.Views.BalancePage"
xmlns:local="clr-namespace:Banquale.Views.Balance"
xmlns:model="clr-namespace:Banquale.Model"
x:Class="Banquale.Views.Balance.BalancePage"
Title="BalancePage"
Shell.NavBarIsVisible="False">
@ -15,38 +16,49 @@
RowDefinitions="auto, 35, *"
ColumnDefinitions="250, auto"
Grid.Row="0"
Margin="30"
>
<Button Clicked="OnButtonClicked" />
Margin="30">
<Label
Text="Compte Professionnel"
HorizontalOptions="Center"
BackgroundColor="AliceBlue"
Margin="0, 15, 0, 0"/>
<Label
Text="Mme Perotte"
<HorizontalStackLayout
Grid.Row="1"
Grid.ColumnSpan="2"
HorizontalOptions="Center"
BackgroundColor="SaddleBrown"/> <!-- colspan permet de redefinir la taille de la colonne -->
HorizontalOptions="Center">
<Label
Text="{Binding CustomersList[0].Name}"
Margin="0, 0, 5, 0"/>
<Label
Text="{Binding CustomersList[0].FirstName}"
Margin="5, 0, 0, 0"/>
</HorizontalStackLayout>
<Grid ColumnDefinitions="auto, auto, auto"
Grid.Row="2"
HorizontalOptions="Center">
<Grid ColumnDefinitions="*, *" Grid.Row="2" >
<Label
Text="Solde"
WidthRequest="75"
TextColor="Black"
HorizontalOptions="Center"/>
<Label
Text="1999,00 €"
Text="{Binding CustomersList[0].AccountsList[0].Balance} "
Grid.Column="1"
MinimumWidthRequest="70"
HorizontalOptions="Center"/>
Margin="0, 0, 5, 0"/>
<Label Text="€"
Grid.Column="2"/>
</Grid>
</Grid>
<ScrollView
Grid.Row="1">
<FlexLayout JustifyContent="Center"
@ -55,6 +67,10 @@
Direction="Row"
Wrap="Wrap">
<Button Text="NewPage1"
Clicked="OnButtonClicked"
MinimumWidthRequest="250"/>
<local:BalanceView/>
<local:BalanceView/>
<local:BalanceView/>

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

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8" ?>
<ContentView xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="Banquale.Views.BalanceView">
x:Class="Banquale.Views.Balance.BalanceView">
<VerticalStackLayout>
<BoxView BackgroundColor="Black"
HorizontalOptions="FillAndExpand"

@ -1,4 +1,4 @@
namespace Banquale.Views;
namespace Banquale.Views.Balance;
public partial class BalanceView : ContentView
{

@ -1,19 +0,0 @@
using Banquale.Model;
namespace Banquale.Views;
public partial class BalancePage : ContentPage
{
public BalancePage()
{
InitializeComponent();
}
public async void OnButtonClicked(object sender, EventArgs e)
{
await Shell.Current.Navigation.PushAsync(new NewPage1());
}
}

@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="Banquale.Views.CategoryPage"
xmlns:local="clr-namespace:Banquale.Views"
x:Class="Banquale.Views.Category.CategoryPage"
xmlns:local="clr-namespace:Banquale.Views.Category"
Title="CategoryPage"
BackgroundColor="White">

@ -1,4 +1,4 @@
namespace Banquale.Views;
namespace Banquale.Views.Category;
public partial class CategoryPage : ContentPage
{

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8" ?>
<ContentView xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="Banquale.Views.CategoryView">
x:Class="Banquale.Views.Category.CategoryView">
<VerticalStackLayout>

@ -1,4 +1,4 @@
namespace Banquale.Views;
namespace Banquale.Views.Category;
public partial class CategoryView : ContentView
{

@ -13,7 +13,8 @@
<Entry Placeholder="Quel est votre demande ?"
HorizontalOptions="Center"
WidthRequest="280"/>
WidthRequest="280"
x:Name="Request"/>
</Frame>
@ -25,7 +26,8 @@
<Entry Placeholder="Quel est le sujet de votre demande ?"
HorizontalOptions="Center"
WidthRequest="280"/>
WidthRequest="280"
x:Name="Subject"/>
</Frame>
@ -35,7 +37,8 @@
Margin="0, 0, 0, 10"
Padding="15, 5, 15, 5">
<Editor Placeholder="Decrivez votre demande ici." />
<Editor Placeholder="Decrivez votre demande ici."
x:Name="Message"/>
</Frame>

@ -1,4 +1,5 @@
namespace Banquale.Views;
using Banquale.Model;
namespace Banquale.Views;
public partial class HelpPage : ContentPage
{
@ -9,6 +10,7 @@ public partial class HelpPage : ContentPage
public async void Send_Clicked(Object sender, EventArgs e)
{
Account.AskForHelp(Request, Subject, Message);
await Shell.Current.GoToAsync("//balance");
}

@ -17,16 +17,16 @@ public partial class NewPage1 : ContentPage
void Button_Clicked(System.Object sender, System.EventArgs e)
{
Client client1 = new Client("Monsieur", "Bonjour", "HelloThisIsMyPassword");
myManager.AjouterClient(client1);
Customer customer1 = new Customer("Mister", "Hello", "HelloThisIsMyPassword");
myManager.AddCustomer(customer1);
cpt++;
Console.WriteLine(cpt);
Console.WriteLine(client1.Nom);
Console.WriteLine(customer1.Name);
}
public async void ArrowBack(object sender, EventArgs e)
{
await Navigation.PopAsync();
await Shell.Current.GoToAsync("//balance");
}
}

@ -1,15 +0,0 @@
namespace Banquale.Views;
public partial class RequestPage : ContentPage
{
public RequestPage()
{
InitializeComponent();
}
//public async void Send_Clicked(Object sender, EventArgs e)
//{
// await Shell.Current.GoToAsync("//balance");
//}
}

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="Banquale.Views.MenuTransferPage"
x:Class="Banquale.Views.Transfer.MenuTransferPage"
Shell.NavBarIsVisible="False">
<Grid RowDefinitions="auto, auto"

@ -1,4 +1,4 @@
namespace Banquale.Views;
namespace Banquale.Views.Transfer;
public partial class MenuTransferPage : ContentPage
{

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="Banquale.Views.RequestPage">
x:Class="Banquale.Views.Transfer.RequestPage">
<VerticalStackLayout VerticalOptions="Center">
@ -13,7 +13,8 @@
<Entry Placeholder="Destinataire"
HorizontalOptions="Center"
WidthRequest="280"/>
WidthRequest="280"
x:Name="Name"/>
</Frame>
@ -25,7 +26,8 @@
<Entry Placeholder="IBAN"
HorizontalOptions="Center"
WidthRequest="280"/>
WidthRequest="280"
x:Name="IBAN"/>
</Frame>
@ -37,7 +39,8 @@
<Entry Placeholder="Montant"
HorizontalOptions="Center"
WidthRequest="280"/>
WidthRequest="280"
x:Name="Sum"/>
</Frame>

@ -0,0 +1,17 @@
using Banquale.Model;
namespace Banquale.Views.Transfer;
public partial class RequestPage : ContentPage
{
public RequestPage()
{
InitializeComponent();
}
public async void Send_Clicked(Object sender, EventArgs e)
{
Account.DoRequest(Name, IBAN, Sum);
await Shell.Current.GoToAsync("//balance");
}
}

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="Banquale.Views.RibPage">
x:Class="Banquale.Views.Transfer.RibPage">
<VerticalStackLayout>

@ -1,4 +1,4 @@
namespace Banquale.Views;
namespace Banquale.Views.Transfer;
public partial class RibPage : ContentPage
{

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="Banquale.Views.TransferPage">
x:Class="Banquale.Views.Transfer.TransferPage">
<VerticalStackLayout VerticalOptions="Center">
@ -13,7 +13,8 @@
<Entry Placeholder="Destinataire"
HorizontalOptions="Center"
WidthRequest="280"/>
WidthRequest="280"
x:Name="Name"/>
</Frame>
@ -25,7 +26,8 @@
<Entry Placeholder="IBAN"
HorizontalOptions="Center"
WidthRequest="280"/>
WidthRequest="280"
x:Name="IBAN"/>
</Frame>
@ -37,7 +39,8 @@
<Entry Placeholder="Montant"
HorizontalOptions="Center"
WidthRequest="280"/>
WidthRequest="280"
x:Name="Sum"/>
</Frame>

@ -1,4 +1,5 @@
namespace Banquale.Views;
using Banquale.Model;
namespace Banquale.Views.Transfer;
public partial class TransferPage : ContentPage
{
@ -9,6 +10,7 @@ public partial class TransferPage : ContentPage
public async void Send_Clicked(Object sender, EventArgs e)
{
Account.DoTransactions(Name, IBAN, Sum);
await Shell.Current.GoToAsync("//balance");
}

@ -1,25 +0,0 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<IsPackable>false</IsPackable>
<IsTestProject>true</IsTestProject>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.5.0" />
<PackageReference Include="xunit" Version="2.4.2" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.5">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="coverlet.collector" Version="3.2.0">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
</ItemGroup>
</Project>

@ -1,9 +0,0 @@
namespace TestUnit;
public class UnitTest1// une classe = type de chose à tester
{ // ex : class envoie argent
[Fact]
public void Test1() // test unitaire tester chaque petit truc et test intégration qui regarde l'intégration de ttes la classe
{
}
}

@ -1 +0,0 @@
global using Xunit;
Loading…
Cancel
Save