Esempio n. 1
0
        public override void Start()
        {
            IdentifierTypes  = _lookupService.GetIdentifierTypes().ToList();
            Practices        = _lookupService.GetPractices().ToList();
            SelectedPractice = _lookupService.GetDefault();
            try
            {
                SelectedIdentifierType = IdentifierTypes.FirstOrDefault();
            }
            catch
            {
            }

            base.Start();
        }
Esempio n. 2
0
 public override void LoadFromStore(VMStore modelStore)
 {
     try
     {
         Enrollment             = JsonConvert.DeserializeObject <ClientEnrollmentDTO>(modelStore.Store);
         ClientId               = Enrollment.ClientId;
         SelectedIdentifierType = IdentifierTypes.FirstOrDefault(x => x.Id == Enrollment.IdentifierTypeId);
         Identifier             = Enrollment.Identifier;
         RegistrationDate       = Enrollment.RegistrationDate;
         Id         = Enrollment.Id;
         practiceId = Enrollment.PracticeId;
     }
     catch (Exception e)
     {
         Mvx.Error(e.Message);
     }
 }
Esempio n. 3
0
        public override void ViewAppeared()
        {
            base.ViewAppeared();

            AutoGenId();

            var indexJson = _settings.GetValue(nameof(IndexClientDTO), "");

            if (!string.IsNullOrWhiteSpace(indexJson))
            {
                IndexClientDTO = JsonConvert.DeserializeObject <IndexClientDTO>(indexJson);
                if (null != IndexClientDTO)
                {
                    Title = $"Enrollment [{IndexClientDTO.RelType}]";
                }
            }

            IdentifierTypes = _lookupService.GetIdentifierTypes().ToList();
            Practices       = _lookupService.GetPractices().ToList();

            if (!practiceId.IsNullOrEmpty())
            {
                if (Practices.Any(x => x.Id == practiceId))
                {
                    SelectedPractice = Practices.First(x => x.Id == practiceId);
                }
                else
                {
                    SelectedPractice = _lookupService.GetDefault();
                }
            }
            else
            {
                SelectedPractice = _lookupService.GetDefault();
            }

            try
            {
                SelectedIdentifierType = IdentifierTypes.FirstOrDefault();
            }
            catch
            {
            }
        }