Esempio n. 1
0
        private void btnEMail_Click(object sender, EventArgs e)
        {
            if (txtSponsor.Text.Trim() == "")
            {
                MessageBox.Show("Please select Sponsor.", Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                return;
            }
            AcctgRpt rpt = new AcctgRpt();

            rpt.WindowState = FormWindowState.Maximized;
            rpt.rptName     = "SOA";
            rpt.nQ          = 3;
            rpt.nSpID       = Convert.ToInt16(txtSponsorID.Text);
            try
            {
                rpt.Show();
            }
            catch { }
            rpt.Close(); rpt.Dispose();
            txtSponsorID.ReadOnly = true; txtSponsor.ReadOnly = true; picSponsors.Enabled = false;
            btnEMail.Enabled      = false; btnPrtPreview.Enabled = false; btnClose.Enabled = false; pnlEMail.Enabled = true;
            lnkFile.Text          = @"\\PSAPP01\IT Files\PTS\PDF Reports\SOA\" + DateTime.Now.Year.ToString() + @"\SOA-" + txtSponsorID.Text + ".pdf";

            //Get AP Email Address
            DataTable dt = PSSClass.Sponsors.APData(Convert.ToInt16(txtSponsorID.Text));

            txtTo.Text = dt.Rows[0]["APEMail"].ToString();
            dt.Dispose();

            txtSubject.Text = "Statement of Account";
            txtBody.Text    = txtBody.Text + "Dear Accounts Payable," + Environment.NewLine + Environment.NewLine;
            txtBody.Text    = txtBody.Text + "Attached is the updated Statement for your review." + Environment.NewLine + Environment.NewLine;
            txtBody.Text    = txtBody.Text + "Please let us know if you need a copy of any of the invoices." + Environment.NewLine + Environment.NewLine;
            txtBody.Text    = txtBody.Text + "If you have any questions/inquiries, please feel free to contact us." + Environment.NewLine + Environment.NewLine;
        }
Esempio n. 2
0
        private void btnOKPrint_Click(object sender, EventArgs e)
        {
            if (txtSponsorID.Text == "")
            {
                MessageBox.Show("Please select Sponsor.", Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                return;
            }
            if (cboPO.SelectedIndex == -1)
            {
                MessageBox.Show("Please select PO No.", Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                return;
            }

            AcctgRpt rpt = new AcctgRpt();

            rpt.WindowState = FormWindowState.Maximized;
            rpt.rptName     = "POBalance";
            rpt.nQ          = 1;
            if (rdoPreBilled.Checked == true)
            {
                rpt.nPOBType = 1;
            }
            else
            {
                rpt.nPOBType = 2;
            }
            rpt.nSpID = Convert.ToInt16(txtSponsorID.Text);
            rpt.strPO = cboPO.Text;
            try
            {
                rpt.Show();
            }
            catch { }
        }
Esempio n. 3
0
        private void GenerateReport()
        {
            if (nRNo == 1)
            {
                DisplaySummary();
            }
            else
            {
                AcctgRpt rpt = new AcctgRpt();
                if (nRNo == 2)
                {
                    rpt.rptName = "Invoices To Be Posted - Sorted by Sponsor ASC";
                }
                else if (nRNo == 3)
                {
                    rpt.rptName = "Comparative Revenue Report";
                }
                else if (nRNo == 4)
                {
                    rpt.rptName = "Comparative Revenue Report - Grouped by Sponsor";
                }
                else if (nRNo == 5)
                {
                    rpt.rptName = "Exceptions List";
                }
                else if (nRNo == 6)
                {
                    rpt.rptName = "Invoices To Be Posted";
                }
                else if (nRNo == 7)
                {
                    rpt.rptName = "Invoices To Be Posted - Grouped by Sponsor";
                }
                else if (nRNo == 8)
                {
                    rpt.rptName = "TTM";
                }


                rpt.dteStart = dtpStart.Value;
                rpt.dteEnd   = dtpEnd.Value;

                try
                {
                    rpt.Show();
                }
                catch (Exception ex)
                {
                    MessageBox.Show(ex.Message);
                }
            }
        }
Esempio n. 4
0
        private void btnPOBalSum_Click(object sender, EventArgs e)
        {
            AcctgRpt rpt = new AcctgRpt();

            rpt.WindowState = FormWindowState.Maximized;
            rpt.rptName     = "POBalanceSum";
            rpt.nQ          = 1;
            try
            {
                rpt.Show();
            }
            catch { }
        }
Esempio n. 5
0
        private void btnPrtPreview_Click(object sender, EventArgs e)
        {
            if (txtSponsor.Text.Trim() == "")
            {
                MessageBox.Show("Please select Sponsor.", Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                return;
            }
            AcctgRpt rpt = new AcctgRpt();

            rpt.WindowState = FormWindowState.Maximized;
            rpt.rptName     = "SOA";
            //if (chkPDF.Checked == true)
            //    rpt.nQ = 3;
            //else
            rpt.nQ    = 1;
            rpt.nSpID = Convert.ToInt16(txtSponsorID.Text);
            try
            {
                rpt.Show();
            }
            catch { }
        }