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 Thong Ke HocPhi, CTXH, ViPham public frmReport(string maSV, string hoTen, string maLop, string tong, int ktra) { InitializeComponent(); if (ktra == 12) { HocPhanBUS hpBUS = new HocPhanBUS(); ReportDataSource reportDataSource = new ReportDataSource(); reportDataSource.Name = "dsNoHocPhi_By_MSSV"; reportDataSource.Value = hpBUS.getHPByMaSV(maSV); reportViewer1.LocalReport.DataSources.Add(reportDataSource); this.reportViewer1.LocalReport.ReportEmbeddedResource = "GUI.ReportViews.rpNoHocPhi_By_MSSV.rdlc"; } else { if (ktra == 7) { CTXHBUS ctxhBUS = new CTXHBUS(); ReportDataSource reportDataSource = new ReportDataSource(); reportDataSource.Name = "dsCTXH_By_MSSV"; reportDataSource.Value = ctxhBUS.getHDCTXHByMaSV(maSV); reportViewer1.LocalReport.DataSources.Add(reportDataSource); this.reportViewer1.LocalReport.ReportEmbeddedResource = "GUI.ReportViews.rpCTXH_By_MSSV.rdlc"; } else { tong = "0"; ViPhamBUS vpBUS = new ViPhamBUS(); ReportDataSource reportDataSource = new ReportDataSource(); reportDataSource.Name = "dsViPham_By_MSSV"; reportDataSource.Value = vpBUS.getVPByMaSV(maSV); reportViewer1.LocalReport.DataSources.Add(reportDataSource); this.reportViewer1.LocalReport.ReportEmbeddedResource = "GUI.ReportViews.rpViPham_By_MSSV.rdlc"; } } ReportParameter[] rp = new ReportParameter[4]; rp[0] = new ReportParameter("MaSV", maSV); rp[1] = new ReportParameter("HoTen", hoTen); rp[2] = new ReportParameter("Tong", tong); rp[3] = new ReportParameter("MaLop", maLop); reportViewer1.LocalReport.SetParameters(rp); }