Example #1
0
        /// <summary>
        /// Common code to use to check Eligibility called by all subclasses
        /// </summary>
        /// <param name="FJCID"></param>
        /// <param name="StatusValue"></param>
        /// <returns>true if eligibility was determined or false if more checking is needed</returns>
        protected bool checkEligibilityCommon(string FJCID, out int StatusValue)
        {
            CamperApplication CamperAppl = new CamperApplication();

            if (CamperAppl.CamperStatusDetectived(FJCID, (int)StatusInfo.SecondApproval))
            {
                //Get the current status of the camper
                StatusValue = GetCamperStatus(FJCID);

                CamperAppl = null;
                return(true);
            }

            CamperAppl  = null;
            StatusValue = 0;
            return(false);
        }
Example #2
0
    void ProcessCamperAnswers()
    {
        string strComments, strModifiedBy, strFJCID;
        //Boolean bAcceptOption1 = false, bAcceptOption2 = false, bAcceptOption3 = false;
        int iStatus = 0;

        //to get the comments (used only by the Admin user)
        strComments   = txtComments.Text.Trim();
        strModifiedBy = Master.UserId;
        strFJCID      = hdnFJCID_OtherInfo.Value;
        InsertStep4Answers();

        //the status value will be set in session once btncheckeligibility_click is fired in step2_3.aspx for any questionnaire
        if (Session["STATUS"] != null)
        {
            iStatus = Convert.ToInt32(Session["STATUS"]);
        }

        if (strFJCID != "" && strModifiedBy != "" && chkAgreement.Enabled)
        {
            // 2012-11-07 Added new status ID = 42 (Eligile;Contact Parents to resubmit application), so we have to check here and mark it as eligible
            if (iStatus == (int)StatusInfo.EligibleContactParentsAagain)
            {
                iStatus           = (int)StatusInfo.EligibleByStaff;
                Session["STATUS"] = iStatus;
            }

            // 2016-07-04 Remove "Eligible; No Camp" - this status is marked in every fed's eligbility class, so we change the status here instead of changing every place
            if (iStatus == (int)StatusInfo.EligibleNoCamp)
            {
                iStatus           = (int)StatusInfo.SystemInEligible;
                Session["STATUS"] = iStatus;
            }

            //to submit the application
            CamperAppl.submitCamperApplication(strFJCID, strComments, Convert.ToInt32(strModifiedBy), iStatus);
            //this will be called only if the logged in user is admin
            if (strModifiedBy != Master.CamperUserId) //session values are not cleared if the user is admin
            {
                if (!CamperAppl.CamperStatusDetectived(strFJCID, (int)StatusInfo.SecondApproval))
                {
                    CamperAppl.SetSecondApproval(strFJCID); //To avoid setting if second approval approved already
                }
            }
        }

        //***********
        //TV: 02/2009 - Issue # 4-006: Add actual email functionality for each email address
        //of "friends" that the applicant wants to "invite" to the FJC community (but only do this if the user
        //is the camper, and if the email textbox is enabled)
        if (Master.UserId == Master.CamperUserId && txtFriendsEmail.Enabled == true)
        {
            //one last check - make sure the EmailInvite feature has been enabled in the config file
            string sEnableEmailInvite = ConfigurationManager.AppSettings["EnableEmailInvite"];
            if (sEnableEmailInvite != null && sEnableEmailInvite.ToUpper() == "Y")
            {
                //send email invite to the camper's friend(s)
                try
                {
                    SendEmailInvite();
                }
                catch (Exception ex)
                {
                    throw new Exception(ex.Message +
                                        "<br />\"Email Invite\" errors are isolated and they should not affect the rest of the application.");
                }
            }
        }
        //***********
    }