コード例 #1
0
        private void dataGridViewCustLookup_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            string lsCustomer_Type = "";

            if (iacDataSet1.OPNCLSCUSTOMER.Count > 0 && dataGridViewCustLookup.SelectedRows.Count > 0)
            {
                Program.gsKey   = dataGridViewCustLookup.SelectedRows[0].Cells["cUSTOMERNODataGridViewTextBoxColumn"].Value.ToString().TrimEnd();
                lsCustomer_Type = dataGridViewCustLookup.SelectedRows[0].Cells["cUSTOMERIACTYPEDataGridViewTextBoxColumn"].Value.ToString().TrimEnd();
                MDIIAC2013 MDImain = (MDIIAC2013)MdiParent;
                if (lsCustomer_Type == "O")
                {
                    MDImain.CreateFormInstance("frmOpenCustMaint", false);
                }
                else
                {
                    MDImain.CreateFormInstance("frmCustMaint", false);
                }
            }
            // Moses Newman 11/27/2012 Why not keep deep search open until user wants to exit it!
            //Close();
            iacDataSet1.Clear();
            ClearAllFields();
            Refresh();
            Show();
        }
コード例 #2
0
        private void buttonCreateECHNotices_Click(object sender, EventArgs e)
        {
            if (checkBoxTestOnly.Checked)
            {
                // Moses Newman 11/9/2014 if test mode add test email address(s) to Email table.
                IACDataSetTableAdapters.EmailTableAdapter EmailTableAdapter = new IACDataSetTableAdapters.EmailTableAdapter();
                EmailTableAdapter.UpdateTestEmail(textBoxTestEmail.Text.TrimStart().TrimEnd());
                EmailTableAdapter.Dispose();
                EmailTableAdapter = null;
            }
            ldDueDate       = (DateTime)nullableDateTimePicker1.Value;
            lbSMS           = false;
            lsMergeFileName = (String)listBoxMergeFileName.Items[listBoxMergeFileName.SelectedIndex];
            if (comboBoxDayDue.Text.TrimEnd() == "")
            {
                lnDayDue = 0;
            }
            else
            {
                lnDayDue = Convert.ToInt32(comboBoxDayDue.Text);
            }
            MDIIAC2013 MDImain = (MDIIAC2013)MdiParent;

            lfrm   = new QueryProgress();
            worker = new BackgroundWorker();
            worker.WorkerReportsProgress = true;
            worker.DoWork             += new DoWorkEventHandler(worker_DoMailMerge);
            worker.RunWorkerCompleted += new RunWorkerCompletedEventHandler(worker_RunWorkerCompleted);
            worker.ProgressChanged    += new ProgressChangedEventHandler(worker_ProgressChanged);
            worker.RunWorkerAsync();
            lfrm.Text             = "EFT Email Notices";
            lfrm.lblProgress.Text = "Creating EFT Email Notices";
            lfrm.ShowDialog();
            Clipboard.Clear();
        }
コード例 #3
0
        private void button2_Click(object sender, EventArgs e)
        {
            lnDayDue  = Convert.ToInt32(comboBoxDayDue.Text);
            ldDueDate = (DateTime)nullableDateTimePicker1.Value;
            lbSMS     = true;
            if (comboBoxDayDue.Text.TrimEnd() == "")
            {
                lnDayDue = 0;
            }
            else
            {
                lnDayDue = Convert.ToInt32(comboBoxDayDue.Text);
            }
            MDIIAC2013 MDImain = (MDIIAC2013)MdiParent;

            lfrm   = new QueryProgress();
            worker = new BackgroundWorker();
            worker.WorkerReportsProgress = true;
            worker.DoWork             += new DoWorkEventHandler(worker_DoMailMerge);
            worker.RunWorkerCompleted += new RunWorkerCompletedEventHandler(worker_RunWorkerCompleted);
            worker.ProgressChanged    += new ProgressChangedEventHandler(worker_ProgressChanged);
            worker.RunWorkerAsync();
            lfrm.Text             = "EFT SMS Notices";
            lfrm.lblProgress.Text = "Creating SMS Notices";
            lfrm.ShowDialog();
        }
コード例 #4
0
        private void buttonPost_Click(object sender, EventArgs e)
        {
            Hide();
            MDIIAC2013 MDImain = (MDIIAC2013)MdiParent;

            MDImain.CreateFormInstance("ReportViewer", false);
            ReportViewer rptViewr = (ReportViewer)MDImain.ActiveMdiChild;

            PrintDealerHistory(rptViewr);
            Close();
        }
