Exemplo n.º 1
0
        private void btnPrint_Click(object sender, RoutedEventArgs e)
        {
            try
            {
                bool TicketShow = true;
                if (!Security.SecurityHelper.HasAccess("BMC.Presentation.CashDeskManager.UserControls.CashDeskManagerAllDetails.lvViewAll.TicketValue"))
                {
                    TicketShow = false;
                }
                btnPrint.IsEnabled = false;
                //DataSet _DtDetails = BMC.Common.Utilities.CollectionExtensions.ToDataSet<CashierTransactionsDetails>(lstCashierTransactionsDetails, "DetailsView");

                BMC.Business.CashDeskOperator.Reports objReports = new BMC.Business.CashDeskOperator.Reports();

                //DataSet _DtDetails = objReports.GetCashierTransactionsDetails(true, true, true, true,
                //                                                              true, true, true, true,
                //                                                              true, true,
                //                                                              true, true, true, true,
                //                                                              true, true,
                //                                                              true, true,
                //                                                              StartDate, EndDate, user, iRoute_No);

                if (dtTickets.Tables[0].Rows.Count == 0)
                {
                    MessageBox.ShowBox("MessageID47");
                    return;
                }

                using (CReportViewer objReportViewer = new CReportViewer())
                {
                    objReportViewer.showDetailedReport(dtTickets, StartDate, EndDate, sFooterText, TicketShow);
                    objReportViewer.SetOwner(this);
                    objReportViewer.ShowDialog();
                }
            }
            finally
            {
                btnPrint.IsEnabled = true;
            }
        }