private ObservableCollection <Filiere> CreateFilieres() { ProjetDataContext bd = new ProjetDataContext(); var data = from f in bd.Filiere select f; ObservableCollection <Filiere> filieres = new ObservableCollection <Filiere>(data.ToList()); return(filieres); }
private ObservableCollection <etudiant> CreateEtudiants() { ProjetDataContext bd = new ProjetDataContext(); var data = from f in bd.etudiant select f; List <etudiant> list = data.ToList(); ObservableCollection <etudiant> etudiantList = new ObservableCollection <etudiant>(list); return(etudiantList); }
private ObservableCollection <ClasseEtudiant> CreateEtudiants() { ProjetDataContext bd = new ProjetDataContext(); var data = from etudiant in bd.etudiant join filiere in bd.Filiere on etudiant.id_fil equals filiere.Id_filiere select etudiant; List <etudiant> list = data.ToList(); List <ClasseEtudiant> etudiants = new List <ClasseEtudiant>(); foreach (etudiant e in data) { ClasseEtudiant etu = convertEtudiant(e); etudiants.Add(etu); } ObservableCollection <ClasseEtudiant> etudiantList = new ObservableCollection <ClasseEtudiant>(etudiants); return(etudiantList); }