Exemplo n.º 1
0
        public ScheduledServicesPageViewModel(IApiService apiService, IDialogService dialogService,
                                              ILoginViewModel loginViewModel,
                                              ICurrentServiceViewViewModel currentServiceViewViewModel)

        {
            this.apiService     = apiService;
            this.dialogService  = dialogService;
            this.loginViewModel = loginViewModel;
            this.currentServiceViewViewModel = currentServiceViewViewModel;

            IsRefreshing = false;

            ScheduledServices = new ObservableCollection <ServiceHistoryViewModel>();
        }
Exemplo n.º 2
0
        public LandingPageViewModel(INavigationService navigationService, IDialogService dialogService, IPhoneService phoneService, IApiService apiService, ICurrentServiceViewViewModel currentServiceViewViewModel)
        {
            this.navigationService           = navigationService;
            this.dialogService               = dialogService;
            this.phoneService                = phoneService;
            this.apiService                  = apiService;
            this.currentServiceViewViewModel = currentServiceViewViewModel;

            loginViewModel = ServiceLocator.Current.GetInstance <ILoginViewModel>();

            UserName = loginViewModel.User.NameOne;

            Items = new ObservableCollection <string>();
            Items.Add(string.Empty);
        }
 private async Task ValidateCurrentService(AppPages page)
 {
     if ((page < AppPages.RegisterDataPersonalPage || page > AppPages.RegisterVerificationCodePage) &&
         page != AppPages.LoginPage &&
         page != AppPages.TermsAndConditionsPage &&
         page != AppPages.PediatricPage &&
         page != AppPages.SchedulePediatricPage &&
         page != AppPages.ScheduledServicesPage &&
         page != AppPages.DataManagementPolicyPage &&
         page != AppPages.RegisterMinorPage)
     {
         Device.BeginInvokeOnMainThread(async() =>
         {
             currentService = ServiceLocator.Current.GetInstance <ICurrentServiceViewViewModel>();
             await currentService.GetMedicalHomeService();
         });
     }
 }