public int Insert(Classe classe)
        {
            String sql = String.Format("INSERT INTO classe" +
                                       "(libelle,nbre_etudiant)" +
                                       "VALUES('{0}',{1})",
                                       classe.Libelle, classe.NbreEtudiant);

            return(sqlServer.ExecuteUpdate(sql));
        }
Beispiel #2
0
        public int Insert(Personne pers)
        {
            String sql = string.Format("INSERT INTO personne" +
                                       "(nom_Complet ,type, " +
                                       "tuteur,modules, " +
                                       "grade,matricule,classe_id)"
                                       + "VALUES ({0},{1},{2},{3},{4},{5},{6})",
                                       pers.NomComplet, pers.Type,
                                       ((Etudiant)pers).Tuteur,
                                       models.Convert.ListToString(((Professeur)pers).Modules),
                                       ((Professeur)pers).Grade,
                                       ((Professeur)pers).Matricule,
                                       ((Etudiant)pers).Classe.Id

                                       );

            return(sqlServer.ExecuteUpdate(sql));
        }