示例#1
0
        public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
        {
            Report_HD rpt = new Report_HD();

            rpt.Site = this.Site;
            return(rpt);
        }
示例#2
0
        private void btnXem_Click(object sender, EventArgs e)
        {
            int    maod = int.Parse(txtMaOder.Text);;
            string mahd = cthdBO.layMaHD(maod);
            int    i    = 0;

            Int32.TryParse(mahd, out i);

            Report_HD objRpt = new Report_HD();

            objRpt.SetDataSource(rp.report_HD(i).Tables[1]);
            crystalReportViewer_HD.ReportSource = objRpt;
            crystalReportViewer_HD.Refresh();
        }
示例#3
0
        private void btnXem_Click(object sender, EventArgs e)
        {
            int    maod = int.Parse(txtMaOder.Text);;
            string mahd = cthdBO.layMaHD(maod);
            int    i    = 0;

            Int32.TryParse(mahd, out i);
            SqlConnection connect;

            connect = new SqlConnection(@"server=.\SQLEXPRESS; Database=QuanLiCaPhe;integrated security=true");
            connect.Open();
            SqlDataAdapter da    = new SqlDataAdapter();
            string         query = "SELECT MaHD,MaMon,TenMon,SoLuong,DonGia,ThanhTien FROM tblCTHoaDon where MaHD='" + i + "'";
            SqlDataAdapter dscm  = new SqlDataAdapter(query, connect);
            DSHoaDon       ds    = new DSHoaDon();

            dscm.Fill(ds, "tblCTHoaDon");
            connect.Close();
            Report_HD objRpt = new Report_HD();

            objRpt.SetDataSource(ds.Tables[1]);
            crystalReportViewer_HD.ReportSource = objRpt;
            crystalReportViewer_HD.Refresh();
        }