private void CreateSGVILiquidationReport() { try { IReports objReports = isCommonCDOforDeclaration ? ReportsBusinessObject.CreateInstance(ExchangeConst, TicketConst) : ReportsBusinessObject.CreateInstance(); DataSet LiquidationDetails = objReports.GetLiquidationDetails(_BatchID); DataSet LiquidationSummaryDetails = objReports.GetLiquidationSummaryDetails(_BatchID); if (LiquidationDetails.Tables[0].Rows.Count == 0 || LiquidationSummaryDetails.Tables[0].Rows.Count == 0) { LogManager.WriteLog("No Records found for the selected criteria - Return", LogManager.enumLogLevel.Info); MessageBox.ShowBox("MessageID261", BMC_Icon.Information); return; } using (CReportViewer cReportViewer = (isCommonCDOforDeclaration && !string.IsNullOrEmpty(ExchangeConst)) ? new CReportViewer(CommonUtilities.SiteConnectionString(ExchangeConst), CommonUtilities.TicketingConnectionString(TicketConst)) : new CReportViewer()) { LogManager.WriteLog("Report data fetched successfully from database", LogManager.enumLogLevel.Info); cReportViewer.ShowLiquidationReport(LiquidationDetails, LiquidationSummaryDetails, _BatchID); cReportViewer.SetOwner(Window.GetWindow(this)); cReportViewer.ShowDialog(); } LogManager.WriteLog("ShowLiquidationReport Successfull", LogManager.enumLogLevel.Info); } catch (Exception ex) { ExceptionManager.Publish(ex); } }
private void CreateCollectionReport() { try { //IReports objReports = isCommonCDOforDeclaration ? ReportsBusinessObject.CreateInstance(ExchangeConst, TicketConst) : ReportsBusinessObject.CreateInstance(); IReports objReports = ReportsBusinessObject.CreateInstance(); DataSet BatchWinLossDetails = null; if (_BatchID > 0) { BatchWinLossDetails = objReports.GetBatchWinLoss(_BatchID, 0); } else if (_WeekNumber > 0) { BatchWinLossDetails = objReports.GetBatchWinLoss(_WeekNumber, 1); } //DataSet BatchWinLossDetails = objReports.GetBatchWinLoss(_BatchID, _WeekNumber); if (BatchWinLossDetails.Tables[0].Rows.Count == 0 || BatchWinLossDetails.Tables[0].Rows.Count == 0) { LogManager.WriteLog("No Records found for the selected criteria - Return", LogManager.enumLogLevel.Info); MessageBox.ShowBox("MessageID261", BMC_Icon.Information); return; } using (CReportViewer cReportViewer = isCommonCDOforDeclaration ? new CReportViewer(ExchangeConst, TicketConst) : new CReportViewer()) { LogManager.WriteLog("Report data fetched successfully from database", LogManager.enumLogLevel.Info); if (_BatchID > 0) { cReportViewer.ShowCollectionReport(_BatchID, 0); } else if (_WeekNumber > 0) { cReportViewer.ShowCollectionReport(_WeekNumber, 1); } cReportViewer.SetOwner(Window.GetWindow(this)); cReportViewer.ShowDialog(); } LogManager.WriteLog("CreateCollectionReport Successfull", LogManager.enumLogLevel.Info); } catch (Exception ex) { ExceptionManager.Publish(ex); } }
private void CreateWeeklyExceptionSummaryReport(int WeekID) { try { using (CReportViewer cReportViewer = new CReportViewer()) { LogManager.WriteLog("Report data fetched successfully from database", LogManager.enumLogLevel.Info); cReportViewer.ShowWeeklyExceptionSummary(WeekID); cReportViewer.SetOwner(Window.GetWindow(this)); cReportViewer.ShowDialog(); } } catch (Exception ex) { ExceptionManager.Publish(ex); } }
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; } }
private void CreateLiquidationReport() { try { if (Settings.SGVI_Enabled) { CreateSGVILiquidationReport(); return; } IReports objReports = isCommonCDOforDeclaration ? ReportsBusinessObject.CreateInstance(ExchangeConst, TicketConst) : ReportsBusinessObject.CreateInstance(); LogManager.WriteLog("Check whether the Liquidation performed for the batch or not-Starts", LogManager.enumLogLevel.Info); int?iLiquidationPerformed = 0; int isLiquidationPerformedForBatch = objReports.CheckLiquidationPerformed(_BatchID, ref iLiquidationPerformed); if (isLiquidationPerformedForBatch == 0) { MessageBox.ShowBox("MessageID891", BMC_Icon.Information); return; } using (CReportViewer cReportViewer = new CReportViewer()) { LogManager.WriteLog("Launch the liquidation report", LogManager.enumLogLevel.Info); cReportViewer.ShowLiquidationReportForRead(_BatchID, null); cReportViewer.SetOwner(Window.GetWindow(this)); cReportViewer.ShowDialog(); } LogManager.WriteLog("ShowLiquidationReport Successfull", LogManager.enumLogLevel.Info); } catch (Exception ex) { ExceptionManager.Publish(ex); } }
/// <summary> /// Displays the Exception Summary Report for selected collection batch in a new dialog /// </summary> private void CreateExceptionSummaryReport() { try { using (CReportViewer cReportViewer = new CReportViewer()) { LogManager.WriteLog("Report data fetched successfully from database", LogManager.enumLogLevel.Info); if (!string.IsNullOrEmpty(ExchangeConst) && !string.IsNullOrEmpty(TicketConst)) { cReportViewer.ShowExceptionSummaryReport(_BatchID, ExchangeConst, TicketConst); } else { cReportViewer.ShowExceptionSummaryReport(_BatchID); } cReportViewer.SetOwner(Window.GetWindow(this)); cReportViewer.ShowDialog(); } } catch (Exception ex) { ExceptionManager.Publish(ex); } }
private void PrintSpotCheckReport() { Installations objInstallationDetails = tvMachineList.SelectedItem as Installations; if (objInstallationDetails == null) { return; } List <SpotCheck> lstSpotCheck = new List <SpotCheck>(); lstSpotCheck = lstSpotCheckSummaryDetails.Where(item => item.InstallationNo == objInstallationDetails.Installation_No).ToList(); if (lstSpotCheck == null || lstSpotCheck.Count <= 0) { return; } using (CReportViewer cReportViewer = new CReportViewer()) { cReportViewer.ShowSpotCheckReport( objInstallationDetails.Bar_Position_Name, objInstallationDetails.Zone_Name.IsNullOrEmpty() ? string.Empty : objInstallationDetails.Zone_Name, objInstallationDetails.GameTitle, //(Convert.ToDecimal(objInstallationDetails.POP) / 100).ToString(), (Convert.ToDecimal(objInstallationDetails.POP)).ToString(), lstSpotCheck[0].DateTimeStamp, (lstSpotCheck[0].CashIn - lstSpotCheck[0].CashOut), lstSpotCheck[0].CashIn, Convert.ToDecimal(lstSpotCheck[0].Payout), Convert.ToDecimal(lstSpotCheck[0].CoinsDrop.ToString("#,##0.00")), lstSpotCheck[0].HandPay, lstSpotCheck[0].Date, Settings.SiteCode ); cReportViewer.ShowDialog(); } }