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


C# TextDocument.Print方法代码示例

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


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

示例1: printreportButton_Click

        private void printreportButton_Click(object sender, EventArgs e)
        {
            List<EmployeeReport> aList = new List<EmployeeReport>();
            //aList = (List<EmployeeReport>)employeereportdataGridView.DataSource;
            //if (aList == null)
            //{
            //    MessageBox.Show("No data Available");
            //    return;
            //}
            int printlenght = aList.Count;
            PrintDocument doc = new TextDocument(PrintEmployeeReport(aList), printlenght);

            doc.PrintPage += this.Doc_PrintPage;

            doc.DefaultPageSettings.Landscape = true;
            PrintDialog dlgSettings = new PrintDialog();
            dlgSettings.Document = doc;
            dlgSettings.UseEXDialog = true;

            if (dlgSettings.ShowDialog() == DialogResult.OK)
            {
                doc.Print();
            }
        }
开发者ID:Jusharra,项目名称:RMS,代码行数:24,代码来源:EmployeeSalaryReport.cs

示例2: printPurchaseReportbutton_Click

        private void printPurchaseReportbutton_Click(object sender, EventArgs e)
        {
            InventoryPurchaseBLL aInventoryPurchaseBll = new InventoryPurchaseBLL();
            List<InventoryReport> aReports = new List<InventoryReport>();
            aReports = (List<InventoryReport>)inventoryPurchaseDataGridView.DataSource;

            if (aReports == null)
            {
                MessageBox.Show("No data Available Into GridView");
                return;
            }
            int printlenght = aReports.Count;
            PrintDocument doc = new TextDocument(aInventoryPurchaseBll.PrintPurchaseReport(aReports), printlenght);
            printReportLogoType = 1;
            doc.PrintPage += this.Doc_PrintPage;

            doc.DefaultPageSettings.Landscape = true;
            PrintDialog dlgSettings = new PrintDialog();
            dlgSettings.Document = doc;
            dlgSettings.UseEXDialog = true;
            if (dlgSettings.ShowDialog() == DialogResult.OK)
            {
                doc.Print();
            }
        }
开发者ID:Jusharra,项目名称:RMS,代码行数:25,代码来源:InventoryPurchaseReport.cs

示例3: reportprintbutton_Click

        private void reportprintbutton_Click(object sender, EventArgs e)
        {
            List<ProfitLoss> aProfitLosses = new List<ProfitLoss>();
            aProfitLosses = (List<ProfitLoss>) profitlossdataGridView.DataSource;

            if (aProfitLosses == null)
            {
                MessageBox.Show("No data Available");
                return;
            }
            int printlenght = aProfitLosses.Count;
            PrintDocument doc = new TextDocument(ProfitLossReportPrint(aProfitLosses), printlenght);

            doc.PrintPage += this.Doc_PrintPage;

            doc.DefaultPageSettings.Landscape = true;
            PrintDialog dlgSettings = new PrintDialog();
            dlgSettings.Document = doc;

            if (dlgSettings.ShowDialog() == DialogResult.OK)
            {
                doc.Print();
            }
        }
开发者ID:Jusharra,项目名称:RMS,代码行数:24,代码来源:ProfitLossReport.cs

示例4: printReportbutton_Click

        private void printReportbutton_Click(object sender, EventArgs e)
        {
            List<Transaction1> aTransactions = new List<Transaction1>();
            aTransactions = (List<Transaction1>)otherdataGridView.DataSource;

            if (aTransactions == null)
            {
                MessageBox.Show("No data Available");
                return;
            }
            int printlenght = aTransactions.Count;
            PrintDocument doc = new TextDocument(AccessoriesReportPrint(aTransactions), printlenght);

            doc.PrintPage += this.Doc_PrintPage;

            doc.DefaultPageSettings.Landscape = true;
            PrintDialog dlgSettings = new PrintDialog();
            dlgSettings.Document = doc;
            dlgSettings.UseEXDialog = true;

            if (dlgSettings.ShowDialog() == DialogResult.OK)
            {
                doc.Print();
            }
        }
开发者ID:Jusharra,项目名称:RMS,代码行数:25,代码来源:OtherTransactionView.cs

示例5: printRawmaterialsReportbutton_Click

        private void printRawmaterialsReportbutton_Click(object sender, EventArgs e)
        {
            SupplierPaymentReportBLL aPaymentReportBll = new SupplierPaymentReportBLL();
            List<SupplierPaymentReport> aPaymentReports = new List<SupplierPaymentReport>();
            aPaymentReports = (List<SupplierPaymentReport>)supplierdatapaymentGridView.DataSource;
            if (aPaymentReports == null)
            {
                MessageBox.Show("No data Available Into GridView");
                return;
            }
            int printlenght = aPaymentReports.Count;
            PrintDocument doc = new TextDocument(aPaymentReportBll.SupplierPaymentReportPrint(aPaymentReports), printlenght);
            //ViewReport aReport = new ViewReport();
            printReportLogoType = 1;
            doc.PrintPage += this.Doc_PrintPage;

            doc.DefaultPageSettings.Landscape = true;
            PrintDialog dlgSettings = new PrintDialog();
            dlgSettings.Document = doc;
            dlgSettings.UseEXDialog = true;
            if (dlgSettings.ShowDialog() == DialogResult.OK)
            {
                doc.Print();
            }
        }
开发者ID:Jusharra,项目名称:RMS,代码行数:25,代码来源:SupplierPaymentReportForm.cs


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