private void Print()
        {
            XtraReport report = new XtraReport1();

            ReportData = new SignsJobCardReportData();

            var aluminumSheets = SelectedAluminumSheets.Split(',');

            ReportData.AluminumSheet2_03MM  = aluminumSheets.Contains("2.03mm") ? "P" : "";
            ReportData.AluminumSheet3_175MM = aluminumSheets.Contains("3.175mm") ? "P" : "";
            ReportData.AluminumSheet3_0MM   = aluminumSheets.Contains("3.0mm") ? "P" : "";
            ReportData.AluminumSheet2_0MM   = aluminumSheets.Contains("2.0mm") ? "P" : "";
            ReportData.AluminumSheet1_5MM   = aluminumSheets.Contains("1.5mm") ? "P" : "";
            ReportData.AluminumSheet1MM     = aluminumSheets.Contains("1.0mm") ? "P" : "";


            report.DataSource = new List <SignsJobCardReportData> {
                ReportData
            };

            DocumentPreviewWindow window = new DocumentPreviewWindow();

            window.PreviewControl.DocumentSource = report;
            report.CreateDocument();
            window.Show();
        }
示例#2
0
        private void OnPreviewDocument()
        {
            var viewModel = new DocumentPreviewViewModel();
            var preview   = new DocumentPreviewWindow(viewModel);

            preview.Show();
        }
示例#3
0
        private void button2_Click(object sender, RoutedEventArgs e)
        {
            ReportAfleverEtiket report = new ReportAfleverEtiket();
            var window = new DocumentPreviewWindow();

            window.PreviewControl.DocumentSource = report;
            report.CreateDocument();
            window.Show();
        }
        private void button1_Click(object sender, RoutedEventArgs e)
        {
            PrintableControlLink  link    = new PrintableControlLink((DevExpress.Xpf.Grid.TableView)gridControl1.View, "My Document");
            DocumentPreviewWindow preview = new DocumentPreviewWindow();

            preview.PreviewControl.DocumentSource = link;
            link.CreateDocument(true);

            ThemeManager.SetThemeName(preview, ThemeManager.GetThemeName(gridControl1));

            preview.Show();
        }
示例#5
0
        void ShowProducts()
        {
            var model = new ReportPreviewModel {
                ServiceUri = "../ReportService.svc",
                ReportName = "Reports.ProductReport"
            };
            var window = new DocumentPreviewWindow {
                Model = model
            };

            window.Show();
            model.CreateDocument();
        }
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            var link = new PrintableControlLink((TableView)gridControl1.View);

            link.PageHeaderTemplate = (DataTemplate)Resources["PageHeader"];
            link.PageFooterTemplate = (DataTemplate)Resources["PageFooter"];

            DocumentPreviewWindow wnd = new DocumentPreviewWindow();

            wnd.PreviewControl.DocumentSource = link;
            link.CreateDocument();
            wnd.Show();
        }
示例#7
0
        private void Print()
        {
            XtraReport report = new JournalVoucherReport();

            report.DataSource = new List <JournalVoucherModel> {
                Entity
            };

            DocumentPreviewWindow window = new DocumentPreviewWindow();

            window.PreviewControl.DocumentSource = report;
            report.CreateDocument();
            window.Show();
        }
        private void Print()
        {
            XtraReport report = new JournalVoucherReceiptReport();

            //JVR.AccountNo = TransactionType.AccountCode;
            ////JVR.Branch = Branch.BranchName;
            ////JVR.CustomerName = Branch.CompanyName;
            report.DataSource = new List <JournalVoucherReceiptModel> {
                Entity
            };

            DocumentPreviewWindow window = new DocumentPreviewWindow();

            window.PreviewControl.DocumentSource = report;
            report.CreateDocument();
            window.Show();
        }
        private void Print()
        {
            XtraReport report = new ChequeDepositVoucherReport();

            Entity.AccountNo    = Branch.AccountNumber;
            Entity.Branch       = Branch.BranchName;
            Entity.CustomerName = Branch.CompanyName;
            report.DataSource   = new List <DepositSlipLineViewModel> {
                Entity
            };

            DocumentPreviewWindow window = new DocumentPreviewWindow();

            window.PreviewControl.DocumentSource = report;
            report.CreateDocument();
            window.Show();
        }
示例#10
0
        private void ShowPreviewWindow(string filePath)
        {
            if (string.IsNullOrEmpty(filePath))
            {
                return;
            }

            if (OpenDocumentByNativeApplication)
            {
                ShowPreviewByNativeApplication(filePath);
            }
            else
            {
                var viewModel = new DocumentPreviewViewModel();
                var preview   = new DocumentPreviewWindow(viewModel);
                viewModel.FilePath = filePath;
                preview.Show();
            }
        }
        private void Print()
        {
            XtraReport report = new XtraReport1();

            ReportData = new SignsJobCardReportData();

            ReportData.Lines.AddRange(new[]
            {
                new SignJobCardReportLine
                {
                    Shape = new ImageSource(Properties.Resources.SL),
                    Size  = "750 SL",
                    Qty   = 20,
                    Unit  = "Nos"
                },
                new SignJobCardReportLine {
                    Shape = new ImageSource(Properties.Resources.Circle),
                    Size  = "600 Dia",
                    Qty   = 32,
                    Unit  = "Nos"
                },
                new SignJobCardReportLine {
                    Shape = new ImageSource(Properties.Resources.HT),
                    Size  = "600 HT",
                    Qty   = 2,
                    Unit  = "Nos"
                },
                new SignJobCardReportLine {
                    Shape = new ImageSource(Properties.Resources.R1),
                    Size  = "1200 x 400",
                    Qty   = 16,
                    Unit  = "Nos"
                },
                new SignJobCardReportLine {
                    Shape = new ImageSource(Properties.Resources.R2)
                },
                new SignJobCardReportLine {
                    Shape = new ImageSource(Properties.Resources.R3)
                }
            });

            var aluminumSheets = SelectedAluminumSheets.Split(',');

            ReportData.AluminumSheet2_03MM  = aluminumSheets.Contains("2.03mm") ? "P" : "";
            ReportData.AluminumSheet3_175MM = aluminumSheets.Contains("3.175mm") ? "P" : "";
            ReportData.AluminumSheet3_0MM   = aluminumSheets.Contains("3.0mm") ? "P" : "";
            ReportData.AluminumSheet2_0MM   = aluminumSheets.Contains("2.0mm") ? "P" : "";
            ReportData.AluminumSheet1_5MM   = aluminumSheets.Contains("1.5mm") ? "P" : "";
            ReportData.AluminumSheet1MM     = aluminumSheets.Contains("1.0mm") ? "P" : "";


            report.DataSource = new List <SignsJobCardReportData> {
                ReportData
            };

            DocumentPreviewWindow window = new DocumentPreviewWindow();

            window.PreviewControl.DocumentSource = report;
            report.CreateDocument();
            window.Show();
        }