private void CheckIfActicationIsPossible()
 {
     IsActivationPossible = !connectionActivationLocked &&
                            !string.IsNullOrWhiteSpace(SelectedIpAddress) &&
                            dataCenter.GetAllUsers().Count(user => !user.IsHidden && user.ListOfAccessableMedicalPractices.Any()) > 0 &&
                            dataCenter.GetAllMedicalPractices().Any();
 }
Ejemplo n.º 2
0
        private void OnSelectedPageStateChanged(MainPage mainPage)
        {
            if (mainPage == MainPage.HoursOfOpening)
            {
                AvailableMedicalPractices.Clear();

                dataCenter.GetAllMedicalPractices()
                .Select(medPractice => new MedPracticeDisplayData(medPractice.Name, medPractice.Id))
                .Do(AvailableMedicalPractices.Add);

                IsAnyPracticeAvailable = AvailableMedicalPractices.Count > 0;
            }
        }
Ejemplo n.º 3
0
        private void OnSelectedPageStateChanged(MainPage mainPage)
        {
            if (mainPage == MainPage.Infrastructure)
            {
                AvailableTherapyPlaceTypes.Clear();

                dataCenter.GetAllTherapyPlaceTypesPlusDummy()
                .Select(placeType => new TherapyPlaceTypeDisplayData(placeType.Name,
                                                                     GetIconForTherapyPlaceType(placeType.IconType),
                                                                     placeType.Id))
                .Do(AvailableTherapyPlaceTypes.Add);

                MedicalPractices.Clear();

                dataCenter.GetAllMedicalPractices()
                .Select(practice => new MedPracticeDisplayData(practice.Name, practice.Id))
                .Do(MedicalPractices.Add);

                SelectedMedicalPractice = null;
            }
        }