private void btnShowPrintPreview_Click(object sender, EventArgs e)
        {
            PrintTool tool = new PrintTool(link.PrintingSystem);

            link.CreateDocument();
            tool.ShowPreviewDialog();
        }
コード例 #2
0
        public void Imprimir()
        {
            PrintableComponentLink componentLink = new PrintableComponentLink(new PrintingSystem());

            componentLink.Component = gridControl1;
            componentLink.CreateDocument();
            PrintTool pt = new PrintTool(componentLink.PrintingSystemBase);

            pt.ShowPreviewDialog();
        }
コード例 #3
0
        private void barButtonItem2_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            PrintableComponentLink componentLink = new PrintableComponentLink(new PrintingSystem());

            componentLink.Component = chartControl1;
            componentLink.CreateDocument();
            PrintTool pt = new PrintTool(componentLink.PrintingSystemBase);

            pt.ShowPreviewDialog();
        }
        private void simpleButton1_Click(object sender, EventArgs e)
        {
            PrintableComponentLink componentLink = new PrintableComponentLink(new PrintingSystem());

            componentLink.Component = gridControl1;
            componentLink.CreateDocument();
            PrintTool pt = new PrintTool(componentLink.PrintingSystemBase);

            pt.ShowPreviewDialog();
        }
コード例 #5
0
        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();
        }
コード例 #6
0
        private void btnPrintDexuat_VT_Click(object sender, EventArgs e)
        {
            DataTable dt = new DataTable();
            ketnoi    kn = new ketnoi();

            dt = kn.laybang("SELECT DatHangVatTuDauVao_STT.* FROM DatHangVatTuDauVao_STT where MaDN_VATTU like '" + cbMaPhieudexuat.Text + "'");
            XtraReportDeNghiVatTu rpDEXUATVATTU = new XtraReportDeNghiVatTu();

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

            tool.ShowPreviewDialog();
            kn.dongketnoi();
        }
コード例 #7
0
        public void Imprimir()
        {
            PrintableComponentLink componentLink = new PrintableComponentLink(new PrintingSystem());

            componentLink.Component = gridControl1;
            componentLink.CreateDocument();
            PrintTool pt = new PrintTool(componentLink.PrintingSystemBase);

            pt.ShowPreviewDialog();

            //GridControl grid = new GridControl();
            //GridView view = new GridView(gridControl1);
            //gridControl1.MainView = view;
            //gridControl1.DataSource = gridControl1.DataSource;
            //gridControl1.BindingContext = new System.Windows.Forms.BindingContext();
            //gridControl1.ForceInitialize();
            //gridControl1.MainView.ShowPrintPreview();
        }
コード例 #8
0
        private void btnKeHoachSanXuat_Click(object sender, EventArgs e)
        {
            DataTable dt = new DataTable();
            DataSet   ds = new DataSet();
            ketnoi    kn = new ketnoi();

            dt = kn.laybang(@"select * from vw_KeHoachNgayCongDoanCuoi where madh= '" + txtMaDonHang.Text + "' order by KetThuc ASC ");
            XRLichSanXuaTheoNgay rpKiemHang = new XRLichSanXuaTheoNgay();

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

            tool.ShowPreviewDialog();
            kn.dongketnoi();
        }
コード例 #9
0
        private void btnBienBanViPham_Click(object sender, EventArgs e)
        {
            DataTable dt = new DataTable();
            ketnoi    kn = new ketnoi();

            dt = kn.laybang(
                @"SELECT NhanVienID,HoTen,Sothe,ChiPhiNhanVien,NoiDungViPham,SBB,SoNcr,
                KhongPhuHop,HinhThucXuLy FROM tblNCR R
                INNER JOIN NcrNhanVien N
                ON R.NcrID=N.NcrID where SBB='" + txtSoBB.Text + "'");
            XRBienBan xRBienBan = new XRBienBan();

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

            tool.ShowPreviewDialog();
            kn.dongketnoi();
        }
 public void ShowPreviewDialog()
 {
     BarManager = PrintTool.PreviewForm.PrintBarManager;
     PrintTool.ShowPreviewDialog();
 }