Beispiel #1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        CamperAppl = new CamperApplication();

        if (!IsPostBack)
        {
            // 2015-10-15 usng PJGTC code no longer means we route to PJL
            if (Session["codeValue"] != null)
            {
                if (Session["codeValue"].ToString() == "1")
                {
                    var fedId = Convert.ToInt32(FederationEnum.PJL).ToString();
                    Session["FedId"] = fedId;
                    CamperAppl.UpdateFederationId(Session["FJCID"].ToString(), fedId);
                    Response.Redirect("PJL/Summary.aspx");
                }
                else if (Session["codeValue"].ToString() == "11")
                {
                    var fedId = Convert.ToInt32(FederationEnum.Oshman).ToString();
                    Session["FedId"] = fedId;
                    CamperAppl.UpdateFederationId(Session["FJCID"].ToString(), fedId);
                    Response.Redirect("Oshman/Summary.aspx");
                }
            }

            getCamps();

            if (Session["FJCID"] != null)
            {
                hdnFJCIDStep1_NL.Value = (string)Session["FJCID"];
                getCamperAnswers();
            }
        }
    }
Beispiel #2
0
    protected void lnkCopyApp_Click(object sender, EventArgs e)
    {
        var camperAppl = new CamperApplication();

        var redirectionLogic = new Redirection_Logic();

        string newFJCID;

        camperAppl.CopyCamperApplication(Session["FJCID"].ToString(), out newFJCID);
        redirectionLogic.PageName = (int)Redirection_Logic.PageNames.ThankYou;// Added this flag to avoid confusion of setting federation id if new app is created and set the newfederationid =0
        redirectionLogic.GetNextFederationDetails(Session["FJCID"].ToString());
        int nextFederationId = redirectionLogic.NextFederationId;

        if ((nextFederationId == 72 || nextFederationId == 93) && !String.IsNullOrEmpty(newFJCID))
        {
            camperAppl.DeleteCamperAnswerUsingFJCID(newFJCID);
        }

        if (nextFederationId == 0)
        {
            Session["FedId"] = null;
        }
        else
        {
            Session["FedId"] = nextFederationId.ToString();
        }

        Session["FJCID"]  = newFJCID;
        Session["STATUS"] = 5;



        // 2013-10-31 we must delete the codeValue Session variable
        if (redirectionLogic.BeenToPJL)
        {
            Session["codeValue"] = null;
        }

        // 2014-10-15 no one should pass to PJL now because PJL only accept JDS users but JDS users are routed to PJ Lottery already
        // all other failed applicants must
        if (redirectionLogic.NextFederationURL == "~/Enrollment/PJL/Summary.aspx")
        {
            camperAppl.UpdateFederationId(Session["FJCID"].ToString(), "0");
            redirectionLogic.NextFederationId = 0;
            Session["FedId"]     = null;
            Session["codeValue"] = null;
            Response.Redirect("Step1_NL.aspx");
        }
        else
        {
            camperAppl.UpdateFederationId(Session["FJCID"].ToString(), nextFederationId.ToString());
            Response.Redirect(redirectionLogic.NextFederationURL);
        }
    }
Beispiel #3
0
    protected void btnNext_Click(object sender, EventArgs e)
    {
        if (Session["FJCID"] != null)
        {
            General oGen = new General();
            if (oGen.IsApplicationSubmitted(Session["FJCID"].ToString()))
            {
                SubmittedApplicationRedirection();
            }
        }

        string strURL = GetNationalProgramForCamp(); //2013-09-14 this crazy function will set the hdnFEDID and Session["FedId"] as well, bad programming

        string strFEDID = hdnFEDID.Value;
        string strFJCID = hdnFJCIDStep1_NL.Value;

        //to update the Federation Id for the particular FJCID
        //this will take care of federation changes for a particular application
        //(Fed Id which were not be identified in step1.aspx will be identified here and updated
        if (strFEDID != string.Empty)
        {
            CamperAppl.UpdateFederationId(strFJCID, strFEDID);
        }

        InsertCamperAnswers();

        // 2013-10-08 CampID session must be set here, if we have to redirect to holding page in the next part of code
        string campID = ddlCamp.SelectedValue;

        Session["CampID"] = campID;
        Session["FJCID"]  = strFJCID;

        bool isClosed = (from id in ConfigurationManager.AppSettings["OpenFederations"].Split(',')
                         where id == strFEDID
                         select id).Count() < 1;

        if (isClosed)
        {
            Response.Redirect("~/NLIntermediate.aspx");
        }

        if (ddlCamp.SelectedItem.Text == "URJ Six Points Sports Academy")
        {
            if (strURL.ToUpper().Contains("URJ/"))
            {
                strURL = strURL.Replace("URJ/", "URJ/Acadamy");
            }
        }

        Response.Redirect(strURL, false);
    }
