private void cmdModifier_Click(object sender, EventArgs e) { try { etudiant.Id_personne = ((clspersonne)cboPersonne.SelectedItem).IdPers; etudiant.Id_inscription = ((clsinscription)cboInscription.SelectedItem).Id; etudiant.Matricule = txtMatricule.Text; etudiant.update(etudiant); photo.Id_personne = etudiant.Id_personne; photo.Photo = clsDoTraitement.GetInstance().GetImage(clsDoTraitement.GetInstance().loadParamTemporaire()); if (clsMetier.GetInstance().getClscountphoto(etudiant.Id_personne) > 0) { //Modification photo photo.update(photo); } else { //Insertion photo photo.inserts(); } MessageBox.Show("Modification éffectuée", "Modification", MessageBoxButtons.OK, MessageBoxIcon.Information); } catch (Exception ex) { MessageBox.Show("Echec de la mise à jour" + ex.Message, "Mise à jour", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); } }