예제 #1
0
 public override void LoadFromStore(VMStore modelStore)
 {
     try
     {
         Demographic = JsonConvert.DeserializeObject<ClientDemographicDTO>(modelStore.Store);
         Downloaded = Demographic.Downloaded;
         PersonId = Demographic.PersonId;
         FirstName = Demographic.FirstName;
         MiddleName = Demographic.MiddleName;
         LastName = Demographic.LastName;
         NickName = Demographic.NickName;
         SelectedGender = GenderOptions.FirstOrDefault(x => x.Value == Demographic.Gender);
         Age = Demographic.Age;
         if (!string.IsNullOrWhiteSpace(Demographic.AgeUnit))
             SelectedAgeUnit = AgeUnitOptions.FirstOrDefault(x => x.Value == Demographic.AgeUnit);
         BirthDate = Demographic.BirthDate;
     }
     catch (Exception e)
     {
         Mvx.Error(e.Message);
     }
 }