示例#1
0
    void btnNext_Click(object sender, EventArgs e)
    {
        CheckForRedirect();

        bool isReadOnly = objGeneral.IsApplicationReadOnly(hdnFJCID.Value, Master.CamperUserId);

        if (!isReadOnly)
        {
            ProcessCamperAnswers();
        }

        //Modified by id taken from the Master Id
        string strModifiedBy = Master.UserId;
        string strFJCID      = hdnFJCID.Value;
        int    iStatus       = Convert.ToInt32(StatusInfo.SystemInEligible);

        if (strFJCID != "" && strModifiedBy != "")
        {
            if (isReadOnly)
            {
                DataSet dsApp = CamperAppl.getCamperApplication(strFJCID);
                iStatus = Convert.ToInt32(dsApp.Tables[0].Rows[0]["Status"]);
            }
            else
            {
                var objEligibility = EligibilityFactory.GetEligibility(FederationEnum.WashingtonDC);
                EligibilityBase.EligibilityResult result = objEligibility.checkEligibilityforStep2(strFJCID, out iStatus, SessionSpecialCode.GetPJLotterySpecialCode());

                if (result.SchoolType == StatusInfo.EligiblePJLottery)
                {
                    iStatus = (int)StatusInfo.EligiblePJLottery;
                }
                else if (result.CurrentUserStatusFromDB == StatusInfo.SystemInEligible ||
                         result.Grade == StatusInfo.SystemInEligible ||
                         result.SchoolType == StatusInfo.SystemInEligible ||
                         result.TimeInCamp == StatusInfo.SystemInEligible)
                {
                    iStatus = (int)StatusInfo.SystemInEligible;
                }
                else
                {
                    iStatus = (int)StatusInfo.SystemEligible;
                }
            }
            Session["STATUS"] = iStatus.ToString();
        }
        Session["FJCID"] = hdnFJCID.Value;

        var status = (StatusInfo)iStatus;

        Response.Redirect(AppRouteManager.GetNextRouteBasedOnStatus(status, HttpContext.Current.Request.Url.AbsolutePath));
    }
示例#2
0
    void btnNext_Click(object sender, EventArgs e)
    {
        bool isReadOnly = objGeneral.IsApplicationReadOnly(hdnFJCIDStep2_2.Value, Master.CamperUserId);

        if (!isReadOnly)
        {
            ProcessCamperAnswers();
        }

        //Modified by id taken from the Master Id
        string strModifiedBy = Master.UserId;
        string strFJCID      = hdnFJCIDStep2_2.Value;
        int    iStatus       = Convert.ToInt32(StatusInfo.SystemInEligible);

        if (strFJCID != "" && strModifiedBy != "")
        {
            if (isReadOnly)
            {
                DataSet dsApp = CamperAppl.getCamperApplication(strFJCID);
                iStatus = Convert.ToInt32(dsApp.Tables[0].Rows[0]["Status"]);
            }
            else
            {
                var objEligibility = EligibilityFactory.GetEligibility(FederationEnum.Atlanta);
                EligibilityBase.EligibilityResult result = objEligibility.checkEligibilityforStep2(strFJCID, out iStatus, SessionSpecialCode.GetPJLotterySpecialCode());

                if (result.SchoolType == StatusInfo.EligiblePJLottery)
                {
                    iStatus = (int)StatusInfo.EligiblePJLottery;
                }
                else if (result.CurrentUserStatusFromDB == StatusInfo.SystemInEligible ||
                         result.Grade == StatusInfo.SystemInEligible ||
                         result.SchoolType == StatusInfo.SystemInEligible ||
                         result.TimeInCamp == StatusInfo.SystemInEligible)
                {
                    iStatus = (int)StatusInfo.SystemInEligible;
                }
                //else if (rdoNo160.Checked)
                //{
                //    // 2015-01-07 If Income is not less thant $160K, we make them ineligible.
                //    iStatus = (int)StatusInfo.SystemInEligible;
                //}
                //else
                //{
                //    iStatus = (int) StatusInfo.SystemEligible;
                //}

                if (rdoFirstTimerNo.Checked || rdoFirstTimerNo11days.Checked)
                {
                    iStatus = (int)StatusInfo.SystemInEligible;
                }

                //if (iStatus == (int)StatusInfo.SystemEligible)
                //{
                //    if (rdoFirstTimerNo.Checked)
                //    {
                //        if (rdoLastYearNo.Checked)
                //            iStatus = (int)StatusInfo.SystemInEligible;
                //        else if (rdoLastYearYes.Checked)
                //        {
                //            if (rdoNo160.Checked)
                //                iStatus = (int)StatusInfo.SystemInEligible;
                //        }
                //    }
                //}
            }
            Session["STATUS"] = iStatus.ToString();
        }
        Session["FJCID"] = hdnFJCIDStep2_2.Value;

        var status = (StatusInfo)iStatus;

        Response.Redirect(AppRouteManager.GetNextRouteBasedOnStatus(status, HttpContext.Current.Request.Url.AbsolutePath));
    }