コード例 #1
0
ファイル: MatiereDisp.cs プロジェクト: GridIland/GesColleges
        public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
        {
            MatiereDisp rpt = new MatiereDisp();

            rpt.Site = this.Site;
            return(rpt);
        }
コード例 #2
0
ファイル: MissMat.xaml.cs プロジェクト: GridIland/GesColleges
        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            var col = db.Etudiants.Join(db.Colleges,
                                        Etudiant => Etudiant.IdCollege,
                                        College => College.IdCollege,
                                        (Etudiant, College) => new
            {
                IdCollege   = Etudiant.IdCollege,
                IdEtudiant  = Etudiant.IdEtudiant,
                Nom         = Etudiant.Nom,
                Prenom      = Etudiant.Prenom,
                nomCo       = College.nomCo,
                AdresseSite = College.AdresseSite
            }).Where(c => c.IdEtudiant == Id).Single();
            var idmat = db.Notes.Join(db.Matieres,
                                      Notes => Notes.IdMatiere,
                                      Matiere => Matiere.IdMatiere,
                                      (Note, Matiere) => new
            {
                IdEtudiant = Note.IdEtudiant,
                IdMatiere  = Matiere.IdMatiere
            }).Where(c => c.IdEtudiant == Id).ToList();
            List <object> verif = new List <object>();

            foreach (int id in idmat.Select(c => c.IdMatiere).ToList())
            {
                verif.Add(db.Matieres.Select(Matiere => new {
                    IdMatiere   = Matiere.IdMatiere,
                    Nom         = col.Nom,
                    Prenom      = col.Prenom,
                    nomCo       = col.nomCo,
                    AdresseSite = col.AdresseSite,
                    libelle     = Matiere.libelle,
                }).Where(c => c.IdMatiere != id).Single());
            }
            var data = db.Matieres.Select(Matiere => new {
                IdMatiere   = Matiere.IdMatiere,
                Nom         = col.Nom,
                Prenom      = col.Prenom,
                nomCo       = col.nomCo,
                AdresseSite = col.AdresseSite,
                libelle     = Matiere.libelle,
            }).Where(c => c.IdMatiere != Id).ToList();
            MatiereDisp a = new MatiereDisp();

            a.SetDataSource(verif);
            Crystalbul.ViewerCore.ReportSource = a;
        }