예제 #1
0
        private void CreateBatchWinLossReport()
        {
            try
            {
                //IReports objReports = ReportsBusinessObject.CreateInstance();

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



                using (CReportViewer cReportViewer = new CReportViewer())
                {
                    LogManager.WriteLog("Report data fetched successfully from database", LogManager.enumLogLevel.Info);

                    cReportViewer.ShowExceptionSummaryReport(_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);
            }
        }
 /// <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);
     }
 }
예제 #3
0
        //
        private void CreateExceptionSummaryReport()
        {
            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;
                }

                if (IsCommonCDO)
                {
                    using (CReportViewer cReportViewer = new CReportViewer(_ExchangeConnectionString, _TicketingConnectionString))
                    {
                        LogManager.WriteLog("Report data fetched successfully from database", LogManager.enumLogLevel.Info);
                        if (Settings.Region.ToUpper() == "UK")
                        {
                            cReportViewer.ShowExceptionSummaryReportUK(_BatchID, _ExchangeConnectionString, _TicketingConnectionString);
                        }
                        else
                        {
                            cReportViewer.ShowExceptionSummaryReport(_BatchID, _ExchangeConnectionString, _TicketingConnectionString);
                        }

                        cReportViewer.SetOwner(System.Windows.Window.GetWindow(this));
                        cReportViewer.Show();
                    }
                }
                else
                {
                    using (CReportViewer cReportViewer = new CReportViewer())
                    {
                        LogManager.WriteLog("Report data fetched successfully from database", LogManager.enumLogLevel.Info);
                        if (Settings.Region.ToUpper() == "UK")
                        {
                            cReportViewer.ShowExceptionSummaryReportUK(_BatchID);
                        }
                        else
                        {
                            cReportViewer.ShowExceptionSummaryReport(_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);
            }
        }