本文整理汇总了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();
}
示例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();
}
}
}
示例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();
}
}
示例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();
}
}
示例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();
}
}
示例6: settingsControl_PrintOptionsClick
void settingsControl_PrintOptionsClick(object sender, EventArgs e) {
using(ReportPrintTool tool = new ReportPrintTool(report))
tool.PrintDialog(FindForm(), LookAndFeel);
}
示例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;
}
}
示例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.");
}
}
示例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();
}
示例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();
}
}
示例11: PrintReportFormat
private void PrintReportFormat()
{
var report = GetCurrentReportFormat();
if (report != null)
{
ReportPrintTool printTool = new ReportPrintTool(report);
printTool.PrintDialog();
}
else
{
MessageService.ShowError("选中的报表格式为空,无法打印!");
}
}
示例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();
}
}
示例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();
}
示例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();
}
}
}
}