示例#1
0
        private void btn_imrimerTous_Click(object sender, EventArgs e)
        {
            Button btn = (Button)sender;

            switch (btn.Name)
            {
            case "btn_imrimerTous":
                RptContractEmp r = new RptContractEmp();
                r.SetDatabaseLogon("sa", "123456");
                Imprimer imprimer = new Imprimer(r);
                imprimer.ShowDialog();
                break;

            case "btn_imprimer":
                RptContractEmp r1 = new RptContractEmp();
                r1.SetDatabaseLogon("sa", "123456");
                string   filter1   = "{contrat.id_contrat} = " + dt_grid.CurrentRow.Cells[0].Value;
                Imprimer imprimer1 = new Imprimer(r1, filter1);
                imprimer1.ShowDialog();
                break;
            }
        }
示例#2
0
        private void btn_imprimerTous_Click(object sender, EventArgs e)
        {
            Button btn = (Button)sender;

            switch (btn.Name)
            {
            case "btn_imprimerTous":
                RptFactureFournisseur r = new RptFactureFournisseur();
                r.SetDatabaseLogon("sa", "123456");
                Imprimer imprimer = new Imprimer(r);
                imprimer.ShowDialog();
                break;

            case "btn_imprimer":
                RptFactureFournisseur r1 = new RptFactureFournisseur();
                r1.SetDatabaseLogon("sa", "123456");
                string   filter    = "{facture.designation} = '" + dt_facture.CurrentRow.Cells[1].Value + "'";
                Imprimer imprimer1 = new Imprimer(r1, filter);
                imprimer1.ShowDialog();
                break;
            }
        }