コード例 #5
0
        private void buttonPost_Click(object sender, EventArgs e)
        {
            MDIIAC2013 MDImain = (MDIIAC2013)MdiParent;

            lfrm   = new QueryProgress();
            worker = new BackgroundWorker();
            worker.WorkerReportsProgress = true;
            worker.DoWork             += new DoWorkEventHandler(worker_PostAddOns);
            worker.RunWorkerCompleted += new RunWorkerCompletedEventHandler(worker_RunWorkerCompleted);
            worker.ProgressChanged    += new ProgressChangedEventHandler(worker_ProgressChanged);
            worker.RunWorkerAsync();
            lfrm.Text             = "Open Dealer AddOn Posting";
            lfrm.lblProgress.Text = "Posting Open Dealer AddOns";
            lfrm.ShowDialog();
        }
コード例 #6
0
        private void buttonPrint_Click(object sender, EventArgs e)
        {
            //String deletePath = "";
            //SQLBackupandRestore SQLBR = new SQLBackupandRestore();
            Hide();
            MDIIAC2013 MDImain = (MDIIAC2013)MdiParent;

            MDImain.CreateFormInstance("ReportViewer", false);
            ReportViewer rptViewer = (ReportViewer)MDImain.ActiveMdiChild;

            IACDataSet ReportDataSet = new IACDataSet();

            IACDataSetTableAdapters.ClosedCustomerShortBalanceTableAdapter ClosedCustomerShortBalanceTableAdapter = new IACDataSetTableAdapters.ClosedCustomerShortBalanceTableAdapter();

            ClosedCustomerShortBalanceTableAdapter.Fill(ReportDataSet.ClosedCustomerShortBalance);

            if (ReportDataSet.ClosedCustomerShortBalance.Rows.Count == 0)
            {
                MessageBox.Show("*** Sorry there are no Customers with Short Balances! ***");
            }
            else
            {
                /*
                 * deletePath = ReportDataSet.DataPath.Rows[0].Field<String>("Path").TrimEnd();
                 *
                 * deletePath += @"EXCLDATA\CustomerRepoExtract.xls";
                 *
                 * if(System.IO.File.Exists(deletePath))
                 *  System.IO.File.Delete(deletePath);*/
                ShortBalanceReport myReportObject = new ShortBalanceReport();
                myReportObject.SetDataSource(ReportDataSet);
                myReportObject.SetParameterValue("gsUserID", Program.gsUserID);
                myReportObject.SetParameterValue("gsUserName", Program.gsUserName);
                rptViewer.crystalReportViewer.ReportSource = myReportObject;
                rptViewer.crystalReportViewer.Refresh();
                rptViewer.Show();
                //SQLBR.CustomerRepoExtractJob();
            }
            //SQLBR.Dispose();
            //SQLBR = null;
            Close();
        }
