void btnNext_Click(object sender, EventArgs e) { if (!Page.IsValid) { return; } bool isReadOnly = objGeneral.IsApplicationReadOnly(hdnFJCID.Value, Master.CamperUserId); if (!isReadOnly) { ProcessCamperAnswers(); } var strModifiedBy = Master.UserId; var strFJCID = hdnFJCID.Value; if (strFJCID != "" && strModifiedBy != "") { int iStatus; if (isReadOnly) { DataSet dsApp = CamperAppl.getCamperApplication(strFJCID); iStatus = Convert.ToInt32(dsApp.Tables[0].Rows[0]["Status"]); } else { var objEligibility = EligibilityFactory.GetEligibility(FederationEnum.RamahPoconos); objEligibility.checkEligibilityforStep2(strFJCID, out iStatus); } Session["STATUS"] = iStatus.ToString(); } Session["FJCID"] = hdnFJCID.Value; Response.Redirect("Step2_3.aspx"); }
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)); }
void btnNext_Click(object sender, EventArgs e) { int iStatus; string strModifiedBy, strFJCID; EligibilityBase objEligibility = EligibilityFactory.GetEligibility(FederationEnum.Memphis); try { if (Page.IsValid) { if (!objGeneral.IsApplicationReadOnly(hdnFJCIDStep2_2.Value, Master.CamperUserId)) { ProcessCamperAnswers(); } bool isReadOnly = objGeneral.IsApplicationReadOnly(hdnFJCIDStep2_2.Value, Master.CamperUserId); //Modified by id taken from the Master Id strModifiedBy = Master.UserId; strFJCID = hdnFJCIDStep2_2.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(); } Session["FJCID"] = hdnFJCIDStep2_2.Value; Response.Redirect("Step2_3.aspx"); } } catch (Exception ex) { Response.Write(ex.Message); } }
void btnNext_Click(object sender, EventArgs e) { //General objGen = new General(); //int ZipCodeCount = objGen.ValidateNYZipCode(Session["ZIPCODE"].ToString()); //if (ZipCodeCount == 0) //{ // Session["STATUS"] = "3"; // Response.Redirect("Step2_3.aspx"); //} 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; if (strFJCID != "" && strModifiedBy != "") { int iStatus; if (isReadOnly) { DataSet dsApp = CamperAppl.getCamperApplication(strFJCID); iStatus = Convert.ToInt32(dsApp.Tables[0].Rows[0]["Status"]); } else { var objEligibility = EligibilityFactory.GetEligibility(FederationEnum.Poyntelle); objEligibility.checkEligibilityforStep2(strFJCID, out iStatus); } Session["STATUS"] = iStatus.ToString(); } Session["FJCID"] = hdnFJCIDStep2_2.Value; Response.Redirect("Step2_3.aspx"); }
void btnNext_Click(object sender, EventArgs e) { int iStatus; string strModifiedBy, strFJCID; if (!objGeneral.IsApplicationReadOnly(hdnFJCIDStep2_2.Value, Master.CamperUserId)) { ProcessCamperAnswers(); } bool isReadOnly = objGeneral.IsApplicationReadOnly(hdnFJCIDStep2_2.Value, Master.CamperUserId); //Modified by id taken from the Master Id strModifiedBy = Master.UserId; strFJCID = hdnFJCIDStep2_2.Value; if (strFJCID != "" && strModifiedBy != "") { if (isReadOnly) { DataSet dsApp = CamperAppl.getCamperApplication(strFJCID); iStatus = Convert.ToInt32(dsApp.Tables[0].Rows[0]["Status"]); } else { EligibilityBase objEligibility = EligibilityFactory.GetEligibility(FederationEnum.HabonimTavor); objEligibility.checkEligibilityforStep2(strFJCID, out iStatus); } Session["STATUS"] = iStatus.ToString(); } Session["FJCID"] = hdnFJCIDStep2_2.Value; if (Request.QueryString["camp"] == "tavor") { Response.Redirect("Step2_3.aspx?camp=tavor"); } else { Response.Redirect("Step2_3.aspx"); } }
void btnChkEligibility_Click(object sender, EventArgs e) { if (!Page.IsValid) { return; } General objGeneral = new General(); bool isReadOnly = objGeneral.IsApplicationReadOnly(hdnFJCIDStep2_3.Value, Master.CamperUserId); //Modified by id taken from the Master Id string strModifiedBy = Master.UserId; if (!isReadOnly) { var startDate = Convert.ToDateTime(txtStartDate.Text); var endDate = Convert.ToDateTime(txtEndDate.Text); if (startDate > endDate) { lblMsg.Text = "Error: Start date must be earlier than end date."; return; } txtStartDate.Text = startDate.ToShortDateString(); txtEndDate.Text = endDate.ToShortDateString(); InsertCamperAnswers(); } int iCampId = Int32.Parse(ddlCamp.SelectedValue); Session["CampID"] = iCampId; string strFJCID = hdnFJCIDStep2_3.Value; //comments used only by the Admin user string strComments = txtComments.Text.Trim(); int iStatus; if (strFJCID != "" && strModifiedBy != "") { if (isReadOnly) { DataSet dsApp = CamperAppl.getCamperApplication(strFJCID); iStatus = Convert.ToInt32(dsApp.Tables[0].Rows[0]["Status"]); } else { //to update the camp value to the database (to be used for search functionality) CamperAppl.updateCamp(strFJCID, iCampId, strComments, Convert.ToInt32(Master.CamperUserId)); EligibilityBase objEligibility = EligibilityFactory.GetEligibility(FederationEnum.Habonim, iCampId); objEligibility.checkEligibility(strFJCID, out iStatus); } var checkStatus = Convert.ToInt32(Session["STATUS"]); if (checkStatus == (int)StatusInfo.SystemInEligible) { iStatus = checkStatus; } else { Session["STATUS"] = iStatus; } if (iStatus == Convert.ToInt32(StatusInfo.SystemInEligible)) { string strRedirURL; if (Master.UserId != Master.CamperUserId) //then the user is admin { strRedirURL = ConfigurationManager.AppSettings["AdminRedirURL"]; } else //the user is Camper { strRedirURL = "../ThankYou.aspx"; } //to update the status to the database if (!isReadOnly) { CamperAppl.submitCamperApplication(strFJCID, strComments, Convert.ToInt32(strModifiedBy), iStatus); } Response.Redirect(strRedirURL, false); } else //if he/she is eligible { Session["FJCID"] = hdnFJCIDStep2_3.Value; if (Request.QueryString["camp"] == "tavor") { Response.Redirect("../Step2_1.aspx?camp=tavor"); } else { Response.Redirect("../Step2_1.aspx"); } } } }
void btnChkEligibility_Click(object sender, EventArgs e) { int iStatus, iCampId; string strModifiedBy, strFJCID, strComments; EligibilityBase objEligibility = EligibilityFactory.GetEligibility(FederationEnum.SurpriseLake); try { if (Page.IsValid) { bool isReadOnly = objGeneral.IsApplicationReadOnly(hdnFJCIDStep2_3.Value, Master.CamperUserId); //Modified by id taken from the Master Id strModifiedBy = Master.UserId; if (!isReadOnly) { InsertCamperAnswers(); } iCampId = Convert.ToInt32(ddlCamp.SelectedValue); strFJCID = hdnFJCIDStep2_3.Value; //comments used only by the Admin user strComments = txtComments.Text.Trim(); if (strFJCID != "" && strModifiedBy != "") { if (isReadOnly) { DataSet dsApp = CamperAppl.getCamperApplication(strFJCID); iStatus = Convert.ToInt32(dsApp.Tables[0].Rows[0]["Status"]); } else { //to update the camp value to the database (to be used for search functionality) CamperAppl.updateCamp(strFJCID, iCampId, strComments, Convert.ToInt32(Master.CamperUserId)); //to check whether the camper is eligible objEligibility.checkEligibility(strFJCID, out iStatus); } var checkStatus = Convert.ToInt32(Session["STATUS"]); if (checkStatus == (int)StatusInfo.SystemInEligible) { iStatus = checkStatus; } else { Session["STATUS"] = iStatus; } if (iStatus == Convert.ToInt32(StatusInfo.SystemInEligible)) { string strRedirURL; if (Master.UserId != Master.CamperUserId) //then the user is admin { strRedirURL = ConfigurationManager.AppSettings["AdminRedirURL"]; } else //the user is Camper { strRedirURL = "../ThankYou.aspx"; } //to update the status to the database if (!isReadOnly) { CamperAppl.submitCamperApplication(strFJCID, strComments, Convert.ToInt32(strModifiedBy), iStatus); } Response.Redirect(strRedirURL, false); } else //if he/she is eligible { Session["FJCID"] = hdnFJCIDStep2_3.Value; Response.Redirect("../Step2_1.aspx"); } } //Session["ZIPCODE"] = null; } } catch (Exception ex) { Response.Write(ex.Message); } finally { objEligibility = null; } }
void btnChkEligibility_Click(object sender, EventArgs e) { if (!Page.IsValid) { return; } bool isReadOnly = objGeneral.IsApplicationReadOnly(hdnFJCIDStep2_3.Value, Master.CamperUserId); string strModifiedBy = Master.UserId; if (!isReadOnly) { InsertCamperAnswers(); } int iCampId = Convert.ToInt32(ddlCamp.SelectedValue); var strFJCID = hdnFJCIDStep2_3.Value; var strComments = txtComments.Text.Trim(); if (strFJCID != "" && strModifiedBy != "") { int iStatus; if (isReadOnly) { DataSet dsApp = CamperAppl.getCamperApplication(strFJCID); iStatus = Convert.ToInt32(dsApp.Tables[0].Rows[0]["Status"]); } else { //to update the camp value to the database (to be used for search functionality) CamperAppl.updateCamp(strFJCID, iCampId, strComments, Convert.ToInt32(Master.CamperUserId)); var objEligibility = EligibilityFactory.GetEligibility(FederationEnum.RamahPoconos); objEligibility.checkEligibility(strFJCID, out iStatus); } var checkStatus = Convert.ToInt32(Session["STATUS"]); if (checkStatus == (int)StatusInfo.SystemInEligible) { iStatus = checkStatus; } else { Session["STATUS"] = iStatus; } if (iStatus == Convert.ToInt32(StatusInfo.SystemInEligible)) { string strRedirURL; if (Master.UserId != Master.CamperUserId) //then the user is admin { strRedirURL = ConfigurationManager.AppSettings["AdminRedirURL"]; } else //the user is Camper { strRedirURL = "../ThankYou.aspx"; } //to update the status to the database if (!isReadOnly) { CamperAppl.submitCamperApplication(strFJCID, strComments, Convert.ToInt32(strModifiedBy), iStatus); } Response.Redirect(strRedirURL, false); } else //if he/she is eligible { Session["FJCID"] = hdnFJCIDStep2_3.Value; Response.Redirect("../Step2_1.aspx"); } } }
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)); }
void btnChkEligibility_Click(object sender, EventArgs e) { int iStatus, iCampId; string strModifiedBy, strFJCID, strComments; if (Page.IsValid) { bool isReadOnly = objGeneral.IsApplicationReadOnly(hdnFJCIDStep2_3.Value, Master.CamperUserId); //Modified by id taken from the Master Id strModifiedBy = Master.UserId; if (!isReadOnly) { InsertCamperAnswers(); } iCampId = Convert.ToInt32(ddlCamp.SelectedValue); strFJCID = hdnFJCIDStep2_3.Value; //comments used only by the Admin user strComments = txtComments.Text.Trim(); if (strFJCID != "" && strModifiedBy != "") { if (isReadOnly) { DataSet dsApp = CamperAppl.getCamperApplication(strFJCID); iStatus = Convert.ToInt32(dsApp.Tables[0].Rows[0]["Status"]); } else { //to update the camp value to the database (to be used for search functionality) CamperAppl.updateCamp(strFJCID, iCampId, strComments, Convert.ToInt32(Master.CamperUserId)); var objEligibility = EligibilityFactory.GetEligibility(FederationEnum.PJL); objEligibility.checkEligibility(strFJCID, out iStatus); } var checkStatus = (StatusInfo)Convert.ToInt32(Session["STATUS"]); if ((checkStatus == StatusInfo.SystemInEligible || checkStatus == StatusInfo.EligiblePJLottery) && (StatusInfo)iStatus != StatusInfo.SystemInEligible) { iStatus = (int)checkStatus; } Session["STATUS"] = iStatus; if (iStatus == Convert.ToInt32(StatusInfo.EligiblePJLottery)) { var strRedirUrl = "EnterLotteryInfo.aspx"; if (Master.UserId != Master.CamperUserId) //then the user is admin { strRedirUrl = ConfigurationManager.AppSettings["AdminRedirURL"]; } //to update the status to the database if (!isReadOnly) { //CamperAppl.submitCamperApplication(strFJCID, strComments, Convert.ToInt32(strModifiedBy), iStatus); CamperAppl.UpdateStatus(strFJCID, iStatus, "", 0); } // Mark the special code as used var currentCode = Session["SpecialCodeValue"].ToString(); int campYearId = Convert.ToInt32(Application["CampYearID"]); SpecialCodeManager.UseCode(campYearId, Convert.ToInt32(FederationEnum.PJL), currentCode, Session["FJCID"].ToString()); Response.Redirect(strRedirUrl, false); } else if (iStatus == Convert.ToInt32(StatusInfo.SystemInEligible)) { if (!isReadOnly) { CamperAppl.submitCamperApplication(strFJCID, strComments, Convert.ToInt32(strModifiedBy), iStatus); } Response.Redirect("../ThankYou.aspx", false); } else //if he/she is eligible { // 2016-07-06 PJL now has new status Eligible - Registration at Camp for people who ware still waiting for camp registration // in this case, admin will move the status to Eligible when campers actually reigstered for camp. if (RadioButtonQ7Option3.Checked) { Session["STATUS"] = Convert.ToInt32(StatusInfo.EligiblePendingRegistrationCamp); } Session["FJCID"] = hdnFJCIDStep2_3.Value; Response.Redirect("../Step2_1.aspx"); } } } }
void btnChkEligibility_Click(object sender, EventArgs e) { if (ddlCamp.SelectedValue == "-1") { Response.Redirect("../Step1_NL.aspx"); } int iStatus, iCampId; string strComments, strFJCID, strModifiedBy; if (Page.IsValid) { bool isReadOnly = objGeneral.IsApplicationReadOnly(hdnFJCID.Value, Master.CamperUserId); if (!isReadOnly) { DateTime startDate, endDate; try { startDate = Convert.ToDateTime(txtStartDate.Text); endDate = Convert.ToDateTime(txtEndDate.Text); } catch (Exception) { lblMsg.Text = "Error: The dates are wrong format."; return; } if (startDate > endDate) { lblMsg.Text = "Error: Start date must be earlier than end date."; return; } txtStartDate.Text = startDate.ToShortDateString(); txtEndDate.Text = endDate.ToShortDateString(); InsertCamperAnswers(); } //if (RadioBtnQ7.Items[1].Selected) //{ // lblMsgCA.Visible = true; // return; //} //else // lblMsgCA.Visible = false; iCampId = Convert.ToInt32(ddlCamp.SelectedValue); //to get the comments (used only by the Admin user); strComments = txtComments.Text.Trim(); strFJCID = hdnFJCID.Value; strModifiedBy = Master.UserId; if (strFJCID != "" & strModifiedBy != "") { if (isReadOnly) { DataSet dsApp = CamperAppl.getCamperApplication(strFJCID); iStatus = Convert.ToInt32(dsApp.Tables[0].Rows[0]["Status"]); } else { //to update the camp value to the database (to be used for search functionality) CamperAppl.updateCamp(strFJCID, iCampId, strComments, Convert.ToInt32(Master.CamperUserId)); var objEligibility = EligibilityFactory.GetEligibility(FederationEnum.LACIP); objEligibility.checkEligibility(strFJCID, out iStatus); } var checkStatus = Convert.ToInt32(Session["STATUS"]); if (checkStatus == (int)StatusInfo.SystemInEligible) { iStatus = checkStatus; } else { Session["STATUS"] = iStatus; } if (iStatus == Convert.ToInt32(StatusInfo.SystemInEligible)) { string strRedirURL; if (Master.UserId != Master.CamperUserId) //then the user is admin { strRedirURL = ConfigurationManager.AppSettings["AdminRedirURL"]; } else //the user is Camper { strRedirURL = "../ThankYou.aspx"; } //to update the status to the database if (!isReadOnly) { CamperAppl.submitCamperApplication(strFJCID, strComments, Convert.ToInt32(strModifiedBy), iStatus); } Response.Redirect(strRedirURL, false); } else //if he/she is eligible { Session["FJCID"] = strFJCID; Response.Redirect("../Step2_1.aspx"); } } } }
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); } }
void btnNext_Click(object sender, EventArgs e) { 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; if (strFJCID != "" && strModifiedBy != "") { int iStatus; if (isReadOnly) { DataSet dsApp = CamperAppl.getCamperApplication(strFJCID); iStatus = Convert.ToInt32(dsApp.Tables[0].Rows[0]["Status"]); } else { var objEligibility = EligibilityFactory.GetEligibility(FederationEnum.Chicago); objEligibility.checkEligibilityforStep2(strFJCID, out iStatus); } Session["STATUS"] = iStatus.ToString(); } Session["FJCID"] = hdnFJCID.Value; // Chicago coupon for JewishCampers - Other option, then we route to Chicago Coupon page OR Coupon Holding page if the program is not ON yet if (ddlJewishDaySchool.SelectedValue == "3") { // 2014-10-10 Enable Chicaog coupon for in winter every year after PJ Lottery is closed below by commenting the code below, usually this happens end of year or early new year bool isOn = ConfigurationManager.AppSettings["ChicagoCouponProgram"] == "On"; if (isOn) { Response.Redirect("Step2_coupon.aspx"); } // 2014-10-10 In the early fall of every year, we should use PJ lottery var url = "Step2_camp_coupon_holding.aspx?prev="; var session = HttpContext.Current.Session; if (session["SpecialCodeValue"] != null) { var currentCode = session["SpecialCodeValue"].ToString().Substring(0, 9); var campYearId = Convert.ToInt32(HttpContext.Current.Application["CampYearID"]); if (SpecialCodeManager.IsValidCode(campYearId, (int)FederationEnum.PJL, currentCode)) { url = "../PJL/Step2_2_route_info.aspx?prev="; } } Session["STATUS"] = ((int)StatusInfo.EligiblePJLottery).ToString(); Response.Redirect(url + HttpContext.Current.Request.Url.AbsolutePath); } else { Response.Redirect("Step2_3.aspx"); } }
void btnChkEligibility_Click(object sender, EventArgs e) { if (!Page.IsValid) { return; } if (ddlCamp.SelectedValue == "-1") { Response.Redirect("../Step1_NL.aspx"); } int iStatus, iCampId; string strModifiedBy, strFJCID, strComments; bool isReadOnly = objGeneral.IsApplicationReadOnly(hdnFJCIDStep2_3.Value, Master.CamperUserId); //Modified by id taken from the Master Id strModifiedBy = Master.UserId; if (!isReadOnly) { InsertCamperAnswers(); } iCampId = Convert.ToInt32(ddlCamp.SelectedValue); strFJCID = hdnFJCIDStep2_3.Value; //comments used only by the Admin user strComments = txtComments.Text.Trim(); if (strFJCID != "" && strModifiedBy != "") { if (isReadOnly) { DataSet dsApp = CamperAppl.getCamperApplication(strFJCID); iStatus = Convert.ToInt32(dsApp.Tables[0].Rows[0]["Status"]); } else { //to update the camp value to the database (to be used for search functionality) CamperAppl.updateCamp(strFJCID, iCampId, strComments, Convert.ToInt32(Master.CamperUserId)); //to check whether the camper is eligible EligibilityBase objEligibility = EligibilityFactory.GetEligibility(FederationEnum.Toronto); objEligibility.checkEligibility(strFJCID, out iStatus); } // 2013-08-26 Make sure we keep the EligiblePendingNumberOfDays alive here, so the final Thank you page will show the right info if ((StatusInfo)Session["STATUS"] != StatusInfo.EligiblePendingNumberOfDays) { Session["STATUS"] = iStatus; } if (iStatus == (int)StatusInfo.SystemInEligible) { if (!isReadOnly) { CamperAppl.submitCamperApplication(strFJCID, strComments, Convert.ToInt32(strModifiedBy), iStatus); } if (Master.UserId != Master.CamperUserId) //then the user is admin { Response.Redirect(ConfigurationManager.AppSettings["AdminRedirURL"]); } else //the user is Camper { Response.Redirect("../ThankYou.aspx"); } } else // Eligible or related status { Session["FJCID"] = hdnFJCIDStep2_3.Value; Response.Redirect("../Step2_1.aspx"); } } }