private void btnDonHangDaTinhDinhMuc_Click(object sender, EventArgs e)
        {
            DataTable dt      = new DataTable();
            ketnoi    Connect = new ketnoi();

            dt = Connect.laybang("select * from PHIEUSANXUAT where madh like N'" + txtMaDonHang.Text + "'");
            XRPhieuSX_DaDuyet rpPHIEUSANXUAT_Duyet = new XRPhieuSX_DaDuyet();

            rpPHIEUSANXUAT_Duyet.DataSource = dt;
            rpPHIEUSANXUAT_Duyet.DataMember = "Table";
            rpPHIEUSANXUAT_Duyet.CreateDocument(false);
            rpPHIEUSANXUAT_Duyet.PrintingSystem.ExportOptions.PrintPreview.DefaultFileName = txtMaDonHang.Text;
            PrintTool tool = new PrintTool(rpPHIEUSANXUAT_Duyet.PrintingSystem);

            rpPHIEUSANXUAT_Duyet.ShowPreviewDialog();
            Connect.dongketnoi();
        }
        private void btnDinhMucVatTu_Click(object sender, EventArgs e)
        {
            DataTable dt = new DataTable();
            ketnoi    kn = new ketnoi();

            dt = kn.laybang("select * from PHIEUSANXUAT where madh like N'" + cbMaDH.Text + "'");
            XRPhieuSX_DaDuyet xrPSX_VatTu = new XRPhieuSX_DaDuyet();

            xrPSX_VatTu.DataSource = dt;
            xrPSX_VatTu.DataMember = "Table";
            xrPSX_VatTu.CreateDocument(false);
            xrPSX_VatTu.PrintingSystem.ExportOptions.PrintPreview.DefaultFileName = cbMaDH.Text;
            PrintTool tool = new PrintTool(xrPSX_VatTu.PrintingSystem);

            tool.ShowPreviewDialog();
            kn.dongketnoi();
        }