private void btnInPhieuXV_Click(object sender, EventArgs e) { btnInPhieuXV.Visible = false; btnTroLai.Visible = true; expandableSplitter1.Expanded = true; PhieuXuatVien rp = new PhieuXuatVien(); ParameterValues a = new ParameterValues(); ParameterDiscreteValue b = new ParameterDiscreteValue(); b.Value = txtMaXuatVien.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 = cboXuatVien_MaBenhNhan.Text; a.Add(b); rp.DataDefinition.ParameterFields["MaBenhNhan"].ApplyCurrentValues(a); b.Value = txtDiaChiBN.Text; a.Add(b); rp.DataDefinition.ParameterFields["DiaChi"].ApplyCurrentValues(a); b.Value = txtLyDoNhapVienBN.Text; a.Add(b); rp.DataDefinition.ParameterFields["LyDoNhapVien"].ApplyCurrentValues(a); b.Value = dtPickerNgayVaoVien.Text; a.Add(b); rp.DataDefinition.ParameterFields["NgayNhapVien"].ApplyCurrentValues(a); b.Value = dtPickerNgayRaVien.Text; a.Add(b); rp.DataDefinition.ParameterFields["NgayXuatVien"].ApplyCurrentValues(a); b.Value = txtChuanDoan.Text; a.Add(b); rp.DataDefinition.ParameterFields["ChanDoan"].ApplyCurrentValues(a); b.Value = txtPPDieuTri.Text; a.Add(b); rp.DataDefinition.ParameterFields["PhuongPhapDieuTri"].ApplyCurrentValues(a); b.Value = txtLoiDanBS.Text; a.Add(b); rp.DataDefinition.ParameterFields["LoiDan"].ApplyCurrentValues(a); crystalReportViewer1.ReportSource = rp; }
public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport() { PhieuXuatVien rpt = new PhieuXuatVien(); rpt.Site = this.Site; return rpt; }