public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport() { PhieuChuyenVien rpt = new PhieuChuyenVien(); rpt.Site = this.Site; return rpt; }
private void btnInPhieuCV_Click(object sender, EventArgs e) { expandableSplitter1.Expanded = true; btnInPhieuCV.Visible = false; btnTroLai.Visible = true; PhieuChuyenVien rp = new PhieuChuyenVien(); ParameterValues a = new ParameterValues(); ParameterDiscreteValue b = new ParameterDiscreteValue(); b.Value = txtMaChuyenVien.Text; a.Add(b); rp.DataDefinition.ParameterFields["MaPhieu"].ApplyCurrentValues(a); b.Value = txtHoBenhNhan.Text; a.Add(b); rp.DataDefinition.ParameterFields["HoBenhNhan"].ApplyCurrentValues(a); b.Value = txtTenBenhNhan.Text; a.Add(b); rp.DataDefinition.ParameterFields["TenBenhNhan"].ApplyCurrentValues(a); b.Value = cboGioiTinhBN.Text; a.Add(b); rp.DataDefinition.ParameterFields["GioiTinh"].ApplyCurrentValues(a); b.Value = dtPicker_NgaySinhBN.Text; a.Add(b); rp.DataDefinition.ParameterFields["NgaySinh"].ApplyCurrentValues(a); b.Value = txtDiaChi.Text; a.Add(b); rp.DataDefinition.ParameterFields["DiaChi"].ApplyCurrentValues(a); b.Value = txtLyDoNV.Text; a.Add(b); rp.DataDefinition.ParameterFields["LyDoNhapVien"].ApplyCurrentValues(a); b.Value = dtPicker_NgayChuyenVien.Text; a.Add(b); rp.DataDefinition.ParameterFields["NgayChuyen"].ApplyCurrentValues(a); b.Value = dtTime_GioChuyenVien.Text; a.Add(b); rp.DataDefinition.ParameterFields["GioChuyen"].ApplyCurrentValues(a); b.Value = txtXNDaLam.Text; a.Add(b); rp.DataDefinition.ParameterFields["XetNghiemDaLam"].ApplyCurrentValues(a); b.Value = txtChuanDoan.Text; a.Add(b); rp.DataDefinition.ParameterFields["ChanDoan"].ApplyCurrentValues(a); b.Value = txtThuocDaDung.Text; a.Add(b); rp.DataDefinition.ParameterFields["Thuoc"].ApplyCurrentValues(a); b.Value = txtDauHieuLamSang.Text; a.Add(b); rp.DataDefinition.ParameterFields["DauHieuLamSang"].ApplyCurrentValues(a); b.Value = txtLyDoChuyenVien.Text; a.Add(b); rp.DataDefinition.ParameterFields["LyDoChuyen"].ApplyCurrentValues(a); b.Value = txtTinhTrangKhiCV.Text; a.Add(b); rp.DataDefinition.ParameterFields["TinhTrang"].ApplyCurrentValues(a); b.Value = txtPhuongTienDiChuyen.Text; a.Add(b); rp.DataDefinition.ParameterFields["PhuongTien"].ApplyCurrentValues(a); crystalReportViewer1.ReportSource = rp; }