private void FenContact_Load(object sender, EventArgs e) { maRequete.RecupererContact(monFlux.token, idContact); String json = maRequete.GetResult(); monContact = JsonConvert.DeserializeObject <FullContact>(json); lbNom.Text = monContact.first_name; lbPrenom.Text = monContact.last_name; lbEmail.Text = monContact.email; lbTelephone.Text = monContact.phone; cbFavoris.Checked = monContact.favorite; }
private void FormContact_Load(object sender, EventArgs e) { if (idContact != 0) { maRequete.RecupererContact(monFlux.token, idContact); String json = maRequete.GetResult(); monContact = JsonConvert.DeserializeObject <FullContact>(json); tbNom.Text = monContact.first_name; tbPrenom.Text = monContact.last_name; tbEmail.Text = monContact.email; tbTelephone.Text = monContact.phone; cbFavoris.Checked = monContact.favorite; btnModifier.Visible = true; } else { btnAjouter.Visible = true; } }