コード例 #1
0
        private void btnXemTatCa_Click(object sender, EventArgs e)
        {
            IList <LopInfo> lop = LopCtrl.LayDsLop();

            IList <ReportParameter> param            = new List <ReportParameter>();
            QuyDinhInfo             m_ThongTinTruong = QuyDinh.LayThongTinTruong();

            param.Add(new ReportParameter("TenTruong", m_ThongTinTruong.TenTruong));
            param.Add(new ReportParameter("DiaChiTruong", m_ThongTinTruong.DiaChiTruong));
            param.Add(new ReportParameter("NgayLap", DateTime.Today.Day + "/" + DateTime.Today.Month + "/" + DateTime.Today.Year));
            param.Add(new ReportParameter("NamHoc", "Tất cả"));
            this.reportViewerDSLop.LocalReport.SetParameters(param);

            this.bSDSLop.DataSource = lop;
            this.reportViewerDSLop.RefreshReport();
        }