pull master into C#/themes

pull/44/head
Antoine PEREDERII 2 years ago
commit 0ec9b96d12

@ -40,8 +40,8 @@ steps:
- dotnet restore Banquale.sln - dotnet restore Banquale.sln
- dotnet sonarscanner begin /k:"Banquale" /d:sonar.host.url=$${PLUGIN_SONAR_HOST} /d:sonar.login=$${PLUGIN_SONAR_TOKEN} - 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 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" - 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" - 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 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} - dotnet sonarscanner end /d:sonar.login=$${PLUGIN_SONAR_TOKEN}
depends_on: [tests] depends_on: [tests]

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

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

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

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

@ -67,6 +67,8 @@
<None Remove="Stub\" /> <None Remove="Stub\" />
<None Remove="DataContractPersistance\" /> <None Remove="DataContractPersistance\" />
<None Remove="Resources\Theme\" /> <None Remove="Resources\Theme\" />
<None Remove="Views\Balance\" />
<None Remove="Views\Category\" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<MauiXaml Remove="Resources\Images\Images.xaml" /> <MauiXaml Remove="Resources\Images\Images.xaml" />
@ -80,5 +82,7 @@
<Folder Include="Stub\" /> <Folder Include="Stub\" />
<Folder Include="DataContractPersistance\" /> <Folder Include="DataContractPersistance\" />
<Folder Include="Resources\Theme\" /> <Folder Include="Resources\Theme\" />
<Folder Include="Views\Balance\" />
<Folder Include="Views\Category\" />
</ItemGroup> </ItemGroup>
</Project> </Project>

@ -1,20 +1,118 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics;
using System.Linq; using System.Linq;
using System.Runtime.Serialization;
using System.Text; using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
namespace Banquale.Model namespace Banquale.Model
{ {
public class Account [DataContract]
public class Account : INotifyPropertyChanged
{ {
public int Balance { get; set; } 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 string Name { get; set;} //public void AskForHelp(string type, string type2, string message)
//{
// Console.WriteLine("Help button pressed !");
//}
public string IBAN { get; set; } 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();
}
public List<Transactions> TransactionsList { get; set; } internal static void DoRequest(Entry name, Entry iBAN, Entry sum)
{
throw new NotImplementedException();
}
} }
} }

@ -12,13 +12,17 @@ namespace Banquale.Model
public class Customer : Person public class Customer : Person
{ {
[DataMember] [DataMember]
public List<Account> AccountsList { get; private set; } 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) public Customer(string name, string firstName, string password) : base(name, firstName, password)
{} {}
} }
} }

@ -10,6 +10,6 @@ namespace Banquale.Model
{ {
public (List<Customer>, List<Transactions>) DataLoad(); 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*/);
} }
} }

@ -12,13 +12,15 @@ namespace Banquale.Model
[DataMember] [DataMember]
public List<Transactions> TransactionsList { get; private set; } public List<Transactions> TransactionsList { get; private set; }
public List<Account> AccountList { get; private set; }
public IPersistenceManager Persistence { get; set; } public IPersistenceManager Persistence { get; set; }
public Manager(IPersistenceManager persistance) { public Manager(IPersistenceManager persistence) {
TransactionsList = new List<Transactions>(); TransactionsList = new List<Transactions>();
CustomersList = new List<Customer>(); CustomersList = new List<Customer>();
Persistence = persistance; Persistence = persistence;
} }