Beispiel #4
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            var fjcid     = Session["FJCID"].ToString();
            var camperApp = new CamperApplication();
            camperApp.UpdateFederationId(fjcid, ((int)FederationEnum.WashingtonDC).ToString());
            Session["FedId"] = (int)FederationEnum.WashingtonDC;


            int    FedID      = Convert.ToInt32(FederationEnum.WashingtonDC);
            string FED_ID     = FedID.ToString();
            bool   isDisabled = ConfigurationManager.AppSettings["DisableOnSummaryPageFederations"].Split(',').Any(x => x == FED_ID);

            // Session UserID == null means current logged user is regular camper, not admin.  We don't want to block admins from accessing the application even if the program is in closed state.
            if (isDisabled && Session["UsrID"] == null)
            {
                tblDisable.Visible = true;
                tblRegular.Visible = false;

                if (Session["SpecialCodeValue"] != null)
                {
                    string currentCode = Session["SpecialCodeValue"].ToString();
                    int    CampYearID  = Convert.ToInt32(Application["CampYearID"]);

                    if (SpecialCodeManager.GetAvailableCodes(CampYearID, FedID).Any(x => x == currentCode))
                    {
                        tblDisable.Visible          = false;
                        tblRegular.Visible          = true;
                        Session["isGrantAvailable"] = true;
                    }
                    else if (SessionSpecialCode.GetPJLotterySpecialCode() == "PJGTC2017")
                    {
                        tblDisable.Visible   = false;
                        tblRegular.Visible   = false;
                        tblPJLottery.Visible = true;

                        ScriptManager.RegisterStartupScript(this, GetType(), "replacePageHeaderText", "replacePageHeaderText();", true);
                    }
                }
            }
            else
            {
                tblDisable.Visible = false;
                tblRegular.Visible = true;
            }
        }
    }
Beispiel #5
0
    protected void btnNext_Click(object sender, EventArgs e)
    {
        var fjcid     = Session["FJCID"].ToString();
        var camperApp = new CamperApplication();

        camperApp.UpdateFederationId(fjcid, ((int)FederationEnum.PJL).ToString());
        var previousFedID = Session["FedId"].ToString();

        Session["FedId"] = (int)FederationEnum.PJL;

        camperApp.InsertCamperAnswers(fjcid, "3~3~", Master.UserId, "PJL Lottery - delete Q1");

        var nextUrl = "Step2_2.aspx";

        if (Request.QueryString["prev"] != null)
        {
            nextUrl += "?prev=" + Request.QueryString["prev"] + "&prevfedid=" + previousFedID;
        }
        Response.Redirect(nextUrl);
    }
Beispiel #6
0
 // added to redirect to either pjl or miip or NL page depending on inputs by sreevani
 protected void goldringcontinue_Click(object sender, EventArgs e)
 {
     if (Session["FJCID"] != null)
     {
         var    camperAppl           = new CamperApplication();
         string strFJCID             = Session["FJCID"].ToString();
         var    _objRedirectionLogic = new Redirection_Logic();
         _objRedirectionLogic.GetNextFederationDetails(strFJCID);
         int nextfederationid = _objRedirectionLogic.NextFederationId;
         camperAppl.UpdateFederationId(strFJCID, nextfederationid.ToString());
         Session["FedId"] = nextfederationid.ToString();
         if (nextfederationid == 48 || nextfederationid == 63)
         {
             Response.Redirect(_objRedirectionLogic.NextFederationURL);
         }
         else
         {
             Response.Redirect("~/Enrollment/Step1_NL.aspx");
         }
     }
 }
