Exemple #1
0
        private void ImprimerClientCause_Load(object sender, EventArgs e)
        {
            if (cn.State == ConnectionState.Closed)
            {
                cn.Open();
            }


            cmd = new SqlCommand("Select [id_client_cause] as[مرجع],[type_client] as[النوع],[cin] as[ر.ب.و],[nom] as[الاسم],[representant_legal] as[الممثل التجاري],[registre_commerce] as[السجل التجاري],[adresse] as[العنوان] from client_cause where [id_client_cause] like '" + id + "%'", cn);
            da  = new SqlDataAdapter(cmd);
            da.Fill(ds, "client");
            cmd1 = new SqlCommand("select top(1)*from avocat", cn);
            da1  = new SqlDataAdapter(cmd1);
            da1.Fill(ds, "avocat");

            if (type == "معنوي")
            {
                reportClientCause i = new reportClientCause();
                i.SetDataSource(ds);
                crystalReportViewer1.ReportSource = i;
            }
            if (type == "طبيعي")
            {
                reportClientCause1 i = new reportClientCause1();
                i.SetDataSource(ds);
                crystalReportViewer1.ReportSource = i;
            }
            cn.Close();
        }
Exemple #2
0
        public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
        {
            reportClientCause rpt = new reportClientCause();

            rpt.Site = this.Site;
            return(rpt);
        }