@ -1,26 +1,102 @@
using System; using System.ComponentModel;
using System.Collections.Generic; using System.Runtime.Serialization;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Banquale.Model namespace Banquale.Model
{ {
public class Transactions [DataContract]
public class Transactions : INotifyPropertyChanged
{ {
public int Type { get; private set; }
public int Sum { 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 Account InvolvedAccounts { get; private set; } private int type;
public string Category { 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 sum, Account involvedAccounts, string category) { [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; Type = type;
Sum = sum; Sum = sum;
InvolvedAccounts = involvedAccounts; InvolvedAccounts = involvedAccounts;
Category = category; Category = category;
Date = date;
} }
public event PropertyChangedEventHandler PropertyChanged;
} }
} }

@ -1,23 +1,50 @@
using System; using System;
using System.Diagnostics;
using Banquale.Model; using Banquale.Model;
namespace Banquale.Stub namespace Banquale.Stub
{ {
public class Stub : IPersistenceManager public class Stub : IPersistenceManager
{ {
public (List<Customer>, List<Transactions>) DataLoad() public (List<Customer>, List<Transactions> /*, List<Account>*/) DataLoad()
{ {
Customer Customer1 = new Customer("Jacques", "Morice", "J'aimeLesFrites"); Customer Customer1 = new Customer("Jacques", "Morice", "J'aimeLesFrites");
Customer Customer2 = new Customer("Francis", "Begore", "J'aimeLes"); Customer Customer2 = new Customer("Francis", "Begore", "J'aimeLes");
Customer Customer3 = new Customer("Michel", "Boudout", "MonMdP"); Customer Customer3 = new Customer("Michel", "Boudout", "MonMdP");
Console.WriteLine(Customer1);
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<Customer> CustomersList = new List<Customer>();
List<Transactions> TransactionsList = new List<Transactions>(); 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(Customer1);
CustomersList.Add(Customer2); CustomersList.Add(Customer2);
CustomersList.Add(Customer3); CustomersList.Add(Customer3);
return (CustomersList, TransactionsList); return (CustomersList, TransactionsList /*, AccountsList*/);
} }
public void DataSave(List<Customer> c, List<Transactions> t) public void DataSave(List<Customer> c, List<Transactions> t)

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

@ -0,0 +1,15 @@
using Banquale.Views.Category;
namespace Banquale.Views.Balance;
public partial class BalanceView : ContentView
{
public BalanceView()
{
InitializeComponent();
}
public async void OnButtonClicked(object sender, EventArgs e)
{
await Shell.Current.Navigation.PushAsync(new CategoryPage());
}
}

@ -1,17 +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,9 +0,0 @@
namespace Banquale.Views;
public partial class BalanceView : ContentView
{
public BalanceView()
{
InitializeComponent();
}
}

@ -0,0 +1,23 @@
<?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.Category.CategoryPage"
xmlns:local="clr-namespace:Banquale.Views.Category"
Title="CategoryPage"
BackgroundColor="White">
<VerticalStackLayout
VerticalOptions="Center" >
<local:CategoryView />
<local:CategoryView />
<local:CategoryView />
<local:CategoryView />
<local:CategoryView />
<local:CategoryView />
<local:CategoryView />
<local:CategoryView />
<local:CategoryView />
<local:CategoryView />
</VerticalStackLayout>
</ContentPage>

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

@ -1,18 +1,19 @@
<?xml version="1.0" encoding="utf-8" ?> <?xml version="1.0" encoding="utf-8" ?>
<ContentView xmlns="http://schemas.microsoft.com/dotnet/2021/maui" <ContentView xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="Banquale.Views.CategoryView"> x:Class="Banquale.Views.Category.CategoryView">
<VerticalStackLayout> <VerticalStackLayout>
<BoxView HorizontalOptions="FillAndExpand"
HeightRequest="1.3"/> <BoxView BackgroundColor="Black"
HorizontalOptions="FillAndExpand"
HeightRequest="1.3"
Margin="20, 0, 20, 0"/>
<Grid Margin="20, 5, 20, 5" <Grid Margin="20, 5, 20, 5"
HorizontalOptions="Fill"> HorizontalOptions="Fill">
<Label <Label
Text="Catégorie" Text="Catégorie"
TextColor="Black"
HorizontalOptions="Center" HorizontalOptions="Center"
VerticalOptions="Center"/> VerticalOptions="Center"/>
</Grid> </Grid>

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

@ -1,32 +0,0 @@
<?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"
Title="CategoryPage"
BackgroundColor="White">
<Grid RowDefinitions="*,*,*,*,*,*,*,*,*,*,*,*,2*">
<ImageButton Source="back_arrow_icon.svg" Grid.Row="0" HorizontalOptions="Start"/>
<local:CategoryView Grid.Row="2"/>
<local:CategoryView Grid.Row="3"/>
<local:CategoryView Grid.Row="4"/>
<local:CategoryView Grid.Row="5"/>
<local:CategoryView Grid.Row="6"/>
<local:CategoryView Grid.Row="7"/>
<local:CategoryView Grid.Row="8"/>
<local:CategoryView Grid.Row="9"/>
<local:CategoryView Grid.Row="10"/>
<local:CategoryView Grid.Row="11"/>
<VerticalStackLayout Grid.Row="12">
<BoxView HorizontalOptions="FillAndExpand"
HeightRequest="1.3"/>
</VerticalStackLayout>
</Grid>
</ContentPage>

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

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

@ -26,7 +26,7 @@ public partial class NewPage1 : ContentPage
public async void ArrowBack(object sender, EventArgs e) 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");
//}
}

@ -0,0 +1,41 @@
<?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.TransactionsPage"
Title="TransactionsPage"
BackgroundColor="White">
<Grid RowDefinitions="2*, *, 0*, *, 0*, *, *, *, *, *, *">
<Grid Grid.Row="1" ColumnDefinitions="2*, *, 2*">
<Label Grid.Column="1"
Text="Prix"
TextColor="Black"
HorizontalOptions="Center"
FontSize="Large"/>
</Grid>
<Grid Grid.Row="3" ColumnDefinitions="*, *, *">
<Label Grid.Column="1"
Text="poiuytreza"
TextColor="Black"
HorizontalOptions="Center"/>
</Grid>
<Grid Grid.Row="5" ColumnDefinitions="*, 4*, *">
<Button Grid.Column="1" Text="Categorie" TextColor="Black" FontSize="Medium" BackgroundColor="Gray"/>
</Grid>
<Grid Grid.Row="7" RowDefinitions="auto, *, *" ColumnDefinitions="*, auto, *">
<Label Grid.Row="0" Grid.Column="1" TextColor="Black" Text=" Paiment par carte &#x0a;4859 **** **** 9985" VerticalOptions="Center"/>
<BoxView Grid.Row="1" Grid.Column="1" HorizontalOptions="FillAndExpand"
HeightRequest="1.3" Color="Black"/>
<Label Grid.Row="2" Grid.Column="1" Text="En date du 15/06/2023" TextColor="Black"/>
</Grid>
<Grid Grid.Row="9" ColumnDefinitions="*, 4*, *">
<Button Grid.Column="1" Text="Faire opposition" BackgroundColor="Gray" TextColor="Black"/>
</Grid>
</Grid>
</ContentPage>

@ -0,0 +1,9 @@
namespace Banquale.Views;
public partial class TransactionsPage : ContentPage
{
public TransactionsPage()
{
InitializeComponent();
}
}

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

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

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

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

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

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