fix some issues

pull/69/head
Antoine PEREDERII 2 years ago
commit 10756bddc9

@ -10,7 +10,6 @@ namespace Banquale.DataContractPersistance
{ {
public class DataContractPersXML : IPersistenceManager public class DataContractPersXML : IPersistenceManager
{ {
//public string FilePath { get; set; } = Environment.GetFolderPath(Environment.SpecialFolder.Personal) + "/datbase.xml";
public string FilePath { get; set; } = FileSystem.Current.AppDataDirectory; public string FilePath { get; set; } = FileSystem.Current.AppDataDirectory;
public string FileName { get; set; } = "DataSave.xml"; public string FileName { get; set; } = "DataSave.xml";
@ -33,19 +32,6 @@ namespace Banquale.DataContractPersistance
data = new DataToPersist(); // Si le fichier n'existe pas, créez une nouvelle liste data = new DataToPersist(); // Si le fichier n'existe pas, créez une nouvelle liste
} }
// List<Customer> CustomersList;
//Consultant Consultant;
//using (Stream s = File.OpenRead(Path.Combine(FilePath, FileNameCustomer)))
//{
// CustomersList = serializer.ReadObject(s) as List<Customer>;
// }
// using (Stream s = File.OpenRead(Path.Combine(FilePath, FileNameConsultant)))
// {
// Consultant = serializer2.ReadObject(s) as Consultant;
// }
return (data.customer, data.consultant); return (data.customer, data.consultant);
} }
@ -74,33 +60,6 @@ namespace Banquale.DataContractPersistance
} }
} }
// var serializer = new DataContractSerializer(typeof(List<Customer>));
// var serializer2 = new DataContractSerializer(typeof(Consultant));
// if (!Directory.Exists(FilePath))
//{
// Debug.WriteLine("Directory created");
// Debug.WriteLine(FilePath);
// Directory.CreateDirectory(FilePath);
//}
//var settings = new XmlWriterSettings() { Indent = true };
// using (TextWriter tw = File.CreateText(Path.Combine(FilePath, FileNameCustomer)))
//{
// using (XmlWriter writer = XmlWriter.Create(tw, settings))
// {
// serializer.WriteObject(writer, cu);
// }
//}
// using (TextWriter tw2 = File.CreateText(Path.Combine(FilePath, FileNameConsultant)))
// {
// using (XmlWriter writer2 = XmlWriter.Create(tw2, settings))
// {
// serializer.WriteObject(writer2, co);
// }
// }
} }
} }
} }

@ -22,6 +22,10 @@
RowDefinitions="auto, 35, *" RowDefinitions="auto, 35, *"
ColumnDefinitions="250, auto"> ColumnDefinitions="250, auto">
<<<<<<< HEAD
=======
>>>>>>> 55ea5ef38724b058c90869c8f83110399f1104d6
<Label <Label
Text="Compte Professionnel" Text="Compte Professionnel"
HorizontalOptions="Center" HorizontalOptions="Center"

@ -12,4 +12,8 @@ public partial class BalancePage : ContentPage
InitializeComponent(); InitializeComponent();
BindingContext = Mgr.SelectedAccount; BindingContext = Mgr.SelectedAccount;
} }
<<<<<<< HEAD
=======
>>>>>>> 55ea5ef38724b058c90869c8f83110399f1104d6
} }

@ -13,19 +13,6 @@ public partial class ConsultantIdPage : ContentPage
InitializeComponent(); InitializeComponent();
} }
//public async void Connection_Clicked(Object sender, EventArgs e)
//{
// string id = ident.Text;
// if (string.IsNullOrWhiteSpace(id))
// {
// await DisplayAlert("Erreur", "l'id ne doit pas être nulle", "OK");
// return;
// }
// await Navigation.PushModalAsync(new Balance.BalancePage());
//}
public async void Connection_Clicked(Object sender, EventArgs e) public async void Connection_Clicked(Object sender, EventArgs e)
{ {
uint currentId = Convert.ToUInt32(ident.Text); uint currentId = Convert.ToUInt32(ident.Text);

@ -8,37 +8,6 @@
<ContentPage.Resources> <ContentPage.Resources>
<conv:Bool2ColorConverters x:Key="bool2ColorConverters"/> <conv:Bool2ColorConverters x:Key="bool2ColorConverters"/>
</ContentPage.Resources> </ContentPage.Resources>
<!--<Grid RowDefinitions="2*, *, 0*, *, 0*, *, *, *, *, *, *">
<Grid Grid.Row="1" ColumnDefinitions="2*, *, 2*">
<Label Grid.Column="1"
Text="Prix"
HorizontalOptions="Center"
FontSize="Large"/>
</Grid>
<Grid Grid.Row="3" ColumnDefinitions="*, *, *">
<Label Grid.Column="1"
Text="poiuytreza"
HorizontalOptions="Center"/>
</Grid>
<Grid Grid.Row="5" ColumnDefinitions="*, 4*, *">
<Button Grid.Column="1" Text="Categorie" FontSize="Medium" />
</Grid>
<Grid Grid.Row="7" RowDefinitions="auto, *, *" ColumnDefinitions="*, auto, *">
<Label Grid.Row="0" Grid.Column="1" Text=" Paiment par carte &#x0a;4859 **** **** 9985" VerticalOptions="Center"/>
<BoxView Grid.Row="1" Grid.Column="1" HorizontalOptions="FillAndExpand"
HeightRequest="1.3"/>
<Label Grid.Row="2" Grid.Column="1" Text="En date du 15/06/2023"/>
</Grid>
<Grid Grid.Row="9" ColumnDefinitions="*, 4*, *">
<Button Grid.Column="1" Text="Faire opposition"/>
</Grid>
</Grid>-->
<VerticalStackLayout VerticalOptions="Center"> <VerticalStackLayout VerticalOptions="Center">
<Label <Label

@ -6,7 +6,7 @@ namespace Model
/// <summary> /// <summary>
/// Represents a transaction. /// Represents a transaction.
/// </summary> /// </summary>
[DataContract(IsReference = true)] [DataContract(IsReference = false)]
public class Transaction : INotifyPropertyChanged public class Transaction : INotifyPropertyChanged
{ {
/// <summary> /// <summary>

Loading…
Cancel
Save