private async void BtnAccept_Clicked(object sender, EventArgs e) { if (string.IsNullOrEmpty(EnNombre.Text) || string.IsNullOrEmpty(DtNac.ToString()) || string.IsNullOrEmpty(LbEquipoFav.Text)) { await DisplayAlert("Datos incompletos", "pro favor complete todos los campos", "ok"); return; } var encuesta = new Encuesta() { EquipoFavorito = LbEquipoFav.Text, Nombre = EnNombre.Text, FechaNacimiento = DtNac.Date }; MessagingCenter.Send((ContentPage)this, Mensajes.EncuestaCompleta, encuesta); await Navigation.PopAsync(); }
private async void BtnAceptar_Clicked(object sender, EventArgs e) { if (string.IsNullOrEmpty(EntNombre.Text) || string.IsNullOrEmpty(LbEquipoFav.Text)) { await DisplayAlert("Datos incompletos", "Por favor diligencie todos los campos", "Aceptar"); return; } var quiz = new Encuesta() { Nombre = EntNombre.Text, EquipoFavorito = LbEquipoFav.Text, FechaNacimiento = DtNacim.Date }; MessagingCenter.Send((ContentPage)this, Mensajes.EncuestaCompleta, quiz); await Navigation.PopAsync(); }