public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
 {
     PhieuNhapVien rpt = new PhieuNhapVien();
     rpt.Site = this.Site;
     return rpt;
 }
        private void btnNhapVien_InBN_Click(object sender, EventArgs e)
        {
            btnNhapVien_InBN.Visible = false;
            btnTroLai.Visible = true;
            expandableSplitter1.Expanded = true;

            PhieuNhapVien rp = new PhieuNhapVien();
            ParameterValues a = new ParameterValues();
            ParameterDiscreteValue b = new ParameterDiscreteValue();

            b.Value = txtNhapVien_MaBN.Text;
            a.Add(b);
            rp.DataDefinition.ParameterFields["MaBenhNhan"].ApplyCurrentValues(a);

            b.Value = txtNhapVien_HoBN.Text;
            a.Add(b);
            rp.DataDefinition.ParameterFields["HoBenhNhan"].ApplyCurrentValues(a);

            b.Value = dtPickerNhapVien_NgaySinhBN.Text;
            a.Add(b);
            rp.DataDefinition.ParameterFields["NgaySinh"].ApplyCurrentValues(a);

            b.Value = txtNhapVien_TenBN.Text;
            a.Add(b);
            rp.DataDefinition.ParameterFields["TenBenhNhan"].ApplyCurrentValues(a);

            b.Value = txtNhapVien_GioiTinh.Text;
            a.Add(b);
            rp.DataDefinition.ParameterFields["GioiTinh"].ApplyCurrentValues(a);

            b.Value = txtNhapVien_DiaChiBN.Text;
            a.Add(b);
            rp.DataDefinition.ParameterFields["DiaChi"].ApplyCurrentValues(a);

            b.Value = txtNhapVien_NgheNghiep.Text;
            a.Add(b);
            rp.DataDefinition.ParameterFields["NgheNghiep"].ApplyCurrentValues(a);

            b.Value = txtNhapVien_MaBN.Text;
            a.Add(b);
            rp.DataDefinition.ParameterFields["MaBenhNhan"].ApplyCurrentValues(a);

            b.Value = txtNhapVien_MaNhapVien.Text;
            a.Add(b);
            rp.DataDefinition.ParameterFields["MaPhieu"].ApplyCurrentValues(a);

            b.Value = dtPickerNhapVien_NgayNhapVien.Text;
            a.Add(b);
            rp.DataDefinition.ParameterFields["NgayNhapVien"].ApplyCurrentValues(a);

            b.Value = dtPickerNgayXuatVienDuKien.Text;
            a.Add(b);
            rp.DataDefinition.ParameterFields["NgayXuatVien"].ApplyCurrentValues(a);

            b.Value = cboNhapVien_KhoaDieuTri.Text;
            a.Add(b);
            rp.DataDefinition.ParameterFields["MaKhoa"].ApplyCurrentValues(a);

            b.Value = txtNhapVien_TenKhoaDieuTri.Text;
            a.Add(b);
            rp.DataDefinition.ParameterFields["TenKhoa"].ApplyCurrentValues(a);

            b.Value = txtNhapVien_PPDieuTri.Text;
            a.Add(b);
            rp.DataDefinition.ParameterFields["PhuongPhapDieuTri"].ApplyCurrentValues(a);

            b.Value = txtNhapVien_KQChuanDoan.Text;
            a.Add(b);
            rp.DataDefinition.ParameterFields["KetQuaChanDoan"].ApplyCurrentValues(a);

            b.Value = cboNhapVien_PhongBenh.Text;
            a.Add(b);
            rp.DataDefinition.ParameterFields["MaPhongBenh"].ApplyCurrentValues(a);

            b.Value = cboNhapVien_GiuongBenh.Text;
            a.Add(b);
            rp.DataDefinition.ParameterFields["GiuongBenh"].ApplyCurrentValues(a);

            b.Value = txtNhapVien_HoBS.Text;
            a.Add(b);
            rp.DataDefinition.ParameterFields["HoBacSi"].ApplyCurrentValues(a);

            b.Value = txtNhapVien_TenBS.Text;
            a.Add(b);
            rp.DataDefinition.ParameterFields["TenBacSi"].ApplyCurrentValues(a);

            b.Value = txtNhapVien_HoYT.Text;
            a.Add(b);
            rp.DataDefinition.ParameterFields["HoYTa"].ApplyCurrentValues(a);

            b.Value = txtNhapVien_TenYT.Text;
            a.Add(b);
            rp.DataDefinition.ParameterFields["TenYTa"].ApplyCurrentValues(a);

            crystalReportViewer1.ReportSource = rp;
        }