Beispiel #7
0
 protected void btnNext_Click(object sender, EventArgs e)
 {
     if (btnSaveandExit.Visible)
     {
         Response.Redirect("Step2_2.aspx");
     }
     else
     {
         // camp is closed
         // Check if PJ code is used.  If not, we go to the last option NL.
         if (Session["codeValue"] != null)
         {
             if (Session["codeValue"].ToString() == "1")
             {
                 CamperApplication CamperAppl = new CamperApplication();
                 Session["FedId"] = ConfigurationManager.AppSettings["PJL"].ToString();
                 CamperAppl.UpdateFederationId(Session["FJCID"].ToString(), "63");
                 Response.Redirect("../PJL/Summary.aspx");
             }
         }
         Response.Redirect("../Step1_NL.aspx");
     }
 }
Beispiel #8
0
    protected void Dallaslink_Click(object sender, EventArgs e)
    {
        CamperApplication CamperAppl = new CamperApplication();

        if (Session["FJCID"] != null)
        {
            string            strFJCID = Session["FJCID"].ToString();
            int               nextfederationid;
            Redirection_Logic _objRedirectionLogic = new Redirection_Logic();
            _objRedirectionLogic.GetNextFederationDetails(strFJCID);
            nextfederationid = _objRedirectionLogic.NextFederationId;
            CamperAppl.UpdateFederationId(strFJCID, nextfederationid.ToString());
            Session["FedId"] = nextfederationid.ToString();
            if (nextfederationid == 48 || nextfederationid == 63)
            {
                Response.Redirect(_objRedirectionLogic.NextFederationURL);
            }
            else
            {
                Response.Redirect("../Step1_NL.aspx");
            }
        }
    }
Beispiel #9
0
    protected void btnNext_Click(object sender, EventArgs e)
    {
        if (tblPJLottery.Visible)
        {
            var fjcid     = Session["FJCID"].ToString();
            var camperApp = new CamperApplication();

            camperApp.UpdateFederationId(fjcid, ((int)FederationEnum.PJL).ToString());
            var previousFedID = Session["FedId"].ToString();
            Session["FedId"] = (int)FederationEnum.PJL;

            var url = "../PJL/Summary.aspx?prev=" + HttpContext.Current.Request.Url.AbsolutePath + "&prevfedid=" + previousFedID;
            if (rdoYes.Checked)
            {
                camperApp.InsertCamperAnswers(fjcid, "7~4~", Master.UserId, "PJL Lottery - Set JDS");
                Session["STATUS"] = (int)StatusInfo.EligiblePJLottery;
            }
            else
            {
                camperApp.InsertCamperAnswers(fjcid, "7~999~", Master.UserId, "PJL Lottery - delete JDS");
                //url = "../PJL/Step2_2.aspx?prev=" + HttpContext.Current.Request.Url.AbsolutePath;
            }


            Response.Redirect(url);
            //else
            //{
            //    tblDisable.Visible = true;
            //    tblRegular.Visible = false;
            //    tblPJLottery.Visible = false;
            //}
        }
        else
        {
            Response.Redirect(tblRegular.Visible ? "Step2_2.aspx" : "../Step1_NL.aspx");
        }
    }
