Beispiel #1
0
        public InvoiceDetailPageViewModel(IApiService apiService, IDialogService dialogService, INavigationService navigationService, IValidatorService validatorService, IPhoneService phoneService)
        {
            IsCO = AppConfigurations.Brand == "emi";
            IsUY = AppConfigurations.Brand == "ucm";

            this.apiService        = apiService;
            this.dialogService     = dialogService;
            this.navigationService = navigationService;
            this.validatorService  = validatorService;
            this.phoneService      = phoneService;

            invoicePageViewModel = ServiceLocator.Current.GetInstance <IInvoicesPageViewModel>();
        }
Beispiel #2
0
        private async void Options()
        {
            string option = await dialogService.Invoices(State);

            IInvoicesPageViewModel invoicesViewModel = ServiceLocator.Current.GetInstance <IInvoicesPageViewModel>();

            invoicesViewModel.InvoiceSelected = this;

            switch (option)
            {
            case "Ver detalle":
                await invoicesViewModel.GoToDetails();

                break;

            case "Pagar":
                ILoginViewModel login = ServiceLocator.Current.GetInstance <ILoginViewModel>();
                string          url   = $"{AppConfigurations.UrlPaymentMethodsApp}?document={login.User.Document}&documentType={login.User.DocumentType}&ProductName=Factura&NameOne={login.User.NameOne}&NameTwo={login.User.NameTwo}&LastNameOne={login.User.LastNameOne}&LastNameTwo={login.User.LastNameTwo}&userName={login.User.UserName}&CellPhone={login.User.CellPhone}&InvoiceTotal={Amount}&InternalSerie={InternalSeries}&InternalNumber={InternalNumber}&NumberInvoice={Number.Replace(" ", "")}&anonymouspay=true";
                phoneService.OpenUrl(url);
                break;
            }
        }
        public async Task Navigate(AppPages page, bool IsMainPage = false, string code = null)
        {
            await ValidateCurrentService(page);

            switch (page)
            {
                #region MyAccountPage
            case AppPages.AddFamilyPage:
                await(Application.Current.MainPage as MasterDetailPage).Detail.Navigation.PushAsync(new AddFamilyPage());
                IAddFamilyPageViewModel addFamilyPageViewModel = ServiceLocator.Current.GetInstance <IAddFamilyPageViewModel>();
                addFamilyPageViewModel.ShowResult();
                break;

            case AppPages.BeneficiariesPage:
                await(Application.Current.MainPage as MasterDetailPage).Detail.Navigation.PushAsync(new BeneficiariesPage());
                break;

            case AppPages.ProductsAndPlans:
                IProductsAndPlansPageViewModel productsAndPlans = ServiceLocator.Current.GetInstance <IProductsAndPlansPageViewModel>();
                productsAndPlans.LoadData();
                await(Application.Current.MainPage as MasterDetailPage).Detail.Navigation.PushAsync(new ProductsAndPlansPage());
                break;

            case AppPages.CardsPage:
                await(Application.Current.MainPage as MasterDetailPage).Detail.Navigation.PushAsync(new CardsPage());
                break;

            case AppPages.CardDetailPage:
                await(Application.Current.MainPage as MasterDetailPage).Detail.Navigation.PushAsync(new CardDetailPage());
                break;

            case AppPages.PQRSPage:
                IPQRSPageViewModel pQRSPageViewModel = ServiceLocator.Current.GetInstance <IPQRSPageViewModel>();
                pQRSPageViewModel.LoadData();
                await(Application.Current.MainPage as MasterDetailPage).Detail.Navigation.PushAsync(new PQRSPage());
                break;

            case AppPages.ChangePasswordPage:
                await(Application.Current.MainPage as MasterDetailPage).Detail.Navigation.PushAsync(new ChangePasswordPage());
                break;

            case AppPages.TripCertificatePage:
                await(Application.Current.MainPage as MasterDetailPage).Detail.Navigation.PushAsync(new TripCertificatePage());
                break;

            case AppPages.PdfPage:
                await(Application.Current.MainPage as MasterDetailPage).Detail.Navigation.PushAsync(new PdfPage());
                break;

            case AppPages.CertificatesPage:
                await(Application.Current.MainPage as MasterDetailPage).Detail.Navigation.PushAsync(new CertificatesPage());
                break;

            case AppPages.ChangeEmailPage:
                await(Application.Current.MainPage as MasterDetailPage).Detail.Navigation.PushAsync(new ChangeEmailPage());
                break;

            case AppPages.DisableAccountPage:
                await(Application.Current.MainPage as MasterDetailPage).Detail.Navigation.PushAsync(new DisableAccountPage());
                break;

            case AppPages.EditFamilyPage:
                await(Application.Current.MainPage as MasterDetailPage).Detail.Navigation.PushAsync(new EditFamilyPage());
                break;

            case AppPages.FamilyPage:
                await(Application.Current.MainPage as MasterDetailPage).Detail.Navigation.PushAsync(new FamilyPage());
                IFamilyPageViewModel Family = ServiceLocator.Current.GetInstance <IFamilyPageViewModel>();
                await Family.LoadFamily();

                break;

            case AppPages.PersonalDataPage:
                await(Application.Current.MainPage as MasterDetailPage).Detail.Navigation.PushAsync(new PersonalDataPage());
                IPersonalDataPageViewModel personalDataPage = ServiceLocator.Current.GetInstance <IPersonalDataPageViewModel>();
                await personalDataPage.LoadPersonalData();

                break;

            case AppPages.SearchFamilyPage:
                await(Application.Current.MainPage as MasterDetailPage).Detail.Navigation.PushAsync(new SearchFamilyPage());
                ISearchFamilyPageViewModel search = ServiceLocator.Current.GetInstance <ISearchFamilyPageViewModel>();
                await search.LoadDocuments();

                break;

            case AppPages.NewPQRSPage:
                await(Application.Current.MainPage as MasterDetailPage).Detail.Navigation.PushAsync(new NewPQRSPage());
                break;

            case AppPages.SearchInvoicesPage:
                await(Application.Current.MainPage as MasterDetailPage).Detail.Navigation.PushAsync(new SearchInvoicesPage());
                IInvoicesPageViewModel invoicesPageViewModel = ServiceLocator.Current.GetInstance <IInvoicesPageViewModel>();
                await invoicesPageViewModel.LoadData();

                break;

            case AppPages.InvoicesPage:
                await(Application.Current.MainPage as MasterDetailPage).Detail.Navigation.PushAsync(new InvoicesPage());
                break;

            case AppPages.InvoiceDetailPage:
                await(Application.Current.MainPage as MasterDetailPage).Detail.Navigation.PushAsync(new InvoiceDetailPage());
                IInvoiceDetailPageViewModel invoiceDetail = ServiceLocator.Current.GetInstance <IInvoiceDetailPageViewModel>();
                await invoiceDetail.GetInvoiceDetail();

                break;
                #endregion

            case AppPages.LandingPage:
                (Application.Current.MainPage as MasterDetailPage).Detail = new MainPage((Page)Activator.CreateInstance(typeof(LandingPage)));
                break;

                #region LoginPage
            case AppPages.LoginPage:
                INotificationService notificationsService = ServiceLocator.Current.GetInstance <INotificationService>();
                ILoginPageViewModel  loginPageViewModel   = ServiceLocator.Current.GetInstance <ILoginPageViewModel>();
                ILoginViewModel      loginViewModel       = ServiceLocator.Current.GetInstance <ILoginViewModel>();
                INotificationService notificationService  = ServiceLocator.Current.GetInstance <INotificationService>();
                IFileService         fileService          = ServiceLocator.Current.GetInstance <IFileService>();

                loginViewModel.User         = null;
                loginPageViewModel.Email    = string.Empty;
                loginPageViewModel.Password = string.Empty;
                notificationsService.UnregisterNotifications();

                await fileService.SaveAsync(string.Format("{0} User", AppConfigurations.Brand), loginViewModel.User);

                Application.Current.MainPage = new LoginPage();

                break;
                #endregion

                #region RegisterPage
            case AppPages.DataManagementPolicyPage:
                ILegalContentPageViewModel legalContentPP = ServiceLocator.Current.GetInstance <ILegalContentPageViewModel>();
                await legalContentPP.LoadContentLegal(AppConfigurations.TagPPC);

                if (IsMainPage)
                {
                    await(Application.Current.MainPage as MasterDetailPage).Detail.Navigation.PushAsync(new LegalContentPage());
                }
                else
                {
                    await Application.Current.MainPage.Navigation.PushAsync(new LegalContentPage());
                }
                break;

            case AppPages.RegisterDataPersonalPage:
                await Application.Current.MainPage.Navigation.PushAsync(new RegisterDataPersonalPage());

                break;

            case AppPages.RegisterDocumentPage:

                IRegisterPageViewModel Register = ServiceLocator.Current.GetInstance <IRegisterPageViewModel>();
                Register.Clean();
                await Register.LoadPage();

                await Register.LoadDocuments();

                if (Register != null && Register.Documents != null && Register.Documents.Count > 0)
                {
                    Application.Current.MainPage = new LoginNavigationPage(new RegisterDocumentPage());
                }
                break;

            case AppPages.RegisterNamePage:
                await Application.Current.MainPage.Navigation.PushAsync(new RegisterNamePage());

                break;

            case AppPages.RegisterPasswordPage:
                await Application.Current.MainPage.Navigation.PushAsync(new RegisterPasswordPage());

                break;

            case AppPages.RegisterUpdateCellPhonePage:
                await Application.Current.MainPage.Navigation.PushAsync(new RegisterUpdateCellPhonePage());

                break;

            case AppPages.RegisterVerificationCodePage:
                await Application.Current.MainPage.Navigation.PushAsync(new RegisterVerificationCodePage());

                break;

            case AppPages.TermsAndConditionsPage:
                ILegalContentPageViewModel legalContentTYC = ServiceLocator.Current.GetInstance <ILegalContentPageViewModel>();
                await legalContentTYC.LoadContentLegal(AppConfigurations.TagTYCC);

                if (IsMainPage)
                {
                    await(Application.Current.MainPage as MasterDetailPage).Detail.Navigation.PushAsync(new LegalContentPage());
                }
                else
                {
                    await Application.Current.MainPage.Navigation.PushAsync(new LegalContentPage());
                }
                break;
                #endregion

                #region RememberPasswordPage
            case AppPages.RememberPasswordPage:
                await Application.Current.MainPage.Navigation.PushAsync(new RememberPasswordPage());

                break;
                #endregion

                #region MenuPage
            case AppPages.MenuPage:
                Application.Current.MainPage = new MenuPage();
                break;
                #endregion

                #region MedicalCenterCoordinationPage
            case AppPages.MedicalCenterCoordinationPage:
                await(Application.Current.MainPage as MasterDetailPage).Detail.Navigation.PushAsync(new MedicalCenterCoordinationPage());
                medicalCenterCoordinationPageViewModel = ServiceLocator.Current.GetInstance <IMedicalCenterCoordinationPageViewModel>();
                await medicalCenterCoordinationPageViewModel.LoadCoordinations();

                break;

            case AppPages.MedicalCenterCoordinationDetailPage:
                medicalCenterCoordinationPageViewModel = ServiceLocator.Current.GetInstance <IMedicalCenterCoordinationPageViewModel>();
                await(Application.Current.MainPage as MasterDetailPage).Detail.Navigation.PushAsync(new MedicalCenterCoordinationDetailPage());
                await Task.Delay(1000);

                medicalCenterCoordinationPageViewModel.IsReady = true;
                await Task.Delay(1000);

                break;

            case AppPages.NewMedicalCenterCoordinationPage:
                newMedicalCenterCoordinationPageViewModel = ServiceLocator.Current.GetInstance <INewMedicalCenterCoordinationPageViewModel>();
                newMedicalCenterCoordinationPageViewModel.ClearData();
                await(Application.Current.MainPage as MasterDetailPage).Detail.Navigation.PushAsync(new NewMedicalCenterCoordinationPage());
                await newMedicalCenterCoordinationPageViewModel.LoadData();

                await newMedicalCenterCoordinationPageViewModel.LoadPersons();

                break;

            case AppPages.SchedulesMedicalCenterCoordinationPage:
                await(Application.Current.MainPage as MasterDetailPage).Detail.Navigation.PushAsync(new SchedulesMedicalCenterCoordinationPage());
                break;

            case AppPages.CoordinationPaymentMethodPage:
                await(Application.Current.MainPage as MasterDetailPage).Detail.Navigation.PushAsync(new CoordinationPaymentMethodPage());
                break;
                #endregion

                #region NearbyClinicsPage
            case AppPages.NearbyClinicsPage:
                nearbyClinics = ServiceLocator.Current.GetInstance <INearbyClinicsPageViewModel>();
                await nearbyClinics.LoadClinincs();

                await(Application.Current.MainPage as MasterDetailPage).Detail.Navigation.PushAsync(new NearbyClinicsPage());
                await Task.Delay(1000);

                nearbyClinics.IsReady = true;
                await Task.Delay(1000);

                break;

            case AppPages.NearbyClinicDetailPage:
                nearbyClinics = ServiceLocator.Current.GetInstance <INearbyClinicsPageViewModel>();
                await(Application.Current.MainPage as MasterDetailPage).Detail.Navigation.PushAsync(new NearbyClinicDetailPage());
                await Task.Delay(1000);

                nearbyClinics.IsReady = true;
                await Task.Delay(1000);

                break;
                #endregion

            case AppPages.FaqsPage:
                await(Application.Current.MainPage as MasterDetailPage).Detail.Navigation.PushAsync(new FaqsPage());
                IFaqsPageViewModel faqsPageViewModel = ServiceLocator.Current.GetInstance <IFaqsPageViewModel>();
                await faqsPageViewModel.LoadFaqs();

                break;

            case AppPages.FaqsDetailPage:
                await(Application.Current.MainPage as MasterDetailPage).Detail.Navigation.PushAsync(new FaqsDetailPage());
                break;

            case AppPages.SearchServicesHistoryPage:
                await(Application.Current.MainPage as MasterDetailPage).Detail.Navigation.PushAsync(new SearchServicesHistoryPage());
                IServicesHistoryPageViewModel servicesHistoryPageViewModel = ServiceLocator.Current.GetInstance <IServicesHistoryPageViewModel>();
                await servicesHistoryPageViewModel.LoadData();

                break;

            case AppPages.ServicesHistoryPage:
                await(Application.Current.MainPage as MasterDetailPage).Detail.Navigation.PushAsync(new ServicesHistoryPage());
                break;

            case AppPages.ChatCustomerServicePage:
                IChatCustomerServicePageViewModel chatCustomerServicePageViewModel = ServiceLocator.Current.GetInstance <IChatCustomerServicePageViewModel>();
                await chatCustomerServicePageViewModel.LoadChatPage();

                await(Application.Current.MainPage as MasterDetailPage).Detail.Navigation.PushAsync(new ChatCustomerServicePage());
                break;

            case AppPages.ScheduledServicesPage:
                await(Application.Current.MainPage as MasterDetailPage).Detail.Navigation.PushAsync(new ScheduledServicesPage());
                IScheduledServicesPageViewModel scheduledServicesPageViewModel = ServiceLocator.Current.GetInstance <IScheduledServicesPageViewModel>();
                scheduledServicesPageViewModel.LoadScheduledServices();
                break;

            case AppPages.QualifyServicesPage:
                await(Application.Current.MainPage as MasterDetailPage).Detail.Navigation.PushAsync(new QualifyServicesPage());
                IQualifyServicesPageViewModel calificateServicesPageViewModel = ServiceLocator.Current.GetInstance <IQualifyServicesPageViewModel>();
                await calificateServicesPageViewModel.LoadCalificate(code);

                break;

            case AppPages.NotificationsCenterPage:
                await(Application.Current.MainPage as MasterDetailPage).Detail.Navigation.PushAsync(new NotificationsCenterPage());
                break;

            case AppPages.ServicesPage:
                newMedicalCenterCoordinationPageViewModel = ServiceLocator.Current.GetInstance <INewMedicalCenterCoordinationPageViewModel>();
                newMedicalCenterCoordinationPageViewModel.PersonSelected = null;
                await(Application.Current.MainPage as MasterDetailPage).Detail.Navigation.PushAsync(new ServicesPage());
                break;

            case AppPages.HomeMedicalCarePage:
                await(Application.Current.MainPage as MasterDetailPage).Detail.Navigation.PushAsync(new HomeMedicalCarePage());
                break;

            case AppPages.AddNewAddressPage:
                await(Application.Current.MainPage as MasterDetailPage).Detail.Navigation.PushAsync(new AddNewAddressPage());
                break;

            case AppPages.AditionalDataPage:
                await(Application.Current.MainPage as MasterDetailPage).Detail.Navigation.PushAsync(new AditionalDataPage());
                break;

            case AppPages.SubMenuPage:
                await(Application.Current.MainPage as MasterDetailPage).Detail.Navigation.PushAsync(new SubMenuPage());
                break;

            case AppPages.AdvanceLocationPage:
                await(Application.Current.MainPage as MasterDetailPage).Detail.Navigation.PushAsync(new AdvanceLocationPage());
                break;

            case AppPages.HomeMedicalVideoCall:
                await(Application.Current.MainPage as MasterDetailPage).Detail.Navigation.PushAsync(new HomeMedicalVideoCallPage());
                break;

            case AppPages.Precall:
                await(Application.Current.MainPage as MasterDetailPage).Detail.Navigation.PushAsync(new PreCallPage());
                break;

            case AppPages.Queuing:
                await(Application.Current.MainPage as MasterDetailPage).Detail.Navigation.PushAsync(new QueuingPage());
                break;

            case AppPages.EvaluateVideoCallPage:
                await(Application.Current.MainPage as MasterDetailPage).Detail.Navigation.PushAsync(new EvaluateVideoCallPage());
                break;

            case AppPages.SurveyQueuingPage:
                await(Application.Current.MainPage as MasterDetailPage).Detail.Navigation.PushAsync(new SurveyQueuingPage());
                break;

            case AppPages.ExpiredMedicalServices:
                await(Application.Current.MainPage as MasterDetailPage).Detail.Navigation.PushAsync(new ExpiredMedicalServicesPage());
                break;

            case AppPages.PediatricPage:
                await(Application.Current.MainPage as MasterDetailPage).Detail.Navigation.PushAsync(new PediatricPage());
                break;

            case AppPages.RegisterMinorPage:
                await(Application.Current.MainPage as MasterDetailPage).Detail.Navigation.PushAsync(new RegisterMinorPage());
                break;

            case AppPages.SchedulePediatricPage:
                await(Application.Current.MainPage as MasterDetailPage).Detail.Navigation.PushAsync(new SchedulePediatricPage());
                break;

            case AppPages.ContingencyMessagePage:
                await PopupNavigation.Instance.PushAsync(new ContingencyMessagePage());

                break;
            }
        }
        private async void Select()
        {
            INavigationService navigationService = ServiceLocator.Current.GetInstance <INavigationService>();

            switch (Page)
            {
            case AppPages.ProductsAndPlans:
                await navigationService.Navigate(AppPages.ProductsAndPlans);

                break;

            case AppPages.BeneficiariesPage:
                IBeneficiariesPageViewModel beneficiariesPageViewModel = ServiceLocator.Current.GetInstance <IBeneficiariesPageViewModel>();
                beneficiariesPageViewModel.TitlePage = Title;
                await navigationService.Navigate(AppPages.BeneficiariesPage);

                break;

            case AppPages.CardsPage:
                ICardsPageViewModel cardsPageViewModel = ServiceLocator.Current.GetInstance <ICardsPageViewModel>();
                await cardsPageViewModel.LoadData();

                break;

            case AppPages.ChangePasswordPage:
                IChangePasswordPageViewModel changePasswordPageViewModel = ServiceLocator.Current.GetInstance <IChangePasswordPageViewModel>();
                changePasswordPageViewModel.TitlePage = Title;
                await navigationService.Navigate(AppPages.ChangePasswordPage);

                break;

            case AppPages.ChangeEmailPage:
                IChangeEmailPageViewModel changeEmailPageViewModel = ServiceLocator.Current.GetInstance <IChangeEmailPageViewModel>();
                changeEmailPageViewModel.TitlePage = Title;
                await navigationService.Navigate(AppPages.ChangeEmailPage);

                break;

            case AppPages.CertificatesPage:
                ICertificatesPageViewModel certificatesPageViewModel = ServiceLocator.Current.GetInstance <ICertificatesPageViewModel>();
                certificatesPageViewModel.TitlePage = Title;
                await certificatesPageViewModel.LoadData();

                break;

            case AppPages.DisableAccountPage:
                IDisableAccountPageViewModel disableAccountPageView = ServiceLocator.Current.GetInstance <IDisableAccountPageViewModel>();
                disableAccountPageView.TitlePage = Title;
                await disableAccountPageView.LoadTypes();

                await navigationService.Navigate(AppPages.DisableAccountPage);

                break;

            case AppPages.PQRSPage:
                IPQRSPageViewModel pQRSPageViewModel = ServiceLocator.Current.GetInstance <IPQRSPageViewModel>();
                pQRSPageViewModel.TitlePage = Title;
                await navigationService.Navigate(AppPages.PQRSPage);

                break;

            case AppPages.DataManagementPolicyPage:
                ChangeIconLegalContent();
                await navigationService.Navigate(AppPages.DataManagementPolicyPage, true);

                break;

            case AppPages.FaqsPage:
                IFaqsPageViewModel faqsPageViewModel = ServiceLocator.Current.GetInstance <IFaqsPageViewModel>();
                faqsPageViewModel.TitlePage = Title;
                await navigationService.Navigate(AppPages.FaqsPage);

                break;

            case AppPages.FamilyPage:
                IFamilyPageViewModel familyPageViewModel = ServiceLocator.Current.GetInstance <IFamilyPageViewModel>();
                familyPageViewModel.TitlePage = Title;
                await navigationService.Navigate(AppPages.FamilyPage);

                break;

            case AppPages.LandingPage:
                await navigationService.Navigate(AppPages.LandingPage);

                break;

            case AppPages.LoginPage:
                INotificationService notificationsService = ServiceLocator.Current.GetInstance <INotificationService>();
                ILoginPageViewModel  loginPageViewModel   = ServiceLocator.Current.GetInstance <ILoginPageViewModel>();
                ILoginViewModel      loginViewModel       = ServiceLocator.Current.GetInstance <ILoginViewModel>();
                INotificationService notificationService  = ServiceLocator.Current.GetInstance <INotificationService>();
                IFileService         fileService          = ServiceLocator.Current.GetInstance <IFileService>();

                loginViewModel.User         = null;
                loginPageViewModel.Email    = string.Empty;
                loginPageViewModel.Password = string.Empty;
                notificationsService.UnregisterNotifications();
                notificationService.RegisterNotifications();
                await fileService.SaveAsync(string.Format("{0} User", AppConfigurations.Brand), loginViewModel.User);

                await navigationService.Navigate(AppPages.LoginPage);

                break;

            case AppPages.MedicalCenterCoordinationPage:
                IMedicalCenterCoordinationPageViewModel medicalCenterCoordinationPageViewModel = ServiceLocator.Current.GetInstance <IMedicalCenterCoordinationPageViewModel>();
                medicalCenterCoordinationPageViewModel.TitlePage = Title;
                await navigationService.Navigate(AppPages.MedicalCenterCoordinationPage);

                break;

            case AppPages.NearbyClinicsPage:
                INearbyClinicsPageViewModel nearbyClinics = ServiceLocator.Current.GetInstance <INearbyClinicsPageViewModel>();
                nearbyClinics.CurrentLocation = null;
                nearbyClinics.TitlePage       = Title;
                IMedicalCenterCoordinationPageViewModel medicalCenter = ServiceLocator.Current.GetInstance <IMedicalCenterCoordinationPageViewModel>();
                medicalCenter.IsVisibleCoordination = true;
                await navigationService.Navigate(AppPages.NearbyClinicsPage);

                break;

            case AppPages.PersonalDataPage:
                IPersonalDataPageViewModel personalDataPageViewModel = ServiceLocator.Current.GetInstance <IPersonalDataPageViewModel>();
                personalDataPageViewModel.TitlePage = Title;
                await navigationService.Navigate(AppPages.PersonalDataPage);

                break;

            case AppPages.SearchServicesHistoryPage:
                IServicesHistoryPageViewModel servicesHistoryPageViewModel = ServiceLocator.Current.GetInstance <IServicesHistoryPageViewModel>();
                servicesHistoryPageViewModel.TitlePage = Title;
                await navigationService.Navigate(AppPages.SearchServicesHistoryPage);

                break;

            case AppPages.TermsAndConditionsPage:
                ChangeIconLegalContent();
                await navigationService.Navigate(AppPages.TermsAndConditionsPage, true);

                break;

            case AppPages.ChatCustomerServicePage:
                await navigationService.Navigate(AppPages.ChatCustomerServicePage);

                break;

            case AppPages.ScheduledServicesPage:
                IScheduledServicesPageViewModel scheduledServicesPageViewModel = ServiceLocator.Current.GetInstance <IScheduledServicesPageViewModel>();
                scheduledServicesPageViewModel.TitlePage = Title;
                await navigationService.Navigate(AppPages.ScheduledServicesPage);

                break;

            case AppPages.QualifyServicesPage:
                IQualifyServicesPageViewModel calificateServicesPageViewModel = ServiceLocator.Current.GetInstance <IQualifyServicesPageViewModel>();
                calificateServicesPageViewModel.TitlePage = Title;
                await navigationService.Navigate(AppPages.QualifyServicesPage);

                break;

            case AppPages.ServicesPage:
                IServicesPageViewModel servicesPageViewModel = ServiceLocator.Current.GetInstance <IServicesPageViewModel>();
                servicesPageViewModel.TitlePage = Title;
                await servicesPageViewModel.LoadPersons();

                break;

            case AppPages.SearchInvoicesPage:
                IInvoicesPageViewModel invoicesPageViewModel = ServiceLocator.Current.GetInstance <IInvoicesPageViewModel>();
                invoicesPageViewModel.TitlePage = Title;
                await navigationService.Navigate(AppPages.SearchInvoicesPage);

                break;

            case AppPages.ExpiredMedicalServices:
                IExpiredMedicalServicesPageViewModel expiredMedicalServices = ServiceLocator.Current.GetInstance <IExpiredMedicalServicesPageViewModel>();
                expiredMedicalServices.TitlePage = Title;
                expiredMedicalServices.LoadData();
                break;

            case AppPages.RegisterMinorPage:
                var registerMinor = ServiceLocator.Current.GetInstance <IRegisterMinorPageViewModel>();
                registerMinor.TitlePage = Title;
                registerMinor.LoadData();
                break;
            }
        }