private void GetAFTAuditReport(DateTime dtFromDate, DateTime dtToDate)
        {
            try
            {
                LogManager.WriteLog("Inside GetAFTAuditReport method", LogManager.enumLogLevel.Info);

                IReports objReports = ReportsBusinessObject.CreateInstance();

                DataSet dtDataset = objReports.GetAFTAuditTrailReport(dtFromDate, dtToDate);

                if (dtDataset.Tables[0].Rows.Count == 0)
                {
                    MessageBox.ShowBox("MessageID261", BMC_Icon.Information);
                    return;
                }

                using (CReportViewer cReportViewer = new CReportViewer())
                {
                    cReportViewer.ShowAFTAuditTrailReport("AFTAuditTrail", dtDataset, dtFromDate, dtToDate);
                    cReportViewer.SetOwner(Window.GetWindow(this));
                    cReportViewer.Show();
                }
            }
            catch (Exception ex)
            {
                ExceptionManager.Publish(ex);
            }
        }
        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);
            }
        }
        void CreateVarianceReport()
        {
            try
            {
                IReports objReports = ReportsBusinessObject.CreateInstance();

                LogManager.WriteLog("Fetching report data from database...", LogManager.enumLogLevel.Info);

                DataSet ExceptionDetails = objReports.GetExceptionSummary(_BatchID);

                if (ExceptionDetails.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 = new CReportViewer())
                {
                    LogManager.WriteLog("Report data fetched successfully from database", LogManager.enumLogLevel.Info);
                    cReportViewer.ShowVarianceReport(_BatchID);
                    cReportViewer.SetOwner(System.Windows.Window.GetWindow(this));

                    cReportViewer.Show();
                }
                LogManager.WriteLog("ShowExceptionSummaryReport Successfull", LogManager.enumLogLevel.Info);
            }
            catch (Exception ex)
            {
                LogManager.WriteLog("Report" + ex.Message, LogManager.enumLogLevel.Info);
            }
        }
示例#4
0
 private void btnPrint_Click(object sender, RoutedEventArgs e)
 {
     try
     {
         IReports objReports = ReportsBusinessObject.CreateInstance();
         using (CReportViewer objReportViewer = new CReportViewer())
         {
             DataSet dtPromotionalHistory = objReports.GetPromotionalTicketHistory();
             if (dtPromotionalHistory != null)
             {
                 objReportViewer.PrintPromotionalHistoryReport(dtPromotionalHistory);
                 objReportViewer.SetOwner(Window.GetWindow(this));
                 objReportViewer.ShowDialog();
             }
             else
             {
                 MessageBox.ShowBox("MessageID550", BMC_Icon.Information);
             }
         }
     }
     catch (Exception ex)
     {
         ExceptionManager.Publish(ex);
     }
 }
示例#5
0
        private void btnPrint_Click(object sender, RoutedEventArgs e)
        {
            try
            {
                IReports objReports = ReportsBusinessObject.CreateInstance();
                using (CReportViewer objReportViewer = new CReportViewer())
                {
                    DataSet dtTISPromotionalDetails = objReports.GetTISPromotionalDetails(this.StartDate, this.EndDate, NoOfRecordsInPage);
                    if (dtTISPromotionalDetails != null)
                    {
                        objReportViewer.PrintTISDetailsReport(dtTISPromotionalDetails, this.StartDate, this.EndDate, NoOfRecordsInPage);
                        objReportViewer.SetOwner(this);

                        objReportViewer.ShowDialog();
                    }
                    else
                    {
                        MessageBox.ShowBox("MessageID550", BMC_Icon.Information);
                    }
                }
            }
            catch (Exception ex)
            {
                ExceptionManager.Publish(ex);
            }
        }
        private void CreatePartCollectionReport(int Noofrecords)
        {
            try
            {
                IReports objReports        = null;
                DataSet  dsPartCollDetails = null;
                if (isCommonCDO)
                {
                    if (!CollectionHelper.IsServerConnected((cboSiteCode.SelectedItem as SiteConfig).ExchangeConnectionString))
                    {
                        return;
                    }
                    if (!_collectionHelper.IsAuthorized(SecurityHelper.CurrentUser.SecurityUserID, "BMC.Presentation.CommonCDOforDeclaration"))
                    {
                        return;
                    }
                    objReports = ReportsBusinessObject.CreateInstance((cboSiteCode.SelectedItem as SiteConfig).ExchangeConnectionString, (cboSiteCode.SelectedItem as SiteConfig).TicketConnectionString);
                }
                else
                {
                    objReports = ReportsBusinessObject.CreateInstance();
                }

                dsPartCollDetails = objReports.GetPartCollectionDetails(Noofrecords);
                if (dsPartCollDetails.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;
                }
                if (isCommonCDO)
                {
                    using (CReportViewer cReportViewer = new CReportViewer((cboSiteCode.SelectedItem as SiteConfig).ExchangeConnectionString, (cboSiteCode.SelectedItem as SiteConfig).TicketConnectionString))
                    {
                        LogManager.WriteLog("Report data fetched successfully from database", LogManager.enumLogLevel.Info);
                        cReportViewer.ShowPartCollection(Noofrecords, (cboSiteCode.SelectedItem as SiteConfig).ExchangeConnectionString, (cboSiteCode.SelectedItem as SiteConfig).TicketConnectionString);
                        cReportViewer.SetOwner(Window.GetWindow(this));
                        cReportViewer.Show();
                    }
                }
                else
                {
                    using (CReportViewer cReportViewer = new CReportViewer())
                    {
                        LogManager.WriteLog("Report data fetched successfully from database", LogManager.enumLogLevel.Info);
                        cReportViewer.ShowPartCollection(Noofrecords);
                        cReportViewer.SetOwner(Window.GetWindow(this));
                        cReportViewer.Show();
                    }
                }

                LogManager.WriteLog("Show Part Collection Report Successfull", LogManager.enumLogLevel.Info);
            }
            catch (Exception ex)
            {
                ExceptionManager.Publish(ex);
            }
        }
