private async void carregaInforcaoesDoOrientador() { using (var client = new HttpClient()) { string url = "http://orientadores-efitfashiontest.rhcloud.com/orientador/" + orientador.Id; var req = new HttpRequestMessage(HttpMethod.Get, url); var resp = await client.SendAsync(req); var data = await resp.Content.ReadAsStringAsync(); this.orientadorDetalhes = JsonConvert.DeserializeObject<OrientadorDetalhes>(data); NomeDoOrientador.Text = orientadorDetalhes.Nome; FotoDoOrientador.Source = new BitmapImage(new Uri("http://orientadores-efitfashiontest.rhcloud.com/foto/" + orientadorDetalhes.Foto)); FormacaoDoOrientador.ItemsSource = orientadorDetalhes.Formacao; PesquisaDoOrientador.ItemsSource = orientadorDetalhes.Pesquisa; } }
private async void carregaInforcaoesDoOrientador() { using (var client = new HttpClient()) { string url = "http://orientadores-efitfashiontest.rhcloud.com/orientador/" + orientador.Id; var req = new HttpRequestMessage(HttpMethod.Get, url); var resp = await client.SendAsync(req); var data = await resp.Content.ReadAsStringAsync(); this.orientadorDetalhes = JsonConvert.DeserializeObject <OrientadorDetalhes>(data); NomeDoOrientador.Text = orientadorDetalhes.Nome; FotoDoOrientador.Source = new BitmapImage(new Uri("http://orientadores-efitfashiontest.rhcloud.com/foto/" + orientadorDetalhes.Foto)); FormacaoDoOrientador.ItemsSource = orientadorDetalhes.Formacao; PesquisaDoOrientador.ItemsSource = orientadorDetalhes.Pesquisa; } }