public frmTK_HoatDong() { hpBUS = new HocPhanBUS(); svBUS = new SinhVienBUS(); ctxhBUS = new CTXHBUS(); dsCTXHBUS = new DSSV_CTXHBUS(); rlBUS = new RenLuyenBUS(); dsRLBUS = new DSSV_RLBUS(); vpBUS = new ViPhamBUS(); ktButton = frmMain.ktButtonClick; InitializeComponent(); kiemTra(); if (frmMain.user.LoaiUser == "SinhVien") { this.txtNhapMSSV.Text = frmMain.user.Ma; this.txtNhapMSSV.Enabled = false; TimThongTin(); } else { this.txtNhapMSSV.AutoCompleteMode = AutoCompleteMode.Suggest; this.txtNhapMSSV.AutoCompleteSource = AutoCompleteSource.CustomSource; var lstMSSV = svBUS.getMSSV(); AutoCompleteStringCollection AutoComp = new AutoCompleteStringCollection(); foreach (var sv in lstMSSV) { AutoComp.Add(sv); } this.txtNhapMSSV.AutoCompleteCustomSource = AutoComp; } }
public frmQL_CTXH_HDRL() { ktButton = frmMain.ktButtonClick; ctxhBUS = new CTXHBUS(); rlBUS = new RenLuyenBUS(); svBUS = new SinhVienBUS(); dsCTXHBUS = new DSSV_CTXHBUS(); dsRLBUS = new DSSV_RLBUS(); InitializeComponent(); kiemTra(); Clear(); this.txtNhapMaSV.AutoCompleteMode = AutoCompleteMode.Suggest; this.txtNhapMaSV.AutoCompleteSource = AutoCompleteSource.CustomSource; var lstMSSV = svBUS.getMSSV(); AutoCompleteStringCollection AutoComp = new AutoCompleteStringCollection(); foreach (var sv in lstMSSV) { AutoComp.Add(sv); } this.txtNhapMaSV.AutoCompleteCustomSource = AutoComp; }
// Report Quan Ly GiangVien / Diem Thi & HocPhan / CTXH / HDRL public frmReport(string ma, int ktra) { InitializeComponent(); // QL CTXH if (ktra == 10) { DSSV_CTXHBUS dsCTXHBUS = new DSSV_CTXHBUS(); ReportDataSource reportDataSource = new ReportDataSource(); reportDataSource.Name = "dsQLCTXH"; reportDataSource.Value = dsCTXHBUS.getSVByMaCTXH(ma); reportViewer1.LocalReport.DataSources.Add(reportDataSource); this.reportViewer1.LocalReport.ReportEmbeddedResource = "GUI.ReportViews.rpQLCTXH.rdlc"; } else { // QL HDRL if (ktra == 11) { DSSV_RLBUS dsHDRL = new DSSV_RLBUS(); ReportDataSource reportDataSource = new ReportDataSource(); reportDataSource.Name = "dsQLHDRL"; reportDataSource.Value = dsHDRL.getSVByMaRL(ma); reportViewer1.LocalReport.DataSources.Add(reportDataSource); this.reportViewer1.LocalReport.ReportEmbeddedResource = "GUI.ReportViews.rpQLHDRL.rdlc"; } else { // QL Giang Vien if (ktra == 12) { GiangVienBUS gvBUS = new GiangVienBUS(); ReportDataSource reportDataSource = new ReportDataSource(); reportDataSource.Name = "dsQLGiangVien"; reportDataSource.Value = gvBUS.getGVTheoMaKhoa(ma); reportViewer1.LocalReport.DataSources.Add(reportDataSource); this.reportViewer1.LocalReport.ReportEmbeddedResource = "GUI.ReportViews.rpQLGiangVien.rdlc"; } else { // QL Diem Thi if (ktra == 13) { SinhVienBUS svBUS = new SinhVienBUS(); ReportDataSource reportDataSource = new ReportDataSource(); reportDataSource.Name = "dsDiemThi"; reportDataSource.Value = svBUS.getSVTheoMaHP(ma); reportViewer1.LocalReport.DataSources.Add(reportDataSource); this.reportViewer1.LocalReport.ReportEmbeddedResource = "GUI.ReportViews.rpQLDiemThi.rdlc"; } // QL Hoc Phan else { SinhVienBUS svBUS = new SinhVienBUS(); ReportDataSource reportDataSource = new ReportDataSource(); reportDataSource.Name = "dsQLHocPhan"; reportDataSource.Value = svBUS.getSVTheoMaHP(ma); reportViewer1.LocalReport.DataSources.Add(reportDataSource); this.reportViewer1.LocalReport.ReportEmbeddedResource = "GUI.ReportViews.rpQLHocPhan.rdlc"; } } } } ReportParameter rp = new ReportParameter("Ma", ma); reportViewer1.LocalReport.SetParameters(rp); }