Пример #1
0
 public static void ModifierSupport(support leSupport, int idSupport, string leTitreSupport, string leRealisateur, string imageSupport, int idGenre)
 {
     using (var context = new connexionBase())
     {
         int noOfRowUpdated = context.Database.ExecuteSqlCommand("UPDATE support set titreSupport=@leTitreSupport, realisateur=@leRealisateur, image=@imageSupport, idGenre=@idGenre WHERE idSupport=@idSupport", new SqlParameter("@idSupport", idSupport), new SqlParameter("@leTitreSupport", leTitreSupport), new SqlParameter("@leRealisateur", leRealisateur), new SqlParameter("@imageSupport", imageSupport), new SqlParameter("@idGenre", idGenre));
     }
 }
Пример #2
0
        private void button1_Click(object sender, EventArgs e)
        {
            support send = new support();

            foreach (support c in lesFilms)
            {
                if (supportBindingSource1.Current == c)
                {
                    send = c;
                }
            }

            ((controleur)(this.Parent)).modifierSupport(send, Convert.ToInt32(idSupport.Value), titreSupport.Text, realisateur.Text, image.Text, lesGenresCombo.SelectedIndex + 1);
        }
Пример #3
0
 public void modifierSupport(support leSupport, int idSupport, string leTitreSupport, string leRealisateur, string imageSupport, int idGenre)
 {
     modele.ModifierSupport(leSupport, idSupport, leTitreSupport, leRealisateur, imageSupport, idGenre);
     MessageBox.Show("Résultat", "La modification a pris effet");
 }