You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
using Model;
|
|
|
|
using System.Diagnostics;
|
|
|
|
|
|
|
|
namespace IHM.Mobile;
|
|
|
|
|
|
|
|
public partial class AjoutBanques : ContentPage
|
|
|
|
{
|
|
|
|
public Manager Mgr => (App.Current as App).Manager;
|
|
|
|
public AjoutBanques()
|
|
|
|
{
|
|
|
|
InitializeComponent();
|
|
|
|
BindingContext = Mgr;
|
|
|
|
Mgr.importBanques();
|
|
|
|
}
|
|
|
|
|
|
|
|
private async void ImportOFX_Clicked(object sender, EventArgs e)
|
|
|
|
{
|
|
|
|
PickOptions options = new PickOptions();
|
|
|
|
options.PickerTitle = "Choisir un fichier OFX";
|
|
|
|
|
|
|
|
var result = await FilePicker.Default.PickAsync(options);
|
|
|
|
if (result != null)
|
|
|
|
{
|
|
|
|
if (result.FileName.EndsWith("ofx", StringComparison.OrdinalIgnoreCase))
|
|
|
|
{
|
|
|
|
string file = File.ReadAllText(result.FullPath).ToString();
|
|
|
|
//return file;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
throw new FileLoadException("Imposible de charger le fichier");
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|