private async void Button_ClickedAsync(object sender, System.EventArgs e) { cx.id = aux.id; cx.nombre = c.Name; try { ProductDataBase productDatabase = new ProductDataBase(); int i = productDatabase.saveCurso(cx); if (i == 1) { await DisplayAlert("Correcto", "Curso Asignado con Exito", "Continuar"); } } catch (Exception ex) { await DisplayAlert("Lo Sentimos", "Curso no Asignado o Ya Existe", "OK"); } await Navigation.PushAsync(new ListCursosPage(aux)); }