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.
38 lines
1.1 KiB
38 lines
1.1 KiB
using Model;
|
|
using Persistance;
|
|
using System.Dynamic;
|
|
|
|
namespace Views;
|
|
|
|
public partial class New_DetailAnimal : ContentPage
|
|
{
|
|
private Animal AnimalSelectione => (App.Current as App).AnimalSelectionner;
|
|
|
|
public New_DetailAnimal()
|
|
{
|
|
InitializeComponent();
|
|
(App.Current as App).PageDeSaisie = this;
|
|
InitBinding();
|
|
}
|
|
|
|
public void InitBinding()
|
|
{
|
|
BindingContext = AnimalSelectione;
|
|
}
|
|
|
|
public async void Button_OnClick(object sender, EventArgs e)
|
|
{
|
|
(App.Current as App).Theque.SupprimerAnimal((App.Current as App).AnimalSelectionner);
|
|
DataSerializerBinary.Serializer((App.Current as App).SerializationPath, (App.Current as App).Theque);
|
|
await Shell.Current.GoToAsync("//Animaux");
|
|
}
|
|
|
|
public async void Validate_OnClick(object sender, EventArgs e)
|
|
{
|
|
if ((App.Current as App).AnimalSelectionner.NomIsValid == true)
|
|
{
|
|
DataSerializerBinary.Serializer((App.Current as App).SerializationPath, (App.Current as App).Theque);
|
|
await Shell.Current.GoToAsync("//Animaux");
|
|
}
|
|
}
|
|
} |