Add transaction and request button method

pull/42/head
Antoine PEREDERII 2 years ago
parent 0cfc655c7a
commit 85c2f2e5ad

@ -7,8 +7,8 @@
Shell.FlyoutBehavior="Disabled"> Shell.FlyoutBehavior="Disabled">
<ShellContent ContentTemplate="{DataTemplate views:ConnectionPage}" <!--<ShellContent ContentTemplate="{DataTemplate views:ConnectionPage}"
Route="connection"/> Route="connection"/>-->
<TabBar> <TabBar>

@ -1,6 +1,7 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.ComponentModel; using System.ComponentModel;
using System.Diagnostics;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
@ -74,6 +75,14 @@ namespace Banquale.Model
// return true; // 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) //public bool DoRequest(string name, string IBAN, float sum)
//{ //{
// List<Transactions> transactions.add(sum); // List<Transactions> transactions.add(sum);
@ -88,11 +97,16 @@ namespace Banquale.Model
internal static void AskForHelp(Entry request, Entry subject, Editor message) internal static void AskForHelp(Entry request, Entry subject, Editor message)
{ {
Console.WriteLine(request); Debug.WriteLine(request);
Console.WriteLine(subject); Debug.WriteLine(subject);
Console.WriteLine(message); Debug.WriteLine(message);
Console.WriteLine("Help button pressed !"); Debug.WriteLine("Help button pressed !");
//throw new NotImplementedException(); //throw new NotImplementedException();
} }
internal static void DoRequest(Entry name, Entry iBAN, Entry sum)
{
throw new NotImplementedException();
}
} }
} }

@ -26,7 +26,8 @@
<Entry Placeholder="IBAN" <Entry Placeholder="IBAN"
HorizontalOptions="Center" HorizontalOptions="Center"
WidthRequest="280"/> WidthRequest="280"
x:Name="IBAN"/>
</Frame> </Frame>
@ -38,7 +39,8 @@
<Entry Placeholder="Montant" <Entry Placeholder="Montant"
HorizontalOptions="Center" HorizontalOptions="Center"
WidthRequest="280"/> WidthRequest="280"
x:Name="Sum"/>
</Frame> </Frame>

@ -8,11 +8,10 @@ public partial class RequestPage : ContentPage
InitializeComponent(); InitializeComponent();
} }
//public async void Send_Clicked(Object sender, EventArgs e) public async void Send_Clicked(Object sender, EventArgs e)
//{ {
// await Shell.Current.GoToAsync("//balance"); Account.DoRequest(Name, IBAN, Sum);
//} await Shell.Current.GoToAsync("//balance");
}
//Client.DoRequest(this.name, this.IBAN, )
} }

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