Exemplo n.º 1
0
 public static string Delete(reponse__sondage ReponseS)
 {
     db.reponse__sondage.Attach(ReponseS);
     db.reponse__sondage.Remove(ReponseS);
     db.SaveChanges();
     return("La réponse a bien été supprimé");
 }
Exemplo n.º 2
0
 public static string Modify(reponse__sondage ReponseS)
 {
     db.reponse__sondage.Attach(ReponseS);
     db.Entry(ReponseS).State = System.Data.Entity.EntityState.Modified;
     db.SaveChanges();
     return("La reponse d'une question de sondage a été modifié correctement");
 }
Exemplo n.º 3
0
        private void button_ValiderReponse_Click(object sender, RoutedEventArgs e)
        {
            reponse__sondage rs = new reponse__sondage()
            {
                Intitule = textBox_ModifReponse.Text
            };

            listView_Reponse.Items.Add(rs);
            listView_Reponse.Items.Refresh();
        }
Exemplo n.º 4
0
        private void button_AjoutReponse_Click(object sender, RoutedEventArgs e)
        {
            var reponse = new reponse__sondage {
                Intitule = textBox_AjoutReponse.Text
            };

            R.Add(reponse);
            listView_Reponse.ItemsSource = R;
            listView_Reponse.Items.Refresh();
        }
Exemplo n.º 5
0
 public static string Add(reponse__sondage ReponseS)
 {
     db.reponse__sondage.Add(ReponseS);
     db.SaveChanges();
     return("La réponse a bien été ajouté");
 }
Exemplo n.º 6
0
        public static reponse__sondage Select(int id)
        {
            reponse__sondage ReponseS = db.reponse__sondage.Find(id);

            return(ReponseS);
        }