Merge branch 'xaml-C#/data-binding' of codefirst.iut.uca.fr:antoine.perederii/Banquale into xaml-C#/data-binding

pull/69/head
Titouan LOUVET 2 years ago
commit 55ea5ef387

@ -34,11 +34,6 @@
</Grid.GestureRecognizers> </Grid.GestureRecognizers>
<Label
Text="{Binding Id}"
Grid.Column="0"
x:Name="transactionId"/>
<Label <Label
Text="{Binding Date, StringFormat='{0:ddd dd MMM yyyy}'}" Text="{Binding Date, StringFormat='{0:ddd dd MMM yyyy}'}"
Grid.Column="1" Grid.Column="1"

@ -93,6 +93,7 @@
<Entry <Entry
Text="FR " Text="FR "
x:Name="AccountIbanEntry" x:Name="AccountIbanEntry"
TextChanged="IbanChanged"
Placeholder="Entrez l'IBAN du compte" Placeholder="Entrez l'IBAN du compte"
Keyboard="Telephone"/> Keyboard="Telephone"/>

@ -86,12 +86,17 @@ public partial class CreateCustomerPage : ContentPage
gridAccount.Children.Add(nameLabel); gridAccount.Children.Add(nameLabel);
gridAccount.Children.Add(nameEntry); gridAccount.Children.Add(nameEntry);
StackLayout.Add(gridAccount); StackLayout.Add(gridAccount);
//StackLayout.Add(balance);
// StackLayout.Add(balanceEntry);
//StackLayout.Add(nameLabel);
//StackLayout.Add(nameEntry);
StackLayout.Add(iban); StackLayout.Add(iban);
StackLayout.Add(ibanEntry); StackLayout.Add(ibanEntry);
} }
public void IbanChanged(object sender, EventArgs e)
{
if(AccountIbanEntry.Text.Length < 3)
{
DisplayAlert("Erreur", "Vous ne pouvez pas effacer le FR !", "OK");
}
var cast = ((Entry)sender);
}
} }

@ -26,7 +26,7 @@
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"/> x:Name="Description"/>
</Frame> </Frame>

@ -11,9 +11,17 @@ public partial class HelpPage : ContentPage
public async void Send_Clicked(Object sender, EventArgs e) public async void Send_Clicked(Object sender, EventArgs e)
{ {
Message message = Account.AskForHelp(Subject.Text, Message.Text); if(Subject.Text.Length >= 50 || Description.Text.Length >= 200)
{
DisplayAlert("Erreur", "Trop de caracteres", "OK");
}
else
{
Message message = Account.AskForHelp(Subject.Text, Description.Text);
Mgr.Consultant.MessagesList.Add(message); Mgr.Consultant.MessagesList.Add(message);
await Shell.Current.GoToAsync("//balance"); await Shell.Current.GoToAsync("//balance");
} }
}
} }

@ -13,7 +13,8 @@
<ListView <ListView
ItemsSource="{Binding AccountsList}" ItemsSource="{Binding AccountsList}"
SelectionMode="None"> SelectionMode="None"
RowHeight="100">
<ListView.ItemTemplate> <ListView.ItemTemplate>
@ -22,7 +23,7 @@
<ViewCell> <ViewCell>
<VerticalStackLayout <VerticalStackLayout
HeightRequest="84" HeightRequest="100"
Margin="10"> Margin="10">
<Button <Button

@ -36,8 +36,7 @@ public partial class SwitchAccountPage : ContentPage
{ {
if(Mgr.IsConsultant == true) if(Mgr.IsConsultant == true)
{ {
//await Shell.Current.GoToAsync(; await Shell.Current.Navigation.PopAsync();
Debug.WriteLine("Hello");
} }
else else
{ {

Loading…
Cancel
Save