private void btnInPhieu_Click_1(object sender, EventArgs e) { expandableSplitter1.Expanded = true; btnInPhieu.Visible = false; btnTroLai.Visible = true; PhieuThu rp = new PhieuThu(); ParameterValues a = new ParameterValues(); ParameterDiscreteValue b = new ParameterDiscreteValue(); 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 = dtPicker_NgaySinh.Text; a.Add(b); rp.DataDefinition.ParameterFields["NgaySinh"].ApplyCurrentValues(a); b.Value = txtNgheNghiep.Text; a.Add(b); rp.DataDefinition.ParameterFields["NgheNghiep"].ApplyCurrentValues(a); b.Value = txtDiaChi.Text; a.Add(b); rp.DataDefinition.ParameterFields["DiaChi"].ApplyCurrentValues(a); b.Value = txtTenDichVu.Text; a.Add(b); rp.DataDefinition.ParameterFields["TenDichVu"].ApplyCurrentValues(a); b.Value = txtDonGia.Text; a.Add(b); rp.DataDefinition.ParameterFields["DonGia"].ApplyCurrentValues(a); b.Value = txtMaPhieuThu.Text; a.Add(b); rp.DataDefinition.ParameterFields["MaPhieuThu"].ApplyCurrentValues(a); b.Value = txtHoNhanVien.Text; a.Add(b); rp.DataDefinition.ParameterFields["HoNhanVien"].ApplyCurrentValues(a); b.Value = txtTenNhanVien.Text; a.Add(b); rp.DataDefinition.ParameterFields["TenNhanVien"].ApplyCurrentValues(a); string tongtien = txtDonGia.Text.ToString(); long tien = long.Parse(tongtien); So_chu(tien); b.Value = So_chu(tien).ToString(); a.Add(b); rp.DataDefinition.ParameterFields["TongTien"].ApplyCurrentValues(a); crystalReportViewer1.ReportSource = rp; }
public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport() { PhieuThu rpt = new PhieuThu(); rpt.Site = this.Site; return rpt; }