private void btnInDanhSach_Click(object sender, EventArgs e)
        {
            if (dtDanhSachDuThi == null || dtDanhSachDuThi.Rows.Count <= 0)
            {
                return;
            }
            if (!grcMaSinhVien.Visible)
            {
                ThongBao("Đợt thi này chưa ghép phách, bạn chưa thể in được danh sách !");
                return;
            }

            DataTable dtReport = dtDanhSachDuThi.Copy();

            if (dtReport == null || dtReport.Rows.Count <= 0)
            {
                return;
            }

            dtReport.Columns.Add("TenMonHoc", typeof(string));
            dtReport.Columns.Add("NamHoc", typeof(string));
            foreach (DataRow dr in dtReport.Rows)
            {
                dr["TenMonHoc"] = grvMonThi.GetDataRow(grvMonThi.FocusedRowHandle)["TenMonHoc"].ToString();
                dr["NamHoc"]    = Program.NamHoc;
            }

            dtReport.DefaultView.Sort = "PhongThi, Ten, HoVa";

            frmReport frm = new frmReport(dtReport.DefaultView.ToTable(), "rBangPhach_ThiTotNghiep");

            frm.ShowDialog();
        }
Пример #2
0
 private void btnInBangTongHop_Click(object sender, EventArgs e)
 {
     if (cmbDonVi.EditValue != null)
     {
         DataTable dt = oBGG_GiangDayGiaoVien.GetBangTongHop((int)cmbDonVi.EditValue, cmbDonVi.Text,
                                                             Program.IDNamHoc, Program.NamHoc, Program.HocKy);
         frmReport frm = new frmReport(dt, "rTongHopGioGiang_BangTongHop");
         frm.ShowDialog();
     }
 }
        private void btnIn_Click(object sender, EventArgs e)
        {
            if (grvLoaiThuChi.DataRowCount == 0)
            {
                ThongBaoLoi("Không có dữ liệu để in");
                return;
            }
            DataTable dtMain = null, dtChiTiet = null;

            CreateTableReport(ref dtMain, ref dtChiTiet);
            frmReport frm = new frmReport(dtMain, dtChiTiet, "rBienLaiThuChiMain", "rBienLaiThuChiSub",
                                          new string[] { "Subreport1", "Subreport2", "Subreport3" });

            frm.ShowDialog();
        }
        private void btnInBangDiem_Click(object sender, EventArgs e)
        {
            if (grbSinhVien.View.DataRowCount == 0)
            {
                ThongBaoLoi("Không có dữ liệu để in");
                return;
            }
            int       IDSinhVien = int.Parse(grbSinhVien.View.GetDataRow(grbSinhVien.View.FocusedRowHandle)["SV_SinhVienID"].ToString());
            DataTable dt         = new DataTable();

            dt = oBKQHT_DiemTongKetHocKy.GetDiemTongKet(IDSinhVien, Program.IDNamHoc, Program.HocKy);
            frmReport frm = new frmReport(dt, "rDiemMonTheoKy");

            frm.ShowDialog();
        }
Пример #5
0
        private void btnInBangPhach_Click(object sender, EventArgs e)
        {
            if (dtSinhVien == null || dtSinhVien.Rows.Count <= 0)
            {
                return;
            }
            DataTable dtReport = dtSinhVien.Copy();

            dtReport.Columns.Add("GhiChu", typeof(string));
            dtReport.Columns.Add("TenMonHoc", typeof(string));
            dtReport.Rows[0]["TenLop"]    = txtTenLop.Text;
            dtReport.Rows[0]["TenMonHoc"] = txtTenMon.Text;
            frmReport frm = new frmReport(dtReport, "rBangPhach");

            frm.ShowDialog();
        }
Пример #6
0
        private void btnInDanhSach_Click(object sender, EventArgs e)
        {
            if (dtSinhVien == null || dtSinhVien.Rows.Count <= 0)
            {
                return;
            }
            DataTable dtReport = dtSinhVien.Copy();

            dtSinhVien.Columns.Add("TenLop", typeof(string));
            dtSinhVien.Columns.Add("TenMonHoc", typeof(string));
            dtSinhVien.Rows[0]["TenLop"]    = pDM_LopInfo.TenLop;
            dtSinhVien.Rows[0]["TenMonHoc"] = grvMonHoc.GetDataRow(grvMonHoc.FocusedRowHandle)["TenMonHoc"];
            frmReport frm = new frmReport(dtSinhVien, "rBangPhach");

            frm.ShowDialog();
        }
Пример #7
0
        private void btnInDanhSach_Click(object sender, EventArgs e)
        {
            dlgLopFilter dlg = new dlgLopFilter();

            if (dlg.ShowDialog() == DialogResult.Yes)
            {
                DM_LopInfo pDM_LopFilterInfo = dlg.pDM_LopInfo;
                DataTable  dtMain            = oBTC_DanhSachHocBong.GetInSinhVienByKyTruoc(pDM_LopFilterInfo, Program.IDNamHoc,
                                                                                           Program.HocKy, Program.NamHoc, int.Parse(cmbThang.Text));
                if (dtMain.Rows.Count > 0)
                {
                    dtMain.Columns.Add("Thang", typeof(string));
                    dtMain.Columns.Add("TenNam", typeof(string));
                    dtMain.Columns.Add("HeTrinhDo", typeof(string));
                    dtMain.Columns.Add("TongTienBangChu", typeof(string));
                    dtMain.Rows[0]["Thang"] = cmbThang.Text;
                    if (7 <= int.Parse(cmbThang.Text) && int.Parse(cmbThang.Text) <= 12)
                    {
                        dtMain.Rows[0]["TenNam"] = Program.NamHoc.Substring(0, 4);
                    }
                    else
                    {
                        dtMain.Rows[0]["TenNam"] = Program.NamHoc.Substring(5);
                    }
                    double SoTien           = double.Parse(dtMain.Compute("Sum(SoTienConLai)", "").ToString());
                    Lib.clsStringHelper cls = new Lib.clsStringHelper();
                    dtMain.Rows[dtMain.Rows.Count - 1]["TongTienBangChu"] = cls.ReadMoney(SoTien);

                    dtMain.Rows[0]["HeTrinhDo"] = dlg.HeTrinhDo;
                    frmReport frm = new frmReport(dtMain, dtMain, "rDanhSachHocBong_ChiTiet", "rDanhSachHocBong_BangKe", new string[] { "Subreport1" });
                    frm.ShowDialog();
                }
                else
                {
                    ThongBao("Không có dữ liệu để in báo cáo!");
                }
            }
        }
Пример #8
0
        private void btnInBangPhach_Click(object sender, EventArgs e)
        {
            DataTable dtReport = dtSinhVien.Copy();

            if (dtReport == null || dtReport.Rows.Count <= 0)
            {
                return;
            }

            dtReport.Columns.Add("TenMonHoc", typeof(string));
            dtReport.Columns.Add("NamHoc", typeof(string));
            foreach (DataRow dr in dtReport.Rows)
            {
                dr["TenMonHoc"] = txtTenMon.Text;
                dr["NamHoc"]    = Program.NamHoc;
            }

            dtReport.DefaultView.Sort = "PhongThi, Ten, HoVa";

            frmReport frm = new frmReport(dtReport.DefaultView.ToTable(), "rBangPhach_ThiTotNghiep");

            frm.ShowDialog();
        }