示例#1
0
        private void btnImprimer_Click_1(object sender, EventArgs e)
        {
            List <ListeEtudiantImprimer> items = new List <ListeEtudiantImprimer>();

            // Ecole ecole = ecoleBLO.GetEcole();
            for (int i = 0; i < dataGridView1.Rows.Count; i++)
            {
                Etudiant p = dataGridView1.Rows[i].DataBoundItem as Etudiant;
                items.Add
                (
                    new ListeEtudiantImprimer
                    (
                        p.Photo,
                        p.Matricule,
                        p.Nom,
                        p.PreNom,
                        DateTime.Parse(p.DateNais),
                        p.LieuNais,
                        p.Contact
                        //  ecole?.EmailEcole
                    )
                );
            }
            Form f = new FrmPreview("EtudiantListe.rdlc", items);

            f.Show();
        }
示例#2
0
        private void btnPrint_Click(object sender, EventArgs e)
        {
            List <EtudiantCartePrint> items = new List <EtudiantCartePrint>();
            Student student = studentBLO.GetStudent();

            for (int i = 0; i < dataGridView1.Rows.Count; i++)
            {
                Student s = dataGridView1.Rows[i].DataBoundItem as Student;
                items.Add
                (
                    new EtudiantCartePrint
                    (
                        s.Firstname,
                        s.Lastname,
                        s.University,
                        s.Born,
                        s.LocationStudent,
                        s.Contact,
                        !string.IsNullOrEmpty(student?.Logo) ? File.ReadAllBytes(student?.Logo) : null
                    )
                );
            }
            Form f = new FrmPreview("EtudiantCartePrint.rdlc", items);

            f.Show();
        }
示例#3
0
        private void btnPrint_Click_1(object sender, EventArgs e)
        {
            List <EtudiantPrint> items = new List <EtudiantPrint>();

            for (int i = 0; i < dataGridView1.Rows.Count; i++)
            {
                Etudiant s = dataGridView1.Rows[i].DataBoundItem as Etudiant;
                items.Add
                (
                    new EtudiantPrint
                    (
                        s.Matricule,
                        s.Nom,
                        s.Prenom,
                        DateTime.Parse(s.DateNaissance),
                        s.Photo
                    )
                );
            }
            FrmPreview form = new FrmPreview("EtudiantCart.rdlc", items);

            form.Show();
        }
示例#4
0
        private void btnPrint_Click(object sender, EventArgs e)
        {
            List <EtudiantListPrint> items = new List <EtudiantListPrint>();

            for (int i = 0; i < dataGridView1.Rows.Count; i++)
            {
                Etudiant et   = dataGridView1.Rows[i].DataBoundItem as Etudiant;
                byte[]   logo = null;
                //if (!string.IsNullOrEmpty(p.Logo))
                //{
                //    logo = File.ReadAllBytes
                //    (
                //        Path.Combine
                //        (
                //            ConfigurationManager.AppSettings["DbFolder"],
                //            "logo",
                //            p.Logo
                //        )
                //    );
                //}
                items.Add
                (
                    new EtudiantListPrint
                    (
                        et.Matricule,
                        et.Nom,
                        et.Prenom,
                        DateTime.Parse(et.DateNaissance),
                        et.Photo
                    )
                );
            }
            Form f = new FrmPreview("Report1.rdlc", items);

            f.Show();
        }
示例#5
0
        private void btnPrint_Click_1(object sender, EventArgs e)
        {
            List <StudentListPrint> items = new List <StudentListPrint>();

            for (int i = 0; i < dataGridView1.Rows.Count; i++)
            {
                Etudiant E    = dataGridView1.Rows[i].DataBoundItem as Etudiant;
                byte[]   Logo = null;
                items.Add
                (
                    new StudentListPrint
                    (
                        E.BornOn,
                        E.Identified,
                        E.LastName,
                        E.FirstName,
                        E.Picture
                    )
                );
            }
            Form f = new FrmPreview("StudentListRpt.rdlc", items);

            f.Show();
        }
示例#6
0
 private void printToolStripMenuItem_Click(object sender, EventArgs e)
 {
     FrmPreview form = new FrmPreview();
     form.MdiParent = this;
     form.Show();
 }