예제 #1
0
        public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
        {
            DS_NhanVien rpt = new DS_NhanVien();

            rpt.Site = this.Site;
            return(rpt);
        }
예제 #2
0
        private void frmDS_NhanVien_Load(object sender, EventArgs e)
        {
            con.OpenConn();

            SqlConnection sqlcon = con.Connection;

            SqlDataAdapter adapter = new SqlDataAdapter("DS_NhanVien", sqlcon);
            //adapter.SelectCommand.Parameters.AddWithValue();
            //adapter.SelectCommand.CommandType = CommandType.StoredProcedure;
            DataTable da = new DataTable();

            adapter.Fill(da);
            DS_NhanVien ds = new DS_NhanVien();

            ds.SetDataSource(da);
            crystalReportViewer5.ReportSource = ds;

            con.CloseConn();
        }