Compare commits

...

7 Commits

@ -41,7 +41,7 @@
SelectedItem="{Binding SelectedBanque}"
Margin="0,0,30,0"/>
<Picker Title="Choisir un Compte"
ItemsSource="{Binding ListeDesComptes}"
ItemsSource="{Binding AllCompte}"
ItemDisplayBinding="{Binding Nom}"
SelectedItem="{Binding SelectedCompte}"
Margin="30,0,0,0"/>

@ -1,5 +1,6 @@
using Model;
using System.Globalization;
namespace IHM.Desktop;
@ -23,8 +24,13 @@ public partial class CV_credit : ContentView
private void Button_Valider(object sender, EventArgs e)
{
string nom = name.Text;
double Montant = Double.Parse(montant.Text);
NumberFormatInfo provider = new NumberFormatInfo();
provider.NumberDecimalSeparator = ".";
string nom = name.Text;
double Montant = Convert.ToDouble(montant.Text, provider); //Double.Parse(montant.Text);
string Type = type.Text;
string Tag = tag.Text;
DateTime Date = date.Date;
@ -52,7 +58,7 @@ public partial class CV_credit : ContentView
Operation operation = new Operation(nom, Montant, Date, mp2, to2, false, false) ;
Mgr.effectuerOperation(Mgr.SelectedCompte, operation);
Mgr.Pers.AjouterOperation(Mgr.SelectedCompte, operation);
Navigation.PushAsync(new Dashboard());

@ -22,7 +22,7 @@ public partial class CV_debit : ContentView
private void Button_Valider(object sender, EventArgs e)
{
string nom = name.Text;
double Montant = Double.Parse(montant.Text);
double Montant = double.Parse(montant.Text);
string Type = type.Text;
string Tag = tag.Text;
DateTime Date = date.Date;

@ -9,8 +9,9 @@
<Grid.RowDefinitions>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="0.75*"/>
<RowDefinition Height="5*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="2*"/>
<RowDefinition Height="4*"/>
<RowDefinition Height="2*"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
@ -38,43 +39,50 @@
<ContentView Grid.Column="0" Grid.Row="2" Grid.ColumnSpan="2" Grid.RowSpan="2" >
<ContentView Grid.Column="0" Grid.Row="3" Grid.ColumnSpan="4" Grid.RowSpan="2" Margin="10">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
<CollectionView ItemsSource="{Binding AllCompte }" Grid.Row="3" Grid.ColumnSpan="4" Grid.RowSpan="2" >
</Grid.ColumnDefinitions>
<CollectionView.ItemTemplate>
<DataTemplate>
<Grid Margin="20">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Label Grid.Column="0" Text="{Binding SelectedCompte.Nom}"
TextColor="{StaticResource Secondary}"
FontAttributes="Bold" FontSize="Large"
HorizontalOptions="Center"
VerticalOptions="Center"/>
<Label Grid.Column="1" Text="{Binding SelectedCompte.Solde}"
<Label Grid.Column="0" Text="{Binding Nom}"
TextColor="{StaticResource Secondary}"
FontAttributes="Bold" FontSize="Large"
HorizontalOptions="Center"
VerticalOptions="Center"/>
<Label Grid.Column="1" Text="{Binding Solde}"
TextColor="{StaticResource Secondary}"
FontAttributes="Bold" FontSize="Large"
HorizontalOptions="Center"
VerticalOptions="Center"/>
FontAttributes="Bold" FontSize="Large"
HorizontalOptions="Center"
VerticalOptions="Center"/>
<Label Grid.Column="1" Text="€"
<Label Grid.Column="1" Text="€"
TextColor="{StaticResource Secondary}"
FontAttributes="Bold" FontSize="Large"
HorizontalOptions="Center"
VerticalOptions="Center"
FontAttributes="Bold" FontSize="Large"
HorizontalOptions="Center"
VerticalOptions="Center"
Margin="120,0,0,0"/>
</Grid>
</ContentView>
</Grid>
</DataTemplate>
</CollectionView.ItemTemplate>
</CollectionView>
</ContentView>
<ContentView Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" Grid.RowSpan="4" x:Name="windowAjout">

@ -11,8 +11,8 @@ public partial class Compte : ContentView
Mgr.LoadBanque();
Mgr.LoadCompte();
BindingContext = Mgr;

Loading…
Cancel
Save