当前位置: 首页>>代码示例>>C#>>正文


C# ReportPrintTool.PrintDialog方法代码示例

本文整理汇总了C#中ReportPrintTool.PrintDialog方法的典型用法代码示例。如果您正苦于以下问题:C# ReportPrintTool.PrintDialog方法的具体用法?C# ReportPrintTool.PrintDialog怎么用?C# ReportPrintTool.PrintDialog使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ReportPrintTool的用法示例。


在下文中一共展示了ReportPrintTool.PrintDialog方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: btnPrint_Click

 private void btnPrint_Click(object sender, EventArgs e)
 {
     ReportPrintTool pt = new ReportPrintTool(billReportView);
     pt.PrintingSystem.StartPrint +=
         new PrintDocumentEventHandler(printingSystem_StartPrint);
     pt.PrintDialog();
 }
开发者ID:OOAD-2015,项目名称:Hotel-Manager,代码行数:7,代码来源:frmViewBill.cs

示例2: frmViewBillReport_KeyDown

 private void frmViewBillReport_KeyDown(object sender, KeyEventArgs e)
 {
     if (e.KeyCode == Keys.F2)
     {
         ReportPrintTool pt = new ReportPrintTool(billReportView);
         pt.PrintingSystem.StartPrint +=
             new PrintDocumentEventHandler(printingSystem_StartPrint);
         pt.PrintDialog();
     }
     else
     {
         if (e.KeyCode == Keys.Escape)
         {
             this.Close();
         }
     }
 }
开发者ID:OOAD-2015,项目名称:Hotel-Manager,代码行数:17,代码来源:frmViewBill.cs

示例3: cmsPrintReturn_Click

        private void cmsPrintReturn_Click(object sender, EventArgs e)
        {
            PurchasingReturnPrintItem report = new PurchasingReturnPrintItem();
            List<PurchaseReturnViewModel> _dataSource = new List<PurchaseReturnViewModel>();
            _dataSource.Add(SelectedPurchaseReturn);
            report.DataSource = _dataSource;
            report.FillDataSource();

            using (ReportPrintTool printTool = new ReportPrintTool(report))
            {
                // Invoke the Print dialog.
                printTool.PrintDialog();
            }
        }
开发者ID:edwinsyarief,项目名称:Brawijaya-Workshop-Solution,代码行数:14,代码来源:PurchaseReturnListControl.cs

示例4: btnPrint_Click

        private void btnPrint_Click(object sender, EventArgs e)
        {
            BalanceJournalPrintItem report = new BalanceJournalPrintItem(SelectedYear, SelectedMonth);
            report.DataSource = BalanceJournalDetailList;
            report.FillDataSource();

            using (ReportPrintTool printTool = new ReportPrintTool(report))
            {
                // Invoke the Print dialog.
                printTool.PrintDialog();
            }
        }
开发者ID:edwinsyarief,项目名称:Brawijaya-Workshop-Solution,代码行数:12,代码来源:BalanceJournalListControl.cs

示例5: btnPrint_Click

        private void btnPrint_Click(object sender, EventArgs e)
        {
            SparepartStockCardPrintItem report = new SparepartStockCardPrintItem(DateFromFilter, DateToFilter);
            report.DataSource = ListStockCard;
            report.FillDataSource();

            using (ReportPrintTool printTool = new ReportPrintTool(report))
            {
                printTool.PrintDialog();
            }
        }
开发者ID:edwinsyarief,项目名称:Brawijaya-Workshop-Solution,代码行数:11,代码来源:SparepartStockCardListControl.cs

示例6: settingsControl_PrintOptionsClick

 void settingsControl_PrintOptionsClick(object sender, EventArgs e) {
     using(ReportPrintTool tool = new ReportPrintTool(report))
         tool.PrintDialog(FindForm(), LookAndFeel);
 }
开发者ID:sethjuarez,项目名称:DevAV,代码行数:4,代码来源:CustomersPrint.cs

