|
|
|
@ -1,17 +1,24 @@
|
|
|
|
|
using Model;
|
|
|
|
|
|
|
|
|
|
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).AnimalSelectionner = (App.Current as App).Theque.AjouterAnimal();
|
|
|
|
|
BindingContext = (App.Current as App).AnimalSelectionner;
|
|
|
|
|
Picker_especes.BindingContext = (App.Current as App).Theque;
|
|
|
|
|
OnBackButtonPressed();
|
|
|
|
|
}
|
|
|
|
|
(App.Current as App).PageDeSaisie = this;
|
|
|
|
|
InitBinding();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void InitBinding()
|
|
|
|
|
{
|
|
|
|
|
BindingContext = AnimalSelectione;
|
|
|
|
|
Picker_especes.BindingContext = (App.Current as App).Theque;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public async void Button_OnClick(object sender, EventArgs e)
|
|
|
|
|
{
|
|
|
|
@ -21,7 +28,10 @@ public partial class New_DetailAnimal : ContentPage
|
|
|
|
|
|
|
|
|
|
public async void Validate_OnClick(object sender, EventArgs e)
|
|
|
|
|
{
|
|
|
|
|
await Shell.Current.GoToAsync("//Animaux");
|
|
|
|
|
if ((App.Current as App).AnimalSelectionner.NomIsValid == true)
|
|
|
|
|
{
|
|
|
|
|
await Shell.Current.GoToAsync("//Animaux");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void EspeceClic(object sender, EventArgs e)
|
|
|
|
|