Esempio n. 1
0
        internal static void SetPeople(PartyViewModel context, PeopleContainer result)
        {
            context.People = new ObservableCollection<PersonViewModel>();

            foreach (var item in result.results)
            {
                context.People.Add(new PersonViewModel()
                {
                    Name = string.Format("{0} {1}", item.first_name, item.last_name),
                    Url = item.url,
                    WebUrl = item.web_url,
                    Gender = item.gender,
                    CandidateFor = item.candidate_for,
                    MediumImage = item.images.medium,
                    ListNumber = item.list_number,
                    Party = new PartyViewModel()
                    {
                        Id = item.party.id,
                        Name = item.party.name,
                        Logo = item.party.avatar
                    }
                });
            }
        }
Esempio n. 2
0
 internal static void SetPeople(MainViewModel context, PeopleContainer result)
 {
     //throw new NotImplementedException();
 }