示例7: bgwSave_DoWork

        private void bgwSave_DoWork(object sender, System.ComponentModel.DoWorkEventArgs e)
        {
            try
            {
                _presenter.SaveChanges();
                if (this.IsNeedApproval)
                {
                    _presenter.SendApproval();
                }
                else
                {
                    List<SPKViewModel> _dataSource = new List<SPKViewModel>();
                    _dataSource.Add(SelectedSPK);

                    if (isContractWork)
                    {
                        SPKContractPrintItem report = new SPKContractPrintItem();
                        report.DataSource = _dataSource;
                        report.FillDataSource();
                        if (!this.IsSPKSales)
                        {
                            _presenter.Print();
                            using (ReportPrintTool printTool = new ReportPrintTool(report))
                            {
                                // Invoke the Print dialog.
                                printTool.PrintDialog();
                            }
                        }
                    }
                    else
                    {
                        SPKPrintItem report = new SPKPrintItem();
                        report.DataSource = _dataSource;
                        report.FillDataSource();
                        if (!this.IsSPKSales)
                        {
                            _presenter.Print();
                            using (ReportPrintTool printTool = new ReportPrintTool(report))
                            {
                                // Invoke the Print dialog.
                                printTool.PrintDialog();
                            }
                        }
                    }

                }
            }
            catch (Exception ex)
            {
                MethodBase.GetCurrentMethod().Fatal("An error occured while trying to save spk with vehicleID: '" + this.VehicleId + "'", ex);
                e.Result = ex;
            }
        }
开发者ID:edwinsyarief,项目名称:Brawijaya-Workshop-Solution,代码行数:53,代码来源:SPKEditorForm.cs

示例8: btnPrintAll_Click


