private async void SelectedCommandExecuted(UserModel user) { try { if (user != null) { await PopupNavigation.PushAsync(new Views.PopupPage.UpdateUserPage(user)); } } catch (Exception ex) { throw; } }
private async void btnLogin_Clicked(object sender, EventArgs e) { LoadingGeneralPage LoadingPage = new LoadingGeneralPage(); await PopupNavigation.PushAsync(LoadingPage); await Task.Delay(3000); if (txtUsuario.Text == "nadia" && txtClave.Text == "1234") { await Navigation.PushAsync(new RegistroUsuarioPage()); await PopupNavigation.RemovePageAsync(LoadingPage); } }
async void lstView_intolerances_OnItemTapped(object sender, ItemTappedEventArgs e) { if (e == null) { return; // has been set to null, do not 'process' tapped event } await PopupNavigation.PushAsync(new RemoveItemFromListPopup((string)e.Item, SettingPageModel.AppSettings.Intolerances)); MessagingCenter.Subscribe <RemoveItemFromListPopup>(this, "RemovedItemFromList", (objSender) => { SettingPageModel.AppSettings.Intolerances = objSender.RefCollection; }); MessagingCenter.Unsubscribe <RemoveItemFromListPopup>(this, "RemoveItemFromList"); UpdateListViews(); }
public async Task NavigateToPopupAsync <TViewModel>(object parameter, bool animate) where TViewModel : ViewModelBase { var page = CreateAndBindPage(typeof(TViewModel), parameter); await(page.BindingContext as ViewModelBase).InitializeAsync(parameter); if (page is PopupPage) { await PopupNavigation.PushAsync(page as PopupPage, animate); } else { throw new ArgumentException($"The type ${typeof(TViewModel)} its not a PopupPage type"); } }
private async void ClickBtn(object sender, EventArgs e) { if (((Entry)stackLayout.Children[0]).Text != null && ((Entry)stackLayout.Children[0]).Text.Length > 0) { IsAskPaymmant = true; stackLayout.IsEnabled = false; await PopupNavigation.PushAsync(new Errror($"Give money for delivery to the driver {((Entry)stackLayout.Children[0]).Text}", null)); } else { IsAskPaymmant = false; await PopupNavigation.PushAsync(new Errror("You must enter the amount of payment for delivery", null)); } }
private async void Edit() { if (IsEditMode) { bool isValidateName = Unities.ValidateName(FirstName); bool isValidateLastName = Unities.ValidateName(LastName); bool isValidateDate = Unities.ValidateStringDateFormat(BirthDate); bool isValidateEmail = Unities.CheckEmailFormat(Email); bool isValidatePhoneNum = Unities.ValidateStringMobile(MobileNumber); if (isValidateName && isValidateLastName && isValidateDate && isValidateEmail && isValidatePhoneNum) { UpdateUserCommand updateUserCommand = new UpdateUserCommand { BitrhDate = DateTime.ParseExact(BirthDate, "dd/MM/yyyy", null), Email = Email, FirstName = FirstName, LastName = LastName, MobileNumber = MobileNumber, Gender = Gender }; var editResult = await _userService.UpdateUser(updateUserCommand); bool isError = editResult.IsError; if (isError) { await PopupNavigation.PushAsync(new Error(new ErrorViewModel("Error", (int)EW_Enumerations.EW_ErrorTypeEnum.Warning))); } else { //TODO: Show Completed Popup StoreValue(updateUserCommand); IsEditMode = false; ShowEditButton = true; await PopupNavigation.PushAsync(new SavedProfile()); Application.Current.MainPage.Navigation.PushAsync(new EditProfilePage()); } } else { await PopupNavigation.PushAsync(new Error(new ErrorViewModel("กรอกข้อมูลไม่ถูกต้อง", (int)EW_Enumerations.EW_ErrorTypeEnum.Warning))); } } else { IsEditMode = true; ShowEditButton = false; } }
/// <summary> /// Gets all TrackingEvents relating to the logged in user from the backend and sets their status /// </summary> public async void OnAppearing() { try { SelectedEvent = null; await PopupNavigation.PushAsync(new LoadingPopupView()).ConfigureAwait(false); unHandledEvents = serverClient.GetTrackingEvents().Result; SetEventStatus(); await PopupNavigation.PopAllAsync().ConfigureAwait(false); } catch (Exception e) { Console.WriteLine("trackingeventviewmodel init error"); } }
public XamGridViewFormsPage() { InitializeComponent(); BindingContext = new XamGridViewViewModel(); GrdView.ItemSelected += async(object sender, object e) => { var currentModel = e as XamGridModel; //await App.Current.MainPage.DisplayAlert("Clicked", "Current image position is " + currentModel.Position, "OK"); var page = new XFSlideShowPage(currentModel.Position); //PopupNavigation.pop(); await PopupNavigation.PushAsync(page); }; }
public UpdateProfile(CustomerReview customerReview) { InitializeComponent(); DateOfBithEntry.MaximumDate = DateTime.Now.AddYears(-18); //licIssueDate.MaximumDate = DateTime.Now; licenceexpiDate.MinimumDate = DateTime.Now; this.customerReview = customerReview; _token = App.Current.Properties["currentToken"].ToString(); customerId = (int)Application.Current.Properties["CustomerId"]; countryResponse = null; stateResponse = null; ProfileDetailsMobileRequest = new UpdateCustomerProfileDetailsMobileRequest(); profileDetailsMobileResponse = null; portalDetailsMobileRequest = new GetCustomerPortalDetailsMobileRequest(); portalDetailsMobileRequest.customerId = customerId; PortalDetailsMobileResponse = null; customoerController = new CustomerController(); Images = null; //licenceIssueDate.MaximumDate = DateTime.Now; //licenceExpiryDate.MinimumDate = DateTime.Now; licExpireDateSelected = false; licIssueDateSelected = false; licfrontIamgeStat = new CustomerImages(); licBackIamgeStat = new CustomerImages(); LicenceImagesRequest = new AddLicenceImagesRequest(); licenceImageResponse = null; var editPhoto = new TapGestureRecognizer(); editPhoto.Tapped += (s, e) => { if (Images != null) { if (Images.Base64 == null) { PopupNavigation.PushAsync(new editPrrofilePhotoPage()); } else { PopupNavigation.PushAsync(new editPrrofilePhotoPage(Images)); } } else { PopupNavigation.PushAsync(new editPrrofilePhotoPage()); } }; profileImage.GestureRecognizers.Add(editPhoto); }
//protected override void OnAppearing() //{ // base.OnAppearing(); // MessagingCenter.Subscribe<Dictionary<string,dynamic>, string>(vals, "NotifyMsg", (sender, arg) => // { // string retarg = arg; // List<CRMLead> crmLeadData = Controller.InstanceCreation().crmLeadData(); // }); //} async Task RecordAudio() { try { if (!recorder.IsRecording) //Record button clicked { var currentpage = new LoadingAlert(); await PopupNavigation.PushAsync(currentpage); recorder.StopRecordingOnSilence = false; // recorder.AudioStreamDetails.SampleRate = 0xA0000; // recorder.AudioStreamDetails.BitsPerSample = await PopupNavigation.PopAsync(); // recorder.StopRecordingOnSilence = TimeoutSwitch.IsToggled; //RecordButton.IsEnabled = false; //PlayButton.IsEnabled = false; //start recording audio //recorder.IsRecording = true; var audioRecordTask = await recorder.StartRecording(); //RecordButton.Text = "Stop Recording"; //RecordButton.IsEnabled = true; // await audioRecordTask; //RecordButton.Text = "Record"; //PlayButton.IsEnabled = true; } else //Stop button clicked { // RecordButton.IsEnabled = false; //stop the recording... await recorder.StopRecording(); // RecordButton.IsEnabled = true; } } catch (Exception ex) { //blow up the app! throw ex; } }
public VideoPlayerPageViewModel(IAppService appService, IAppDataStorage appDataStorage, IAnimeApiService animeService, ISeasonApiService seasonService) : base(appService) { SelectAnimeCommand = new DelegateCommand <Anime>((anime) => Anime = anime); SelectSeasonCommand = new DelegateCommand <Season>(async(season) => { await PopupNavigation.PushAsync(new SeasonPage(season)); }); VideoInfoProperties.AddRange(new List <InfoProperty>() { new InfoProperty() { PropertyName = "Đạo diễn", PropertyValue = "Takuji Suzuki, Shinobu Yaguchi" }, new InfoProperty() { PropertyName = "Biên tập", PropertyValue = "Takuji Suzuki, Shinobu Yaguchi" }, new InfoProperty() { PropertyName = "Diễn viên", PropertyValue = " Travis Mullenix, Satoru Jitsunashi, Jason C. Kane, Masumi Kuichi, Nao Nekota, Yôji Tanaka" }, new InfoProperty() { PropertyName = "Quay phim", PropertyValue = "Shinobu Yaguchi " }, new InfoProperty() { PropertyName = "Biên tập phim", PropertyValue = "Shinobu Yaguchi " }, new InfoProperty() { PropertyName = "Âm thanh", PropertyValue = "Joseph Shalack" }, new InfoProperty() { PropertyName = "Lòng tiếng", PropertyValue = "Chuck Powers" } }); _seasonService = seasonService; _animeService = animeService; _appDataStorage = appDataStorage; }
private async Task <string> Aanpassen() { var result = string.Empty; // create the TextInputView var inputView = new TextInputView( "Geef je wachtwoord op", "wachtwoord...", "OK", "Annuleer", "Onjuist wachtwoord!"); // create the Transparent Popup Page // of type string since we need a string return var popup = new InputAlertDialogBase <string>(inputView); // subscribe to the TextInputView's Button click event inputView.SaveButtonEventHandler += (sender, obj) => { if (bus.Vergelijken(inputView.TextInputResult) == true) { ((TextInputView)sender).IsValidationLabelVisible = false; popup.PageClosedTaskCompletionSource.SetResult(((TextInputView)sender).TextInputResult); lstGebruiker.SelectedItem = (lstGebruiker.ItemsSource as List <Gebruiker>)[0]; Navigation.PushAsync(new GegevensAanpassen() { BindingContext = lstGebruiker.SelectedItem as Gebruiker }); } else { ((TextInputView)sender).IsValidationLabelVisible = true; } }; // subscribe to the TextInputView's Button click event inputView.CancelButtonEventHandler += (sender, obj) => { popup.PageClosedTaskCompletionSource.SetResult(null); }; // Push the page to Navigation Stack await PopupNavigation.PushAsync(popup); // await for the user to enter the text input result = await popup.PageClosedTask; // Pop the page from Navigation Stack await PopupNavigation.PopAsync(); // return user inserted text value return(result); }
private async Task <string> OpenSelectableInputAlertDialog() { // create the TextInputView var inputView = new SelectableInputView( "How's your day mate?", new List <string>() { "Awesome!", "Great!", "Cool!", "Good!", "Not Bad!", "Meh!" }, "Save", "Cancel", "Ops! You can't leave without a selection!"); // create the Transparent Popup Page // of type string since we need a string return var popup = new InputAlertDialogBase <string>(inputView); // subscribe to the TextInputView's Button click event inputView.SaveButtonEventHandler += (sender, obj) => { if (!string.IsNullOrEmpty(((SelectableInputView)sender).SelectionResult)) { ((SelectableInputView)sender).IsValidationLabelVisible = false; popup.PageClosedTaskCompletionSource.SetResult(((SelectableInputView)sender).SelectionResult); } else { ((SelectableInputView)sender).IsValidationLabelVisible = true; } }; // subscribe to the TextInputView's Button click event inputView.CancelButtonEventHandler += (sender, obj) => { popup.PageClosedTaskCompletionSource.SetResult(null); }; // Push the page to Navigation Stack await PopupNavigation.PushAsync(popup); // await for the user to enter the text input var result = await popup.PageClosedTask; // Pop the page from Navigation Stack await PopupNavigation.PopAsync(); // return user inserted text value return(result); }
public Task <string> GetPickerChoice(string title, string message, IEnumerable ItemSource, string currentText = null, Keyboard keyboard = null) { if (keyboard == null) { keyboard = Keyboard.Default; } var cts = new TaskCompletionSource <string>(); var _dialogView = new PickerPopupView(title, message, ItemSource, currentText, keyboard); PopupNavigation.PushAsync(new PopupPage { Content = _dialogView }); _dialogView.Picked += (s, o) => { cts.SetResult(o); PopupNavigation.PopAsync(); }; return(cts.Task); }
private async void OpenPopup(object sender, EventArgs e) { var nome = Nome; var page = new NamePhonePopUp(ref nome); page.Disappearing += (o, args) => { var b = nome; }; await PopupNavigation.PushAsync(page : page); var a = nome; }
private async void OnTapProducto(Producto producto) { try { if (producto != null) { { //despliega el popup para agregar productos pasandole el producto await PopupNavigation.PushAsync(new AddProductoPopup(producto, Clientes.IdCliente)); } } } catch (Exception ex) { Debug.WriteLine(ex.Message); } }
private async void Button_Clicked_1(object sender, EventArgs e) { if (fullInfoOneOrderAndPrintingMV.IsValid) { await PopupNavigation.PushAsync(new Confirm(fullInfoOneOrderAndPrintingMV, fullInfoOneOrderAndPrintingMV.Carrier.Price.ToString(), await fullInfoOneOrderAndPrintingMV.GetAndSetPostageBalance(), Navigation, true, null, fullInfoOneOrderAndPrintingMV.Carrier)); DSOBtn.BorderColor = Color.Default; DSOBtn.BorderWidth = 0; } else { DSOBtn.BorderColor = Color.Red; DSOBtn.BorderWidth = 1; } }
private async void ButtonMarkLost_ClickedAsync(object sender, EventArgs e) { // Navigation.PushPopupAsync(new MarkLostPopupPage()); List <CRMLead> crmLeadData = Controller.InstanceCreation().crmLeadData(); if (App.NetAvailable == true) { await PopupNavigation.PushAsync(new MarkLostPopupPage(obj.id)); } else { await DisplayAlert("Alert", "Internet Connection Needed", "Ok"); } }
private async void Button_Clicked_2(object sender, EventArgs e) { if (printingShipingLabeMW.IsValid) { await PopupNavigation.PushAsync(new Confirm(printingShipingLabeMW, printingShipingLabeMW.Carrier.Price.ToString(), await printingShipingLabeMW.GetAndSetPostageBalance(), Navigation, false, null, printingShipingLabeMW.Carrier)); DSOBtn.BorderColor = Color.Default; DSOBtn.BorderWidth = 0; } else { DSOBtn.BorderColor = Color.Red; DSOBtn.BorderWidth = 1; } }
private async void Button_Clicked(object sender, EventArgs e) { StackLayout stackLayout = ((Button)sender).FindByName <StackLayout>("st"); await stackLayout.FadeTo(0.2, 300); await PopupNavigation.PushAsync(new LoadPage()); string itemId = ((Button)sender).FindByName <Label>("itemId").Text; string recordId = ((Button)sender).FindByName <Label>("recordId").Text; FullOrderSettings fullOrderSettings = bulkPostagePrintingMV.SelectProduct .Find(s => s.EBayItemID == itemId && s.RecordNumber == recordId); fullOrderSettings.cDimensions.Height = Convert.ToDouble(fullOrderSettings.DimensionsH); fullOrderSettings.cDimensions.Width = Convert.ToDouble(fullOrderSettings.DimensionsW); fullOrderSettings.cDimensions.Length = Convert.ToDouble(fullOrderSettings.DimensionsL); int indexSelectProduct = bulkPostagePrintingMV.SelectProduct .FindIndex(s => s.EBayItemID == itemId && s.RecordNumber == recordId); var WOzCrEntry = ((Button)sender).FindByName <CrossEntry>("WOzCrEntry"); var WLbsCrEntry = ((Button)sender).FindByName <CrossEntry>("WLbsCrEntry"); var WkgCrEntry = ((Button)sender).FindByName <CrossEntry>("WkgCrEntry"); if (fullOrderSettings.Oz != 0) { await Task.Run(() => bulkPostagePrintingMV.UpdateOneOrder(fullOrderSettings)); await PopupNavigation.PopAllAsync(); if (bulkPostagePrintingMV.CarriersFedEx.Count != 0 || bulkPostagePrintingMV.CarriersUPS.Count != 0 || bulkPostagePrintingMV.CarriersUSPS.Count != 0) { await PopupNavigation.PushAsync(new OptinsPage1(bulkPostagePrintingMV, fullOrderSettings.CarriersUSPS.Count != 0, fullOrderSettings.CarriersUPS.Count != 0, fullOrderSettings.CarriersFedEx.Count != 0, indexSelectProduct), true); } else { await PopupNavigation.PushAsync(new Error("Carrer does not exist or did not have time to boot"), true); } WOzCrEntry.TextColor = Color.FromHex("#2aa0ea"); WLbsCrEntry.TextColor = Color.FromHex("#2aa0ea"); WkgCrEntry.TextColor = Color.FromHex("#2aa0ea"); ValidWeight(itemId, recordId); } else { WOzCrEntry.TextColor = Color.Red; WLbsCrEntry.TextColor = Color.Red; WkgCrEntry.TextColor = Color.Red; } await stackLayout.FadeTo(1, 250); }
private async void Apply(object sender, EventArgs e) { if (!newSelectedCategories.Any() && !toRemoveCategories.Any()) { await PopupNavigation.PopAsync(); return; } if (!allSelectedCategories.Any()) { await DisplayAlert("Erreur", "Au moins une catégorie doit être selectionné!", "Ok"); return; } await PopupNavigation.PushAsync(new LoadingPopupPage()); pastryShop.Categories.ToList().ForEach(c => c.PastryShops.Clear()); newSelectedCategories.ForEach(c => c.PastryShops.Clear()); PastryShop p = new PastryShop() { ID = pastryShop.ID, Name = pastryShop.Name, Email = pastryShop.Email, Password = pastryShop.Password, ShortDesc = pastryShop.ShortDesc, LongDesc = pastryShop.LongDesc, CoverPic = pastryShop.CoverPic, ProfilePic = pastryShop.ProfilePic, PriceRange_FK = pastryShop.PriceRange_FK, Address_FK = pastryShop.Address_FK, NumberOfRatings = pastryShop.NumberOfRatings, RatingSum = pastryShop.RatingSum, Categories = pastryShop.Categories }; toRemoveCategories.ForEach(rc => p.Categories.Remove(p.Categories.FirstOrDefault(c => c.ID == rc.ID))); newSelectedCategories.ForEach(sc => p.Categories.Add(sc)); var pastryShopRC = new PastryShopRestClient(); if (await pastryShopRC.PutAsyncCategories(p.ID, p)) { await DisplayAlert("Succées", "Liste de catégories mise à jours!", "Ok"); editProfileInfo.UpdateParent = true; editProfileInfo.load(); await PopupNavigation.PopAsync(); } }
private async void btnActualizarPerfil_Clicked(object sender, EventArgs e) { detailLoading = "Actualizando perfil..."; LoadingPage loading = new LoadingPage(detailLoading); await PopupNavigation.PushAsync(loading); await Task.Delay(1000); try { var usuarioExiste = usuarios.Where(x => x.UsuarioNombre == txtUsuarioPerfil.Text && x.UsuarioID != userID) .Select(y => y.UsuarioNombre).FirstOrDefault(); if (usuarioExiste != null) { await PopupNavigation.RemovePageAsync(loading); titleError = "Usuario incorrecto"; detailError = "El nombre de usuario es incorrecto. Intente nuevamente."; await results.Unsuccess(titleError, detailError); } else { claveEncriptada = DataSecurity.Encrypt(txtClavePerfil.Text, "sblw-3hn8-sqoy19"); await data.UpdateUsuario(userID, txtNombreRealPerfil.Text, txtCorreoPerfil.Text, txtUsuarioPerfil.Text, claveEncriptada, perfilUsuario.UsuarioRol, perfilUsuario.Acceso, perfilUsuario.UsuarioEstado); refreshUsuario = txtNombreRealPerfil.Text; await SecureStorage.SetAsync("nombreUsuario", txtNombreRealPerfil.Text); MasterMenuHabitantePage.usuarioRefresh = txtNombreRealPerfil.Text; MasterMenuPage.usuarioRefresh = txtNombreRealPerfil.Text; await PopupNavigation.RemovePageAsync(loading); titleCorrect = "Perfil actualizado"; detailCorrect = "Se ha actualizado su perfl correctamente."; await results.Success(titleCorrect, detailCorrect); } } catch (Exception) { await PopupNavigation.RemovePageAsync(loading); titleError = "Error"; detailError = "Ha ocurrido un error procesando la actualización de datos. Intente nuevamente."; await results.Unsuccess(titleError, detailError); } }
private Label AddLine() { #region Add Line Button Label thisLabel = new Label { Text = FontAwesomeIcons.FontAwesomeIcons.Plus, FontFamily = "fa.otf#fa", FontSize = 30, TextColor = Color.WhiteSmoke, HorizontalTextAlignment = TextAlignment.Center, VerticalTextAlignment = TextAlignment.Center }; TapGestureRecognizer tap = new TapGestureRecognizer(); tap.Tapped += (s, e) => { PopupNavigation.PushAsync(new PopUp(AddNewLineForm())); }; thisLabel.GestureRecognizers.Add(tap); return(thisLabel); #endregion }
private async void ModifyEmployee_Clicked(object sender, EventArgs e) { string chosen = employeeList.SelectedItem?.ToString(); if (chosen == null) { await DisplayAlert("Whoopsie", "Choose an employee first.", "OK"); } else { string[] employee = chosen.Split(new string[] { " " }, StringSplitOptions.RemoveEmptyEntries); int empID = employee.Count(); string chosenEmployee = employee[empID - 2]; await PopupNavigation.PushAsync(new ModifyEmployeePopupView(chosenEmployee)); } }
private async void view_event(object sender, Syncfusion.ListView.XForms.ItemTappedEventArgs e) { LstEvents.IsEnabled = false; if (e != null) { ScheduleAppointment appointment = new ScheduleAppointment(); appointment.Subject = (e.ItemData as EventModel).Name; appointment.Notes = (e.ItemData as EventModel).Description; appointment.StartTime = Convert.ToDateTime((e.ItemData as EventModel).StartEventDate); appointment.EndTime = Convert.ToDateTime((e.ItemData as EventModel).EndEventDate); appointment.Color = (e.ItemData as EventModel).Color; await PopupNavigation.PushAsync(new EventSelected(appointment, "MyAccount")); } LstEvents.IsEnabled = true; }
public NovoProduto() { InitializeComponent(); NavigationPage.SetHasNavigationBar(this, false); var mensagem_tap = new TapGestureRecognizer(); mensagem_tap.Tapped += async(s, e) => { var app = new PopUpProdutosCadastrosSub(); await PopupNavigation.PushAsync(app); }; IdCadastro.GestureRecognizers.Add(mensagem_tap); CarregaInfo(); }
public async void PegaValor(bool retry) { _activity.RunOnUiThread(async() => { await PopupNavigation.PushAsync(new Paginas.PopupTentarNovamente()); }); Paginas.PopupTentarNovamente tentarNovamente = new Paginas.PopupTentarNovamente(); if (tentarNovamente.resultado) { retry = false; } else { retry = true; } }
private async void DeleteWork_Clicked(object sender, EventArgs e) { string WorkID = workList.SelectedItem?.ToString(); if (WorkID == null) { await DisplayAlert("Whoopsie", "Choose a work first.", "OK"); } else { string[] work = WorkID.Split(new string[] { " " }, StringSplitOptions.RemoveEmptyEntries); int works = work.Count(); string workid = work[works - 2]; await PopupNavigation.PushAsync(new DeleteWorkPopupView(workid)); } }
public Task <string> GetInputTextAsync(string title, string message, string currentText = null, Keyboard keyboard = null) { if (keyboard == null) { keyboard = Keyboard.Default; } var cts = new TaskCompletionSource <string>(); var _dialogView = new Plugin.DialogKit.Views.InputView(title, message, currentText, keyboard); _dialogView.Picked += (s, o) => { cts.SetResult(o); PopupNavigation.PopAsync(); }; PopupNavigation.PushAsync(new PopupPage { Content = _dialogView }); _dialogView.FocusEntry(); return(cts.Task); }
private async void Agregar_Clicked(object sender, EventArgs e) { if (string.IsNullOrEmpty(EntryCedula.Text) || string.IsNullOrEmpty(EntryNombre.Text) || string.IsNullOrEmpty(EntryApellido.Text) || EntryCedula.Text.Length != 11) { await PopupNavigation.PushAsync(new PopUpDatosIncorrectos()); } else { var padronRegistro = new PADRON(); padronRegistro.CEDULA = EntryCedula.Text; padronRegistro.NOMBRES = EntryNombre.Text.ToUpper(); padronRegistro.APELLIDO1 = EntryApellido.Text.ToUpper(); padronRegistro.APELLIDO2 = ""; var db = new SQLiteConnection(Preferences.Get("DB_PATH", "")); try { db.Insert(padronRegistro); if (LastPage == true) { await PopupNavigation.PushAsync(new PopUpDatosCorrectos()); Navigation.PushAsync(new CompanyPage(EntryCedula.Text, EntryNombre.Text, EntryApellido.Text)); } else { Navigation.PopAsync(); await PopupNavigation.PushAsync(new PopUpRegistrado_Hacia_Grupo()); } EntryApellido.Text = ""; EntryCedula.Text = ""; EntryNombre.Text = ""; return; } catch (Exception ey) { var properties = new Dictionary <string, string> { { "Category", "Error insertando en la base de datos." }, { "Code", "MainPage.xaml.cs Line: 313" }, { "Lector", Preferences.Get("LECTOR", "0") } }; Crashes.TrackError(ey, properties); Debug.WriteLine("No se pudo Insertar el documento. Exception: " + ey.ToString()); Analytics.TrackEvent("Error al ingresar registro " + ey.Message + "\n Escaner: " + Preferences.Get("LECTOR", "N/A")); } } }