Beispiel #10
0
    void btnNext_Click(object sender, EventArgs e)
    {
        try
        {
            if (Page.IsValid)
            {
                string      strNextURL = string.Empty, strAction, strCamperUserId, strCheckUpdate, strFedId = string.Empty;
                UserDetails Info;
                DataSet     dsFed;
                DataRow     dr;
                int         iCount;

                // Siva - 12/03/2008 - start change to fix the age calculation problem when enter key is pressed
                DateTime CamperBirthDate = Convert.ToDateTime(txtDOB.Text);
                txtAge.Text = calculateAge(CamperBirthDate).ToString();
                // Siva - 12/03/2008 - end change

                //to get the user input values as struct object
                Info            = getUserInfoStructwithValues();
                strAction       = hdnPerformAction.Value;
                strCamperUserId = Master.CamperUserId;

                Session["ZIPCODE"] = Info.ZipCode;

                if (Session["FJCID"] != null)
                {
                    General oGen = new General();
                    if (oGen.IsApplicationSubmitted(Session["FJCID"].ToString()))
                    {
                        SubmittedApplicationRedirection();
                    }
                }

                if (Info.ModifiedBy == strCamperUserId && Session["FJCID"] != null)
                {
                    checkNationalProgramRedirection();
                }

                dsFed  = objGeneral.GetFederationForZipCode(Info.ZipCode);
                iCount = dsFed.Tables[0].Rows.Count;
                if (iCount > 0)
                {
                    if (iCount == 1)
                    {
                        dr       = dsFed.Tables[0].Rows[0];
                        strFedId = dr["Federation"].ToString();
                        //to check if the FedId is in the FedIds array declared above
                        if (doStep1questions(strFedId))
                        {
                            strNextURL         = strStep1QuestionsURL;
                            Session["ZIPCODE"] = Info.ZipCode; //zip code will be used in step1_questions.aspx
                        }
                        else //it is not jwest/orange/jwest la / la cip
                        {
                            //to get the navigation url for the federation based on the federation id
                            DataSet ds;
                            ds = objGeneral.GetFederationDetails(strFedId);
                            if (ds.Tables[0].Rows.Count > 0)
                            {
                                strNextURL = ds.Tables[0].Rows[0]["NavigationURL"].ToString();
                                //sesion[fedid] will be set only if it is not jwest or orange county
                                //for jwest and orange county it will be set in step1_questions.aspx
                                Session["FedId"] = strFedId;
                            }
                            else
                            {
                                strNextURL = "";
                            }
                        }
                    }
                    else if (iCount > 1)  //the zip code is applicable for both Jwest /Orange/jwest la / la cip
                    {
                        strFedId           = string.Empty;
                        strNextURL         = strStep1QuestionsURL;
                        Session["ZIPCODE"] = Info.ZipCode; //zip code will be used in step1_questions.aspx

                        //Ageks Grinberg
                        dr = dsFed.Tables[0].Rows[0];
                        string federationID = dr["Federation"].ToString();
                    }
                }
                else
                {
                    strFedId   = string.Empty;
                    strNextURL = strNationalURL;  //to be redirected to National Landing page
                }

                if (strAction == "INSERT")
                {
                    ProcessCamperInfo(Info);
                    hdnPerformAction.Value = "UPDATE";
                }
                else if (strAction == "UPDATE")
                {
                    strCheckUpdate = CheckforUpdate();
                    if ((Info.ModifiedBy == strCamperUserId) && (strCheckUpdate == "0")) //some modification done and user is not admin
                    {
                        ProcessCamperInfo(Info);
                    }
                }

                //to update the Federation Id for the particular FJCID
                //this will take care of federation changes for a particular application
                if (strFedId != string.Empty && strNextURL != strStep1QuestionsURL)
                {
                    CamperAppl.UpdateFederationId(hdnFJCID.Value, strFedId);
                }

                if (strNextURL == "")
                {
                    lblMessage.Visible = true;
                    lblMessage.Text    = "No Federation exists for the given Zip Code";
                }
                else
                {
                    Session["FJCID"] = hdnFJCID.Value;
                    Response.Redirect(strNextURL);
                }
            }
        }
        catch (Exception ex)
        {
            Response.Write(ex.Message);
        }
    }
