Ejemplo n.º 1
0
        private void btnImprimer_Click(object sender, EventArgs e)
        {
            List <ListEtudiantPrint> items = new List <ListEtudiantPrint>();
            Ecole ecole = ecoleBLO.GetEcole();

            for (int i = 0; i < dataGridView1.Rows.Count; i++)
            {
                Etudiant et = dataGridView1.Rows[i].DataBoundItem as Etudiant;
                items.Add
                (
                    new ListEtudiantPrint
                    (
                        et.Matricule,
                        et.Nom,
                        et.Prenom,
                        et.DateNaissance,
                        et.LieuNaissance,
                        et.CarteEtudiant,
                        et.Email,
                        et.Contact,
                        ecole?.Identifiant,
                        ecole?.Nom,
                        !string.IsNullOrEmpty(ecole?.Logo) ? File.ReadAllBytes(ecole?.Logo) : null
                    )
                );
            }
            Form f = new FormPreview("ProductListRpt.rdlc", items);

            f.Show();
        }
Ejemplo n.º 2
0
        private void btnImprimer_Click(object sender, EventArgs e)
        {
            List <ListEcolePrint> items = new List <ListEcolePrint>();

            for (int i = 0; i < dataGridView1.Rows.Count; i++)
            {
                Ecole ecole = dataGridView1.Rows[i].DataBoundItem as Ecole;
                items.Add
                (
                    new ListEcolePrint
                    (
                        ecole.Nom,
                        ecole.Identifiant,
                        !string.IsNullOrEmpty(ecole.Logo) ? File.ReadAllBytes(ecole.Logo) : null
                    )
                );
            }
            Form f = new FormPreview("ProductListRpt.rdlc", items);

            f.Show();
        }
Ejemplo n.º 3
0
        private void btnPrint_Click(object sender, EventArgs e)
        {
            List <StudentListPrint> items = new List <StudentListPrint>();
            Student studentl = studentBLO.Get();

            for (int i = 0; i < dataGridView1.Rows.Count; i++)
            {
                Student s = dataGridView1.Rows[i].DataBoundItem as Student;
                items.Add
                (
                    new StudentListPrint
                    (
                        s.Matricule,
                        s.Nom,
                        s.Prenom,
                        s.Email,
                        s.Photo
                    )
                );
            }
            Form f = new FormPreview("StudentList.rdlc", items);

            f.Show();
        }
Ejemplo n.º 4
0
        private void printToolStripMenuItem_Click(object sender, EventArgs e)
        {
            FormPreview form = new FormPreview();

            form.Show();
        }