Update createCustomerPage UI

pull/69/head
Antoine PEREDERII 2 years ago
parent 02093c44ce
commit e393765d60

@ -18,6 +18,7 @@
Title="Solde"
ContentTemplate="{DataTemplate balance:BalancePage}"
Route="balance"
BindingContextChanged="ShellContent_BindingContextChanged"
Icon="{StaticResource HomeIcon}"/>
<ShellContent

@ -1,20 +1,24 @@
using Banquale.Views;
using Banquale.Views.Category;
using Banquale.Views.Transfer;
using Model;
namespace Banquale;
public partial class AppShell : Shell
{
public Manager Mgr => (App.Current as App).MyManager;
public AppShell()
{
InitializeComponent();
RegisterRoutes();
//RegisterRoutes();
}
private void RegisterRoutes()
{
Routing.RegisterRoute("balance/categorydetails", typeof(CategoryPage));
Routing.RegisterRoute("balance/newpagedetails", typeof(NewPage1));
Routing.RegisterRoute("menu/requestdetails", typeof(RequestPage));
Routing.RegisterRoute("menu/ribdetails", typeof(RibPage));
Routing.RegisterRoute("menu/transferdetails", typeof(TransferPage));
@ -23,4 +27,8 @@ public partial class AppShell : Shell
Routing.RegisterRoute("consultant/createcustomer", typeof(CreateCustomerPage));
}
void ShellContent_BindingContextChanged(System.Object sender, System.EventArgs e)
{
BindingContext = Mgr.SelectedAccount;
}
}

@ -22,12 +22,6 @@
RowDefinitions="auto, 35, *"
ColumnDefinitions="250, auto">
<Grid.GestureRecognizers>
<TapGestureRecognizer
Tapped="Balance_Clicked"
NumberOfTapsRequired="1" />
</Grid.GestureRecognizers>
<Label
Text="Compte Professionnel"
HorizontalOptions="Center"

@ -12,10 +12,4 @@ public partial class BalancePage : ContentPage
InitializeComponent();
BindingContext = Mgr.SelectedAccount;
}
public async void Balance_Clicked(object sender, EventArgs e)
{
await Shell.Current.Navigation.PushAsync(new NewPage1());
}
}

@ -91,11 +91,12 @@
Text="IBAN"
FontSize="16" />
<Entry
Text="FR "
Text="FR"
CursorPosition="2"
x:Name="AccountIbanEntry"
TextChanged="IbanChanged"
Placeholder="Entrez l'IBAN du compte"
Keyboard="Telephone"/>
Keyboard="Numeric"/>
</StackLayout>

@ -72,6 +72,8 @@ public partial class CreateCustomerPage : ContentPage
Label iban = new Label { Text = "IBAN" };
iban.FontSize = 16;
Entry ibanEntry = new Entry { Placeholder = "Entrez l'IBAN du compte" };
ibanEntry.Keyboard = Keyboard.Numeric;
//ibanEntry.TextChanged = IbanChanged;
StackLayout.Add(account);
gridAccount.SetColumn(balance, 0);
gridAccount.SetRow(balance, 0);
@ -92,11 +94,14 @@ public partial class CreateCustomerPage : ContentPage
public void IbanChanged(object sender, EventArgs e)
{
if(AccountIbanEntry.Text.Length < 3)
if(AccountIbanEntry.Text.Length < 2)
{
DisplayAlert("Erreur", "Vous ne pouvez pas effacer le FR !", "OK");
}
var cast = ((Entry)sender);
cast.Text = "FR";
// cast.CursorPosition = 13;
//cast.SelectionLength = 10;
}
}
}

Loading…
Cancel
Save