예제 #1
0
        private async void Btneliminar_Clicked(object sender, EventArgs e)
        {
            EliminarRaza view      = new EliminarRaza();
            RazaModel    viewmodel = new RazaModel();
            int          num       = int.Parse(this.cajacodigo.Text);
            Raza         raz       = this.repo.BuscarRaza(num);

            viewmodel.Raza      = raz;
            view.BindingContext = viewmodel;
            await Navigation.PushModalAsync(view);
        }
예제 #2
0
 private async void btneliminar_Clicked(object sender, EventArgs e)
 {
     try
     {
         EliminarRaza eli      = new EliminarRaza();
         RazaModel    viewmode = new RazaModel();
         int          num      = int.Parse(this.cajacodigo.Text);
         Raza         ra       = this.repo.BuscarRaza(num);
         viewmode.Raza      = ra;
         eli.BindingContext = viewmode;
         await Navigation.PushModalAsync(eli);
     }
     catch (Exception)
     {
         DisplayAlert("Error", "Inserte numeros correctamente", "OK");
     }
 }