//.........这里部分代码省略.........

                List<RecapInvoiceBySPKItemViewModel> reportDataSource = new List<RecapInvoiceBySPKItemViewModel>();
                foreach (var item in this.ListInvoices)
                {
                    if (item.ItemName == "Gaji Tukang Harian" || item.ItemName == "Gaji Tukang Borongan")
                    {
                        RecapInvoiceBySPKItemViewModel itemWorker = reportDataSource.Where(ds =>
                            ds.Category == category.Name && ds.VehicleGroup == vehicleGroup.Name &&
                            ds.LicenseNumber == item.Invoice.SPK.Vehicle.ActiveLicenseNumber &&
                            (ds.Description == "ONGKOS TUKANG HARIAN" ||
                            ds.Description == "ONGKOS TUKANG BORONGAN")).FirstOrDefault();
                        if (itemWorker != null)
                        {
                            int currentIndex = reportDataSource.IndexOf(itemWorker);
                            if (item.ItemName == "Gaji Tukang Borongan")
                            {
                                decimal commission = item.SubTotalWithoutFee - ((100M / 120M) * item.SubTotalWithoutFee);
                                itemWorker.CommisionNominal = commission;
                                itemWorker.Nominal += (item.SubTotalWithoutFee - commission);
                                itemWorker.Total += item.SubTotalWithFee;
                                itemWorker.Fee += (item.SubTotalWithFee - item.SubTotalWithoutFee);
                            }
                            else
                            {
                                itemWorker.Nominal += item.SubTotalWithoutFee;
                                itemWorker.Total += item.SubTotalWithFee;
                                itemWorker.Fee += (item.SubTotalWithFee - item.SubTotalWithoutFee);
                            }
                            reportDataSource[currentIndex] = itemWorker;
                        }
                        else
                        {
                            itemWorker = new RecapInvoiceBySPKItemViewModel();
                            itemWorker.Category = category.Name;
                            itemWorker.VehicleGroup = vehicleGroup.Name;
                            itemWorker.LicenseNumber = item.Invoice.SPK.Vehicle.ActiveLicenseNumber;
                            itemWorker.Description = item.ItemName == "Gaji Tukang Harian" ?
                                "ONGKOS TUKANG HARIAN" : "ONGKOS TUKANG BORONGAN";
                            if (item.ItemName == "Gaji Tukang Borongan")
                            {
                                decimal commission = item.SubTotalWithoutFee - ((100M / 120M) * item.SubTotalWithoutFee);
                                itemWorker.CommisionNominal = commission;
                                itemWorker.Nominal = item.SubTotalWithoutFee - commission;
                                itemWorker.Total = item.SubTotalWithFee;
                                itemWorker.Fee = (item.SubTotalWithFee - item.SubTotalWithoutFee);
                            }
                            else
                            {
                                itemWorker.Nominal = item.SubTotalWithoutFee;
                                itemWorker.Total = item.SubTotalWithFee;
                                itemWorker.Fee = (item.SubTotalWithFee - item.SubTotalWithoutFee);
                            }
                            reportDataSource.Add(itemWorker);
                        }
                    }
                    else
                    {
                        RecapInvoiceBySPKItemViewModel itemSparepart = reportDataSource.Where(ds =>
                            ds.Category == category.Name && ds.VehicleGroup == vehicleGroup.Name &&
                            ds.LicenseNumber == item.Invoice.SPK.Vehicle.ActiveLicenseNumber &&
                            ds.Description == "ONDERDIL").FirstOrDefault();
                        if (itemSparepart != null)
                        {
                            int currentIndex = reportDataSource.IndexOf(itemSparepart);
                            itemSparepart.Nominal += item.SubTotalWithoutFee;
                            itemSparepart.Total += item.SubTotalWithFee;
                            itemSparepart.Fee += (item.SubTotalWithFee - item.SubTotalWithoutFee);
                            reportDataSource[currentIndex] = itemSparepart;
                        }
                        else
                        {
                            itemSparepart = new RecapInvoiceBySPKItemViewModel();
                            itemSparepart.Category = category.Name;
                            itemSparepart.VehicleGroup = vehicleGroup.Name;
                            itemSparepart.LicenseNumber = item.Invoice.SPK.Vehicle.ActiveLicenseNumber;
                            itemSparepart.Description = "ONDERDIL";
                            itemSparepart.Nominal = item.SubTotalWithoutFee;
                            itemSparepart.Total = item.SubTotalWithFee;
                            itemSparepart.Fee = (item.SubTotalWithFee - item.SubTotalWithoutFee);
                            reportDataSource.Add(itemSparepart);
                        }
                    }
                }

                string customer = (lookupCustomer.GetSelectedDataRow() as CustomerViewModel).CompanyName;
                RecapInvoiceBySPKPrintItem report = new RecapInvoiceBySPKPrintItem(customer, category.Name, DateFrom, DateTo);
                report.DataSource = reportDataSource;
                report.FillDataSource();

                using (ReportPrintTool printTool = new ReportPrintTool(report))
                {
                    printTool.PrintDialog();
                }
            }
            catch (Exception ex)
            {
                MethodBase.GetCurrentMethod().Fatal("An error occured while trying to print invoice", ex);
                this.ShowError("Print Invoice Gagal! Hubungi Developer.");
            }
        }
开发者ID:edwinsyarief,项目名称:Brawijaya-Workshop-Solution,代码行数:101,代码来源:RecapInvoiceBySPKListControl.cs

示例9: btnPrint_Click

        private void btnPrint_Click(object sender, EventArgs e)
        {
            InvoicePrintItem report = new InvoicePrintItem();
            List<InvoiceViewModel> _dataSource = new List<InvoiceViewModel>();
            _dataSource.Add(SelectedInvoice);
            report.DataSource = _dataSource;
            report.FillDataSource();

            using (ReportPrintTool printTool = new ReportPrintTool(report))
            {
                // Invoke the Print dialog.
                printTool.PrintDialog();
            }
            _presenter.Print();
            this.Close();
        }
开发者ID:edwinsyarief,项目名称:Brawijaya-Workshop-Solution,代码行数:16,代码来源:InvoiceDetailForm.cs

