本文整理汇总了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();
}
}
示例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();
}
}
示例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();
}
}
示例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();
}
}
示例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();
}
}