示例#7
0
 public CollectionBatchReports(int BatchId, Window window)
 {
     InitializeComponent();
     this._BatchID = BatchId;
     _Parent       = window;
     IsCommonCDO   = false;
     objReports    = ReportsBusinessObject.CreateInstance();
 }
示例#8
0
 public CollectionBatchReports(int BatchId, Window window, string ExchangeConnectionString, string TicketingConnectionString, string SiteName)
 {
     InitializeComponent();
     this._BatchID              = BatchId;
     _Parent                    = window;
     _ExchangeConnectionString  = ExchangeConnectionString;
     _TicketingConnectionString = TicketingConnectionString;
     _SiteName                  = SiteName;
     IsCommonCDO                = true;
     objReports                 = ReportsBusinessObject.CreateInstance(ExchangeConnectionString, TicketingConnectionString);
 }
        /// <summary>
        /// Load Event.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            ReportsBusinessObject objVersion = new ReportsBusinessObject();
            string sVersion, sName, sCopyRight, sDescription, sCompanyName, sProductName, sProductVersion;

            objVersion.GetVersion_SiteName(out sVersion, out sName);
            objVersion.GetSplashDetails(out sCopyRight, out sDescription, out sCompanyName, out sProductName, out sProductVersion);
            txtVersion.Text     = sVersion;
            CopyRight.Text      = "© " + DateTime.Now.Year + " Bally Technologies Inc. All Rights Reserved";
            CompanyName.Text    = "Company Name : " + sCompanyName;
            ProductName.Text    = "Product Name : " + sProductName;
            ProductVersion.Text = "Product Version : " + sProductVersion;
        }
        private void GetReadLiquidationReportRecords()
        {
            try
            {
                IReports objReports = ReportsBusinessObject.CreateInstance();
                lstReadReport.DataContext = objReports.GetReadLiquidationReportRecords(Convert.ToBoolean(chkLast20.IsChecked));
            }

            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);
            }
        }
        /// <summary>
        /// Load Event.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            ReportsBusinessObject objVersion = new ReportsBusinessObject();

            if (String.IsNullOrEmpty(oCommonUtilities.CreateInstance().GetConnectionString()))
            {
                MessageBox.ShowBox("MessageID1", BMC_Icon.Error);
                App.Current.Shutdown();
            }


            string sVersion, sName, sCopyRight, sDescription, sCompanyName, sProductName, sProductVersion;

            objVersion.GetVersion_SiteName(out sVersion, out sName);
            objVersion.GetSplashDetails(out sCopyRight, out sDescription, out sCompanyName, out sProductName, out sProductVersion);
            txtVersion.Text     = sVersion;
            CopyRight.Text      = "© " + DateTime.Now.Year + " Bally Technologies Inc. All Rights Reserved";
            CompanyName.Text    = "Company Name : " + sCompanyName;
            ProductName.Text    = "Product Name : " + sProductName;
            ProductVersion.Text = "Product Version : " + sProductVersion;

            //Start a new thread for the Pre - Requisite Checks.
            if (thread == null)
            {
                thread = new System.Threading.Thread(
                    new System.Threading.ThreadStart(
                        delegate()
                {
                    System.Windows.Threading.DispatcherOperation
                    dispatcherOp = txtStatus.Dispatcher.BeginInvoke(
                        System.Windows.Threading.DispatcherPriority.Normal,
                        new Action(
                            UpdateStatus
                            ));
                }
                        ));

                thread.Start();
            }
        }
        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);
            }
        }
示例#14
0
        //
        private void btnWinLossReport_Click(object sender, RoutedEventArgs e)
        {
            try
            {
                IReports objReports = (isCommonCDOforDeclaration && !string.IsNullOrEmpty(ExchangeConst)) ? ReportsBusinessObject.CreateInstance(ExchangeConst, TicketConst) : ReportsBusinessObject.CreateInstance();

                LogManager.WriteLog("Fetching report data from database...", LogManager.enumLogLevel.Info);

                BatchHistoryListView dr = (BatchHistoryListView)dgBatchBreakdown.SelectedItem;
                _Undeclared = (dr.Zone ?? "") == "UNDECLARED" ? true : false;//checking whether Zone is Undeclared and setting the _Undeclared
                var oReports = new CollectionBatchDetailReports(_BatchID, _WeekID, _SiteConfig, Window.GetWindow(this), _ChkWeek, _Undeclared);
                oReports.ShowDialogEx(this);
            }
            catch (Exception ex)
            {
                LogError("btnWinLossReport_Click", ex);
            }
        }