示例10: btnPrint_Click

        private void btnPrint_Click(object sender, EventArgs e)
        {
            BalanceHelperPrintItem report = new BalanceHelperPrintItem(SelectedYear, SelectedMonth, (lookUpFilterJournal.GetSelectedDataRow() as JournalMasterViewModel).Name);
            report.DataSource = ListHelper;
            report.FillDataSource();

            using (ReportPrintTool printTool = new ReportPrintTool(report))
            {
                // Invoke the Print dialog.
                printTool.PrintDialog();
            }
        }
开发者ID:edwinsyarief,项目名称:Brawijaya-Workshop-Solution,代码行数:12,代码来源:BalanceHelperListControl.cs

示例11: PrintReportFormat

        private void PrintReportFormat()
        {
            var report = GetCurrentReportFormat();

            if (report != null)
            {
                ReportPrintTool printTool = new ReportPrintTool(report);
                printTool.PrintDialog();
            }
            else
            {
                MessageService.ShowError("选中的报表格式为空,无法打印!");
            }
        }
开发者ID:JodenSoft,项目名称:JodenSoft,代码行数:14,代码来源:ReportService.cs

示例12: btnPrint_Click

        private void btnPrint_Click(object sender, EventArgs e)
        {
            ProfitLossPrintItem report = new ProfitLossPrintItem(SelectedYear, SelectedMonth);
            report.DataSource = ProfitLossList;
            report.FillDataSource();

            using (ReportPrintTool printTool = new ReportPrintTool(report))
            {
                // Invoke the Print dialog.
                printTool.PrintDialog();
            }
        }
开发者ID:edwinsyarief,项目名称:Brawijaya-Workshop-Solution,代码行数:12,代码来源:ProfitLossControl.cs

示例13: cmsPrintData_Click

        private void cmsPrintData_Click(object sender, EventArgs e)
        {
            SPKPrintItem report = new SPKPrintItem();
            List<SPKViewModel> _dataSource = new List<SPKViewModel>();
            _dataSource.Add(SelectedSPK);
            report.DataSource = _dataSource;
            report.FillDataSource();

            using (ReportPrintTool printTool = new ReportPrintTool(report))
            {
                // Invoke the Print dialog.
                bool? result = printTool.PrintDialog();
                if (result.HasValue && result.Value)
                {
                    _presenter.PrintSPK();
                }
            }

            btnSearch.PerformClick();
        }
开发者ID:edwinsyarief,项目名称:Brawijaya-Workshop-Solution,代码行数:20,代码来源:SPKListControl.cs

示例14: btnPrintAll_Click

        private void btnPrintAll_Click(object sender, EventArgs e)
        {
            if (bgwMain.IsBusy || bgwExport.IsBusy) return;

            if (InvoiceListData == null || InvoiceListData.Count == 0) return;

            if (InvoiceListData.Where(x => x.Status == (int)DbConstant.InvoiceStatus.FeeNotFixed).Count() > 0)
            {
                this.ShowWarning("terdapat data yang belum dilengkapi dengan fee dalam grid, tidak bisa cetak semua");
            }
            else
            {
                if (this.ShowConfirmation("Apakah anda yakin ingin mencetak semua data yang tampil pada daftar?") == DialogResult.Yes)
                {
                    List<InvoiceViewModel> dsReport = InvoiceListData;
                    if (dsReport != null && dsReport.Count > 0)
                    {
                        foreach (var itemReport in dsReport)
                        {
                            itemReport.ListInvoiceSparepart = _presenter.GetSparepartInvoice(itemReport.Id);
                        }
                        InvoicePrintItem report = new InvoicePrintItem();
                        report.DataSource = dsReport;
                        report.FillDataSource();

                        using (ReportPrintTool printTool = new ReportPrintTool(report))
                        {
                            // Invoke the Print dialog.
                            printTool.PrintDialog();
                        }
                        _presenter.PrintAll();

                        btnSearch.PerformClick();
                    }
                }
            }
        }
开发者ID:edwinsyarief,项目名称:Brawijaya-Workshop-Solution,代码行数:37,代码来源:InvoiceListControl.cs


注:本文中的ReportPrintTool.PrintDialog方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。