Exemple #1
0
        public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
        {
            IVRRejects rpt = new IVRRejects();

            rpt.Site = this.Site;
            return(rpt);
        }
Exemple #2
0
        private void ReadPCPAYFILE(IACDataSet PCPAY)
        {
            PaymentDataSet      IVR   = new PaymentDataSet();
            SQLBackupandRestore SQLBR = new SQLBackupandRestore();

            IACDataSetTableAdapters.IVRPAYTableAdapter         IVRPAYTableAdapter     = new IACDataSetTableAdapters.IVRPAYTableAdapter();
            IACDataSetTableAdapters.PAYMENTTableAdapter        PAYMENTTableAdapter    = new IACDataSetTableAdapters.PAYMENTTableAdapter();
            PaymentDataSetTableAdapters.IVRRejectsTableAdapter IVRRejectsTableAdapter = new PaymentDataSetTableAdapters.IVRRejectsTableAdapter();

            if (SQLBR.RunJob("IVRIMPORT", "Import from IVR", false))
            {
                Thread.Sleep(5000);
                try
                {
                    IVRPAYTableAdapter.Fill(PCPAY.IVRPAY);
                }
                catch
                {
                    IVRPAYTableAdapter.Fill(PCPAY.IVRPAY);
                }
            }
            // Moses Newman 09/25/2018 Create Rejects Report if any customers are Inactive.
            if (PCPAY.IVRPAY.Rows.Count != 0)
            {
                IVRRejectsTableAdapter.Create();
                IVRRejectsTableAdapter.FillByAll(IVR.IVRRejects);
                if (IVR.IVRRejects.Rows.Count > 0)
                {
                    MDIIAC2013 MDImain = (MDIIAC2013)MdiParent;
                    Hide();
                    MDImain.CreateFormInstance("ReportViewer", false);
                    ReportViewer rptViewer = (ReportViewer)MDImain.ActiveMdiChild;

                    IVRRejects myReportObject = new IVRRejects();
                    myReportObject.SetDataSource(IVR);
                    myReportObject.SetParameterValue("gsUserID", Program.gsUserID);
                    myReportObject.SetParameterValue("gsUserName", Program.gsUserName);
                    myReportObject.SetParameterValue("gsTitle", "IVR PAYMENT REJECTS REPORT");
                    rptViewer.crystalReportViewer.ReportSource = myReportObject;
                    rptViewer.crystalReportViewer.Refresh();
                    rptViewer.Show();
                }
            }

            if (SQLBR.RunJob("IVRToPayment", "Move IVR to PAYMENT", false))
            {
                Thread.Sleep(5000);
                try
                {
                    PAYMENTTableAdapter.FillByAll(PCPAY.PAYMENT);
                }
                catch
                {
                    PAYMENTTableAdapter.FillByAll(PCPAY.PAYMENT);
                }
            }
            PCPAY.IVRPAY.Clear();

            IVRPAYTableAdapter.Dispose();
            PAYMENTTableAdapter.Dispose();

            PCPAY.Dispose();
        }