示例#1
0
        private async void pickContactsBt_Click(object sender, RoutedEventArgs e)
        {
            try
            {
                cp = new ContactPicker();
                cp.SelectionMode = ContactSelectionMode.Fields;
                cp.DesiredFieldsWithContactFieldType.Add(ContactFieldType.PhoneNumber);
                var contact = await cp.PickContactAsync();

                Country selectedCountry = ((WithdrawalViewModel)DataContext).SelectedCountry;
                bool    validationResult;
                if (contact == null)
                {
                    validationResult = Helper.ValidateContactInfo("", "", out ((WithdrawalViewModel)DataContext).contactNumberWellFormatted, ref selectedCountry, ref ((WithdrawalViewModel)DataContext).isToResetCountry, ref ((WithdrawalViewModel)DataContext).validateContactInfoAgain);
                    ((WithdrawalViewModel)DataContext).SelectedCountry = selectedCountry;
                    ((WithdrawalViewModel)DataContext).updateUserInterfaceBasedOnBasedOnValidationResult("", "", validationResult);
                }
                else
                {
                    validationResult = Helper.ValidateContactInfo(contact.DisplayName, contact.Phones.FirstOrDefault().Number, out ((WithdrawalViewModel)DataContext).contactNumberWellFormatted, ref selectedCountry, ref ((WithdrawalViewModel)DataContext).isToResetCountry, ref ((WithdrawalViewModel)DataContext).validateContactInfoAgain);
                    ((WithdrawalViewModel)DataContext).SelectedCountry = selectedCountry;
                    ((WithdrawalViewModel)DataContext).updateUserInterfaceBasedOnBasedOnValidationResult(contact.DisplayName, contact.Phones.FirstOrDefault().Number, validationResult);

                    contactNumberBackup = contact.Phones.FirstOrDefault().Number;
                    ButtonOk.Focus(FocusState.Programmatic);
                }
            }
            catch (Exception) { }

            HelperWindows.LoseFocus(sender);
        }
示例#2
0
        private void BtnBeneficiarios_Click(object sender, EventArgs e)
        {
            FrmBeneficiarios frmBeneficiarios = new FrmBeneficiarios {
                MdiParent = this
            };

            HelperWindows.OpenForm(frmBeneficiarios, HelperWindows.ModeOpen.Normal);
        }
示例#3
0
        private void BtnDocumentos_Click(object sender, EventArgs e)
        {
            FrmConfigDocs frmConfigDocs = new FrmConfigDocs();

            HelperWindows.OpenForm(frmConfigDocs, HelperWindows.ModeOpen.Dialog);
        }
示例#4
0
        private void BtnServidor_Click(object sender, EventArgs e)
        {
            FrmConfigDB frmConfigDB = new FrmConfigDB();

            HelperWindows.OpenForm(frmConfigDB, HelperWindows.ModeOpen.Dialog);
        }
示例#5
0
        private void BtnImpresora_Click(object sender, EventArgs e)
        {
            FrmConfigPrinter frmConfigPrinter = new FrmConfigPrinter();

            HelperWindows.OpenForm(frmConfigPrinter, HelperWindows.ModeOpen.Dialog);
        }
        public async void SynchronizeBankCardDataCallback(Business.Network.Cards.Models.ListCardOutput responseCards, Exception exception)
        {
            try
            {
                if (exception == null && responseCards != null)
                {
                    if (!string.IsNullOrEmpty(responseCards.status))
                    {
                        var handler = new StatusCodeSyncCardDataHandler(false);
                        await handler.HandleStatusCodeResult(responseCards.status);

                        if (handler.StatusCode == StatusCodeHandler.EnumStatusCodes.SUCCESS)
                        {
                            responseCards.cardsList = await LocalStoreCardsHelper.ManageLocalCardsStoreBasedOnSyncCardData(responseCards.cardsList);

                            if (responseCards.cardsList != null && responseCards.cardsList.Count > 0)
                            {
                                fillObservableCardArray(responseCards.cardsList);
                                IsLoading = false;
                                AppCustom.mListCardsViewModelInstance = null;
                                return;
                            }
                        }

                        responseCards.cardsList = await LocalStoreCardsHelper.GetListLocalCardsStore();

                        if (responseCards.cardsList != null && responseCards.cardsList.Count > 0)
                        {
                            fillObservableCardArray(responseCards.cardsList);
                            IsLoading = false;
                            NavigateServiceManager.Instance.HandleCompleteNavigation(handler);
                            AppCustom.mListCardsViewModelInstance = null;
                            return;
                        }

                        IsToHideControls = true;
                        IsLoading        = false;

                        // If we reach this case, we want to navigate do the MainPage irrespectively of the Error Type
                        handler.StatusCodeNavigationPage.PageType = HelperWindows.GetPageToNavigateBasedOnTag(HelperWindows.EnumNavigationPages.MainPage.ToString());
                        NavigateServiceManager.Instance.HandleCompleteNavigation(handler);
                    }
                }
                else if (!Helper.IsInternetConnected())
                {
                    responseCards.cardsList = await LocalStoreCardsHelper.GetListLocalCardsStore();

                    IsLoading = false;
                    if (responseCards.cardsList != null)
                    {
                        fillObservableCardArray(responseCards.cardsList);
                    }
                    else
                    {
                        NavigateServiceManager.Instance.Navigate(typeof(MainPage), typeof(MasterPage));
                    }
                }
            }
            catch (Exception) { }
            finally
            {
                AppCustom.mListCardsViewModelInstance = null;
                IsLoading = false;
            }
        }
 private void ButtonBase_OnClick(object sender, RoutedEventArgs e)
 {
     HelperWindows.LoseFocus(this);
 }
 private void BtnGuardar_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
 {
     HelperWindows.IsEmptyComponent(layoutControl2);
 }