Example #1
0
        protected void FeeDisplay(object sender, EventArgs e)
        {
            RoutingRules router = new RoutingRules();

            if (campus.SelectedItem.Text == "Louisville")
            {
                account = "SullivanLouisville";
                emailTo = "*****@*****.**";
            }
            else if (campus.SelectedItem.Text == "Lexington")
            {
                account = "SullivanLexington";
                emailTo = "[email protected]; [email protected]";
            }
            else if (campus.SelectedItem.Text == "Online" || campus.SelectedValue == "Louisa")
            {
                emailTo = "[email protected]; [email protected]; [email protected]; [email protected]; [email protected]";

                if (campus.SelectedItem.Text == "Online")
                {
                    account = router.OnlineAccount(tbZipCode.Text);
                }
                else
                {
                    account = "SullivanLexington";
                }
            }

            Button1.PostBackUrl = "https://secure.sullivan.edu/Payments/PCAppPayments.aspx?account=" + account;
        }
Example #2
0
        protected void FeeDisplay(object sender, EventArgs e)
        {
            int paymentTotal = 0;

            RoutingRules router = new RoutingRules();

            if (Transcript.SelectedIndex > -1 && campus.SelectedValue != "0" && tbZipCode.Text.Count() > 0)
            {
                if (Transcript.SelectedItem.Text == "Yes")
                {
                    transcriptPanel.Visible = true;

                    paymentTotal += 15;
                }
                else
                {
                    transcriptPanel.Visible = false;
                }

                if (campus.SelectedItem.Text == "Fort Knox")
                {
                    transcriptPanel.Visible    = false;
                    enrollmentFeePanel.Visible = false;
                    paymentPanel.Visible       = false;
                    pnlFortKnox.Visible        = true;
                }
                else
                {
                    enrollmentFeePanel.Visible = true;

                    paymentTotal += 30;

                    if (campus.SelectedItem.Text == "Louisville")
                    {
                        account     = "SullivanLouisville";
                        emailTo     = "*****@*****.**";
                        description = "Sullivan Louisville Enrollment";
                    }
                    else if (campus.SelectedItem.Text == "Lexington")
                    {
                        account     = "SullivanLexington";
                        emailTo     = "[email protected]; [email protected]";
                        description = "Sullivan Lexington Enrollment";
                    }
                    else if (campus.SelectedItem.Text == "Online" || campus.SelectedValue == "Louisa" || campus.SelectedValue == "Northern Kentucky" || campus.SelectedValue == "CarlisleNicholas")
                    {
                        account     = router.OnlineAccount(tbZipCode.Text);
                        emailTo     = "[email protected]; [email protected]; [email protected]; [email protected]; [email protected]";
                        description = "Sullivan Online Enrollment";

                        if (campus.SelectedValue == "Louisa")
                        {
                            account     = "SullivanLexington";
                            description = "Sullivan Louisa Enrollment";
                        }
                        else if (campus.SelectedValue == "Northern Kentucky")
                        {
                            account     = "SullivanLouisville";
                            description = "Sullivan Northern Kentucky Enrollment";
                        }
                        else if (campus.SelectedValue == "CarlisleNicholas")
                        {
                            description = "Sullivan Carlisle/Nicholas Enrollment";
                            account     = "SullivanLexington";
                        }
                    }
                }

                sjAmount.Text = paymentTotal.ToString() + ".00";

                amount = paymentTotal.ToString() + ".00";

                //if ((campus.SelectedValue == "Louisa" || campus.SelectedValue == "Northern Kentucky") && Transcript.SelectedItem.Text == "No")
                //{
                //    paymentPanel.Visible = false;
                //    pnlSubmit.Visible = false;
                //    pnlNoPayment.Visible = true;
                //    pnlFortKnox.Visible = false;
                //}
                //else if (campus.SelectedItem.Text == "Fort Knox")
                //{
                //    paymentPanel.Visible = false;
                //    pnlSubmit.Visible = false;
                //    pnlNoPayment.Visible = false;
                //    pnlFortKnox.Visible = true;
                //}
                //else
                //{
                paymentPanel.Visible = true;
                pnlSubmit.Visible    = true;
                pnlNoPayment.Visible = false;
                pnlFortKnox.Visible  = false;
                //}

                ViewState["description"] = description;
                ViewState["account"]     = account;
                ViewState["amount"]      = amount;
                ViewState["emailTo"]     = emailTo;

                Button1.PostBackUrl = "https://secure.sullivan.edu/Payments/PCAppPayments.aspx?account=" + account;
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                string campus;

                RoutingRules router = new RoutingRules();

                gradEnrollmentFeePanel.Visible = false;

                string[] files = Directory.GetFiles(@"C:\Websites\DropFolder\Sullivan_Admissions\");

                if (Session["AllAttachments"] != null)
                {
                    Session["AllAttachments"] = allAttachments;

                    foreach (string attachment in allAttachments)
                    {
                        try
                        {
                            File.Delete(attachment);
                        }
                        catch
                        {

                        }
                    }
                }

                foreach (string file in files)
                {
                    if (File.GetCreationTime(file).AddMinutes(3.0) < DateTime.Now)
                    {
                        try
                        {
                            File.Delete(file);
                        }
                        catch { }
                    }
                }

                allAttachments.Clear();

                ViewState["Transcript"] = Session["Transcript"];
                ViewState["Campus"] = Session["Campus"];
                ViewState["enrollmentFee"] = Session["enrollmentFee"];
                ViewState["StudentName"] = Session["StudentName"];
                ViewState["CampusNumber"] = Session["CampusNumber"];
                ViewState["ZipCode"] = Session["ZipCode"];

                int paymentTotal = 0;

                campus = (string)ViewState["Campus"];

                if (campus == "Louisville")
                {
                    account = "SullivanLouisville";
                    emailTo = "*****@*****.**";
                    description = "Sullivan Louisville Enrollment";
                }
                else if (campus == "Lexington")
                {
                    account = "SullivanLexington";
                    emailTo = "[email protected]; [email protected]";
                    description = "Sullivan Lexington Enrollment";
                }
                else if (campus == "Online" || campus == "Louisa" || campus == "Northern Kentucky" || campus == "CarlisleNicholas")
                {
                    account = router.OnlineAccount((string)ViewState["ZipCode"]);
                    emailTo = "[email protected]; [email protected]; [email protected]; [email protected]; [email protected]";
                    description = "Sullivan Online Enrollment";

                    if (campus == "Louisa")
                    {
                        description = "Sullivan Louisa Enrollment";
                        account = "SullivanLexington";
                    }
                    else if (campus == "Northern Kentucky")
                    {
                        account = "SullivanLouisville";
                        description = "Sullivan Northern Kentucky Enrollment";
                    }
                    else if(campus == "CarlisleNicholas")
                    {
                        description = "Sullivan Carlisle/Nicholas Enrollment";
                        account = "SullivanLexington";
                    }
                }

                //Assign serial number (account number) according to campus
                try
                {
                    //sjAppEmails.Value = (string)Session["emailRecipients"];

                    if (ViewState["Transcript"].ToString() == "Yes")
                    {
                        transcriptPanel.Visible = true;

                        paymentTotal += 15;
                    }
                    else
                    {
                        transcriptPanel.Visible = false;
                    }

                    if ((string)ViewState["Campus"] == "Fort Knox")
                    {
                        transcriptPanel.Visible = false;
                        enrollmentFeePanel.Visible = false;
                        paymentPanel.Visible = false;
                        pnlSubmit.Visible = false;
                    }
                    else
                    {
                        if ((string)ViewState["enrollmentFee"] == "100.00" && (string)ViewState["Campus"] == "Online")
                        {
                            enrollmentFeePanel.Visible = false;
                            gradEnrollmentFeePanel.Visible = true;
                            pnlSubmit.Visible = true;
                            paymentPanel.Visible = true;
                            paymentTotal += 100;
                        }
                        else
                        {

                            enrollmentFeePanel.Visible = true;

                            paymentTotal += 30;
                        }
                    }

                    amount = paymentTotal.ToString() + ".00";

                    sjAmount.Text = amount;

                    //if (((string)ViewState["Campus"] == "Louisa" || (string)ViewState["Campus"] == "Northern Kentucky") && ViewState["Transcript"].ToString() == "No" && ViewState["enrollmentFee"].ToString() != "100.00")
                    //{
                    //    paymentPanel.Visible = false;
                    //    pnlSubmit.Visible = false;
                    //}

                    enrollmentFee = (string)ViewState["enrollmentFee"];
                }
                catch (Exception ex)
                {
                    Response.Redirect("PayFees.aspx");
                }

                ViewState["description"] = description;
                ViewState["account"] = account;
                ViewState["amount"] = amount;
                ViewState["emailTo"] = emailTo;

                Button1.PostBackUrl = "https://secure.sullivan.edu/Payments/PCAppPayments.aspx?account=" + account;

                //Assign amount, 100 for enrollment fee, optional housing fees
                //double Amount = 50.00;
                //sjAmount.Value = string.Format("{0:0.00}", Amount);
            }
            else
            {
                description = (string)ViewState["description"];
                account = (string)ViewState["account"];
                amount = (string)ViewState["amount"];
                emailTo = (string)ViewState["emailTo"];
            }
        }