コード例 #7
0
        private void PrintDelinquencyReport()
        {
            DateTime ldCurrDate = ((DateTime)(nullableDateTimePickerDueDate.Value)).Date;

            IACDataSet DelinquencyData = new IACDataSet();

            IACDataSetTableAdapters.ClosedDealerAgedSummarySelectTableAdapter    ClosedDealerAgedSummarySelectTableAdapter    = new IACDataSetTableAdapters.ClosedDealerAgedSummarySelectTableAdapter();
            IACDataSetTableAdapters.ClosedDealerAgedSummarySelectCOLTableAdapter ClosedDealerAgedSummarySelectCOLTableAdapter = new IACDataSetTableAdapters.ClosedDealerAgedSummarySelectCOLTableAdapter();
            IACDataSetTableAdapters.CUSTOMERTableAdapter CUSTOMERTableAdapter = new IACDataSetTableAdapters.CUSTOMERTableAdapter();
            IACDataSetTableAdapters.DEALERTableAdapter   DEALERTableAdapter   = new IACDataSetTableAdapters.DEALERTableAdapter();
            Int32 lnAgedTest = comboBoxAgedPeriod.SelectedIndex + 1;

            // Moses Newman 11/20/2018 add sort order.
            String lsSortType = null;

            if (comboBoxSortType.SelectedIndex == 1)
            {
                lsSortType = "D";
            }

            MDIIAC2013 MDImain = (MDIIAC2013)MdiParent;

            switch (lnAgedTest)
            {
            case 1:
            case 2:
            case 3:
            case 4:
            case 5:
            case 6:

                if (!checkBoxCollections.Checked)
                {
                    CUSTOMERTableAdapter.FillByDelinquencies(DelinquencyData.CUSTOMER, lnAgedTest, ldCurrDate, lsSortType);
                    // Moses Newman 11/19/2013 Moses Newman added ldCurrDate as new parameter to DealerFillByDelinQuencies Query
                    DEALERTableAdapter.FillByDelinquencies(DelinquencyData.DEALER, lnAgedTest, ldCurrDate);

                    if (DelinquencyData.CUSTOMER.Rows.Count != 0 && DelinquencyData.DEALER.Rows.Count != 0)
                    {
                        Hide();
                        MDImain.CreateFormInstance("ReportViewer", false);
                        ReportViewer rptViewer = (ReportViewer)MDImain.ActiveMdiChild;

                        ClosedCustomerDelinquency myReportObject = new ClosedCustomerDelinquency();
                        myReportObject.SetDataSource(DelinquencyData);
                        myReportObject.SetParameterValue("gsUserID", Program.gsUserID);
                        myReportObject.SetParameterValue("gsUserName", Program.gsUserName);
                        myReportObject.SetParameterValue("gnAgedMonths", comboBoxAgedPeriod.SelectedIndex + 1);
                        myReportObject.SetParameterValue("gdCurrentDate", ldCurrDate);
                        rptViewer.crystalReportViewer.ReportSource = myReportObject;
                        rptViewer.crystalReportViewer.Refresh();
                        rptViewer.Show();
                    }
                }
                else
                {
                    CUSTOMERTableAdapter.FillByDelinquenciesCOL(DelinquencyData.CUSTOMER, lnAgedTest, ldCurrDate, lsSortType);
                    // Moses Newman 11/19/2013 Moses Newman added ldCurrDate as new parameter to DealerFillByDelinQuencies Query
                    DEALERTableAdapter.FillByDelinquenciesCOL(DelinquencyData.DEALER, lnAgedTest, ldCurrDate);
                    if (DelinquencyData.CUSTOMER.Rows.Count != 0 && DelinquencyData.DEALER.Rows.Count != 0)
                    {
                        Hide();
                        MDImain.CreateFormInstance("ReportViewer", false);
                        ReportViewer rptViewer = (ReportViewer)MDImain.ActiveMdiChild;

                        ClosedCustomerDelinquencyCOL myReportObject = new ClosedCustomerDelinquencyCOL();
                        myReportObject.SetDataSource(DelinquencyData);
                        myReportObject.SetParameterValue("gsUserID", Program.gsUserID);
                        myReportObject.SetParameterValue("gsUserName", Program.gsUserName);
                        myReportObject.SetParameterValue("gnAgedMonths", comboBoxAgedPeriod.SelectedIndex + 1);
                        myReportObject.SetParameterValue("gdCurrentDate", ldCurrDate);
                        rptViewer.crystalReportViewer.ReportSource = myReportObject;
                        rptViewer.crystalReportViewer.Refresh();
                        rptViewer.Show();
                    }
                }
                break;

            case 7:
                if (!checkBoxCollections.Checked)
                {
                    ClosedDealerAgedSummarySelectTableAdapter.SetCommandTimeout(360);
                    ClosedDealerAgedSummarySelectTableAdapter.Fill(DelinquencyData.ClosedDealerAgedSummarySelect, ldCurrDate);
                    if (DelinquencyData.ClosedDealerAgedSummarySelect.Rows.Count != 0)
                    {
                        Hide();
                        MDImain.CreateFormInstance("ReportViewer", false);
                        ReportViewer rptViewer = (ReportViewer)MDImain.ActiveMdiChild;

                        ClosedCustomerDelinquencySummary myReportObject = new ClosedCustomerDelinquencySummary();
                        myReportObject.SetDataSource(DelinquencyData);
                        myReportObject.SetParameterValue("gsUserID", Program.gsUserID);
                        myReportObject.SetParameterValue("gsUserName", Program.gsUserName);
                        myReportObject.SetParameterValue("gnAgedMonths", comboBoxAgedPeriod.SelectedIndex + 1);
                        myReportObject.SetParameterValue("gdCurrentDate", ldCurrDate);
                        rptViewer.crystalReportViewer.ReportSource = myReportObject;
                        rptViewer.crystalReportViewer.Refresh();
                        rptViewer.Show();
                    }
                }
                else     // Moses Newman 02/24/2015 Add Collections version of Delinquency Summary Report
                {
                    ClosedDealerAgedSummarySelectTableAdapter.SetCommandTimeout(360);
                    ClosedDealerAgedSummarySelectTableAdapter.Fill(DelinquencyData.ClosedDealerAgedSummarySelect, ldCurrDate);
                    ClosedDealerAgedSummarySelectCOLTableAdapter.Fill(DelinquencyData.ClosedDealerAgedSummarySelectCOL, ldCurrDate);
                    if (DelinquencyData.ClosedDealerAgedSummarySelect.Rows.Count != 0)
                    {
                        Hide();
                        MDImain.CreateFormInstance("ReportViewer", false);
                        ReportViewer rptViewer = (ReportViewer)MDImain.ActiveMdiChild;

                        ClosedCustomerDelinquencySummaryCOL myReportObject = new ClosedCustomerDelinquencySummaryCOL();
                        myReportObject.SetDataSource(DelinquencyData);
                        myReportObject.SetParameterValue("gsUserID", Program.gsUserID);
                        myReportObject.SetParameterValue("gsUserName", Program.gsUserName);
                        myReportObject.SetParameterValue("gnAgedMonths", comboBoxAgedPeriod.SelectedIndex + 1);
                        myReportObject.SetParameterValue("gdCurrentDate", ldCurrDate);
                        rptViewer.crystalReportViewer.ReportSource = myReportObject;
                        rptViewer.crystalReportViewer.Refresh();
                        rptViewer.Show();
                    }
                }
                break;

            case 8:
                /*
                 * IACDataSetTableAdapters.RepoCodesTableAdapter RepoCodesTableAdapter = new IACDataSetTableAdapters.RepoCodesTableAdapter();
                 * IACDataSetTableAdapters.VEHICLETableAdapter VEHICLETableAdapter = new IACDataSetTableAdapters.VEHICLETableAdapter();
                 * CUSTOMERTableAdapter.FillByDelinquenciesCOL(DelinquencyData.CUSTOMER, 9, ldCurrDate);
                 * // Moses Newman 11/19/2013 Moses Newman added ldCurrDate as new parameter to DealerFillByDelinQuencies Query
                 * DEALERTableAdapter.FillByDelinquenciesCOL(DelinquencyData.DEALER, 9, ldCurrDate);
                 * RepoCodesTableAdapter.Fill(DelinquencyData.RepoCodes);
                 * VEHICLETableAdapter.FillByRepo(DelinquencyData.VEHICLE);
                 * if (DelinquencyData.CUSTOMER.Rows.Count != 0 && DelinquencyData.DEALER.Rows.Count != 0)
                 * {
                 *  Hide();
                 *  MDImain.CreateFormInstance("ReportViewer", false);
                 *  ReportViewer rptViewer = (ReportViewer)MDImain.ActiveMdiChild;
                 *
                 *  ClosedCustomerDelinquencyRepoReport myReportObject = new ClosedCustomerDelinquencyRepoReport();
                 *  myReportObject.SetDataSource(DelinquencyData);
                 *  myReportObject.SetParameterValue("gsUserID", Program.gsUserID);
                 *  myReportObject.SetParameterValue("gsUserName", Program.gsUserName);
                 *  myReportObject.SetParameterValue("gnAgedMonths", 8);
                 *  myReportObject.SetParameterValue("gdCurrentDate", ldCurrDate);
                 *  rptViewer.crystalReportViewer.ReportSource = myReportObject;
                 *  rptViewer.crystalReportViewer.Refresh();
                 *  rptViewer.Show();
                 * }
                 * VEHICLETableAdapter.Dispose();
                 * RepoCodesTableAdapter.Dispose();*/
                break;
            }
            DelinquencyData.Clear();
            DelinquencyData.Dispose();

            CUSTOMERTableAdapter.Dispose();
            DEALERTableAdapter.Dispose();
            ClosedDealerAgedSummarySelectTableAdapter.Dispose();
            ClosedDealerAgedSummarySelectCOLTableAdapter.Dispose();
        }
コード例 #8
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();
        }