Beispiel #11
0
    void btnNext_Click(object sender, EventArgs e)
    {
        int             iStatus;
        string          strModifiedBy, strFJCID;
        EligibilityBase objEligibility = EligibilityFactory.GetEligibility(FederationEnum.JWestLA);

        try
        {
            if (Page.IsValid)
            {
                if (!objGeneral.IsApplicationReadOnly(hdnFJCID.Value, Master.CamperUserId))
                {
                    ProcessCamperAnswers();
                }
                bool isReadOnly = objGeneral.IsApplicationReadOnly(hdnFJCID.Value, Master.CamperUserId);
                //Modified by id taken from the Master Id
                strModifiedBy = Master.UserId;
                strFJCID      = hdnFJCID.Value;
                if (strFJCID != "" && strModifiedBy != "")
                {
                    if (isReadOnly)
                    {
                        DataSet dsApp = CamperAppl.getCamperApplication(strFJCID);
                        iStatus = Convert.ToInt32(dsApp.Tables[0].Rows[0]["Status"]);
                    }
                    else
                    {
                        //to check whether the camper is eligible
                        objEligibility.checkEligibilityforStep2(strFJCID, out iStatus);
                    }

                    Session["STATUS"] = iStatus.ToString();

                    if (RadioBtnQ4.SelectedIndex == 1 && RadioBtnQ3.SelectedIndex == 1)
                    {
                        iStatus = Convert.ToInt32(StatusInfo.SystemInEligible);
                    }

                    if (iStatus != Convert.ToInt32(StatusInfo.SystemEligible))
                    {
                        if (Convert.ToInt32(Session["codeValue"]) == 1)                        // PJL Day School codes validation
                        {
                            if (Session["SpecialCodeValue"] != null)
                            {
                                CamperApplication oCA = new CamperApplication();
                                int validate          = oCA.validatePJLDSCode(Session["SpecialCodeValue"].ToString());
                                if (validate == 0 || validate == 2)
                                {
                                    oCA.updatePJLDSCode(Session["SpecialCodeValue"].ToString(), hdnFJCID.Value);
                                    Session["FJCID"] = hdnFJCID.Value;
                                    Session["FedId"] = ConfigurationManager.AppSettings["PJL"].ToString();
                                    CamperAppl.UpdateFederationId(Session["FJCID"].ToString(), "63");
                                    Response.Redirect("~/Enrollment/PJL/Summary.aspx");
                                }
                            }
                        }
                        else
                        {
                            Response.Redirect("~/Enrollment/Step1_NL.aspx");
                        }
                    }
                }
                Session["FJCID"] = hdnFJCID.Value;
                Response.Redirect("Step2_3.aspx");
            }
        }
        catch (Exception ex)
        {
            Response.Write(ex.Message);
        }
    }
Beispiel #12
0
    private void CheckFederationNavigation(string eventType)
    {
        string strURL, strComments, strModifiedBy, strFJCID;

        DataRow drFedDetails;

        strModifiedBy = Master.UserId;
        strURL        = strFJCID = string.Empty;
        int RowsAffected = 0;

        if (Session["FJCID"] != null)
        {
            strFJCID     = Session["FJCID"].ToString();
            drFedDetails = SubmittedApplicationRedirection();
            if (objGeneral.IsApplicationSubmitted(Session["FJCID"].ToString()) && drFedDetails != null)
            {
                Response.Redirect(drFedDetails["NavigationURL"].ToString());
            }
        }
        if (strModifiedBy != "")
        {
            checkNationalProgramRedirection();
        }

        //strComments = txtComments.Text.Trim();
        strModifiedBy = Master.UserId;

        if (eventType == "National")
        {
            strURL = strNLURL;
            if (strFEDID != strCampsAiryLouiseId)
            {
                strFEDID       = strCampsAiryLouiseId;
                bPerformUpdate = true;
            }
        }
        else if (eventType == "Next")
        {
            strURL = strWashingtonCampAiryLouiseURL;
            if (strFEDID != strWashingtonDCId)
            {
                strFEDID       = strWashingtonDCId;
                bPerformUpdate = true;
            }
        }

        //to update the Federation Id for the particular FJCID
        //this will take care of federation changes for a particular application
        //(Fed Id which were not be identified in step1.aspx will be identified here and updated
        if (strFEDID != string.Empty && bPerformUpdate)
        {
            CamperAppl.UpdateFederationId(strFJCID, strFEDID);
            Session["FedId"] = strFEDID;
        }

        /*if (strFJCID != "" && strModifiedBy != "" && bPerformUpdate)
         *  RowsAffected = CamperAppl.InsertCamperAnswers(strFJCID, "~~", strModifiedBy, strComments);*/

        if (strURL.Equals(string.Empty))  //then no federation exists for the grade entered
        {
            lblMessage.Visible = true;
            lblMessage.Text    = "No Federation exists for the entered Grade";
        }
        else
        {
            Response.Redirect(strURL, false);
        }
    }