Exemple #1
0
        public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
        {
            crp_hoadon rpt = new crp_hoadon();

            rpt.Site = this.Site;
            return(rpt);
        }
Exemple #2
0
        public frm_inhoadon(String mahd)
        {
            dungchung lib = new dungchung();

            InitializeComponent();
            //KHai bao chuoi sql
            String     sql      = "Select hoadon.mahd,hoadon.maphieu,nhanvien.tennv,ngaylaphd,spdv.tenspdv,chitiethd.soluong,chitiethd.dongia from (hoadon join nhanvien on hoadon.manv=nhanvien.manv) join chitiethd on hoadon.mahd=chitiethd.mahd join spdv on chitiethd.maspdv=spdv.maspdv where hoadon.mahd='" + mahd + "'";
            crp_hoadon Inhoadon = new crp_hoadon();

            if (lib.reDataSet(sql).Tables[0].Rows.Count == 0)
            {
                MessageBox.Show("No data.", "QLBH", MessageBoxButtons.OK, MessageBoxIcon.Information);
                return;
            }
            Inhoadon.SetDataSource(lib.reDataSet(sql).Tables[0].DefaultView);
            crv_inhoadon.ReportSource = Inhoadon;
        }