protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { if (Session["FJCID"] != null) { hdnFJCIDStep2_1.Value = (string)Session["FJCID"]; getCamperAnswers(); } // 2013-08-25 Synagogue refer by person - the answer from previous question can affect the selection of question on this page DataSet dsAnswers = CamperAppl.getCamperAnswers(hdnFJCIDStep2_1.Value, "", "", "1044"); foreach (DataRow dr in dsAnswers.Tables[0].Rows) { int qID = Convert.ToInt32(dr["QuestionId"]); if (qID == 1044) // Who, if anyone, from your synagogue, did you speak to about Jewish overnight camp? { if (dr["OptionID"].Equals(DBNull.Value)) { continue; } var optionID = dr["OptionID"].ToString(); if (optionID == "1") { chk16.Checked = true; chk16.Enabled = false; } } } } }
private int StatusBasedOnSchool(string FJCID, bool EligibleNoCamp, int statusValue) { //What kind of the school the camper go to //Jewish Day School ineligible int StatusValue = statusValue; int JewishSchool = 0, TimeInCamp = 0; DataSet dsJewishSchool, dsTimeInCamp; CamperApplication oCA = new CamperApplication(); dsJewishSchool = oCA.getCamperAnswers(FJCID, "7", "7", "N"); dsTimeInCamp = oCA.getCamperAnswers(FJCID, "3", "3", "N"); DataRow drJewishSchool, drTimeInCamp; if (dsTimeInCamp.Tables[0].Rows.Count > 0) { drTimeInCamp = dsTimeInCamp.Tables[0].Rows[0]; TimeInCamp = Convert.ToInt32(drTimeInCamp["OptionID"]); } if (dsJewishSchool.Tables[0].Rows.Count > 0) { drJewishSchool = dsJewishSchool.Tables[0].Rows[0]; JewishSchool = Convert.ToInt32(drJewishSchool["OptionID"]); if ((JewishSchool == 4) && (TimeInCamp == 2)) { StatusValue = (int)StatusInfo.SystemEligible; return(StatusValue); } else if (JewishSchool == 4) { StatusValue = (int)StatusInfo.SystemInEligible; } else if (JewishSchool == 3) { if (EligibleNoCamp) { StatusValue = (int)StatusInfo.PendingSchoolAndCamp; } else { StatusValue = (int)StatusInfo.EligiblePendingSchool; } } else { } } return(StatusValue); }
protected void Page_Load(object sender, EventArgs e) { RadioButtonQ7Option1 = (RadioButton)RegControls1.FindControl("RadioButtonQ7Option1"); RadioButtonQ7Option2 = (RadioButton)RegControls1.FindControl("RadioButtonQ7Option2"); imgbtnCalStartDt.Attributes.Add("onclick", "return ShowCalendar('" + txtStartDate.ClientID + "');"); imgbtnCalEndDt.Attributes.Add("onclick", "return ShowCalendar('" + txtEndDate.ClientID + "');"); if (Session["STATUS"] != null) { if (Convert.ToInt32(Session["STATUS"].ToString()) == Convert.ToInt32(StatusInfo.SystemInEligible)) { lblEligibility.Visible = false; } else { lblEligibility.Visible = true; } } if (!(Page.IsPostBack)) { getCamps("0", Master.CampYear); //to get all the camps and fill in if (Session["FJCID"] != null) { hdnFJCIDStep2_3.Value = (string)Session["FJCID"]; getCamperAnswers(); } // 2013-12-12 Chicago Coupon page check DataSet dsAnswers = CamperAppl.getCamperAnswers(hdnFJCIDStep2_3.Value, "17", "17", "N"); if (dsAnswers.Tables[0].Rows.Count > 0) { DataRow dr = dsAnswers.Tables[0].Rows[0]; if (!dr["OptionID"].Equals(DBNull.Value)) { if (dr["OptionID"].ToString() == "3") { lblEligibilitySub.Text = "Based on your answers thus far, you appear to be eligible for the Camp Coupon grant, a program of Jewish United Fund of Chicago!"; } } } } RadioButtonQ7Option1.Attributes.Add("onclick", "JavaScript:popupCall(this,'noCampRegistrationMsg');"); RadioButtonQ7Option2.Attributes.Add("onclick", "JavaScript:popupCall(this,'noCampRegistrationMsg');"); //to enable / disable the panel states based on the radio button selected SetPanelStates(); }
//to get the camper answers from the database void getCamperAnswers() { string strFJCID; strFJCID = hdnFJCIDStep1_NL.Value; if (!strFJCID.Equals(string.Empty)) { CamperApplication oCA = new CamperApplication(); DataSet dsCamp; dsCamp = oCA.getCamperAnswers(strFJCID, "10", "10", "N"); DataRow drCamp; if (dsCamp.Tables[0].Rows.Count > 0) { drCamp = dsCamp.Tables[0].Rows[0]; if (!string.IsNullOrEmpty(drCamp["Answer"].ToString())) { ddlCamp.SelectedValue = drCamp["Answer"].ToString(); } else { ddlCamp.SelectedValue = "-1"; } } else if (Request.UrlReferrer.AbsolutePath.Contains("Step1_WDC_CAL.aspx")) { ddlCamp.SelectedValue = ddlCamp.Items.FindByText("Camps Airy & Louise").Value; } } //end if for null check of fjcid }
private void StatusBasedOnSchool(string FJCID, out int StatusValue) { CamperApplication oCA = new CamperApplication(); DataSet dsJewishSchool; dsJewishSchool = oCA.getCamperAnswers(FJCID, "7", "7", "N"); DataRow drJewishSchool; int JewishSchoolOption = 0; if (dsJewishSchool.Tables[0].Rows.Count > 0) { drJewishSchool = dsJewishSchool.Tables[0].Rows[0]; if (!string.IsNullOrEmpty(drJewishSchool["OptionID"].ToString())) { JewishSchoolOption = Convert.ToInt32(drJewishSchool["OptionID"]); if (JewishSchoolOption == 4) { StatusValue = (int)StatusInfo.SystemInEligible; } else { StatusValue = (int)StatusInfo.SystemEligible; } } else { StatusValue = (int)StatusInfo.SystemInEligible; } } else { StatusValue = (int)StatusInfo.SystemInEligible; } }
private int StatusBasedOnSchool(string FJCID, int StatusValue) { CamperApplication oCA = new CamperApplication(); int iStatusValue = -1; DataSet dsJewishSchool; dsJewishSchool = oCA.getCamperAnswers(FJCID, "7", "7", "N"); DataRow drJewishSchool; int JewishSchool; if (dsJewishSchool.Tables[0].Rows.Count > 0) { drJewishSchool = dsJewishSchool.Tables[0].Rows[0]; JewishSchool = Convert.ToInt32(drJewishSchool["OptionID"]); if (JewishSchool == 4) { iStatusValue = (int)AllowDaySchool(FJCID); } else { iStatusValue = (int)StatusInfo.SystemEligible; } } if (iStatusValue == -1) { iStatusValue = StatusValue; } return(iStatusValue); }
private int StatusBasedOnSibling(string FJCID, int StatusValue) { CamperApplication oCA = new CamperApplication(); int iStatusValue = -1; DataSet dsIncentiveGrant; dsIncentiveGrant = oCA.getCamperAnswers(FJCID, "22", "22", "N"); DataRow drIncentiveGrant; int SiblingIncentiveOption = 0; if (TimeInCamp(FJCID) == 1) { if (dsIncentiveGrant.Tables[0].Rows.Count > 0) { drIncentiveGrant = dsIncentiveGrant.Tables[0].Rows[0]; SiblingIncentiveOption = Convert.ToInt32(drIncentiveGrant["OptionID"]); if (SiblingIncentiveOption == 1) { iStatusValue = (int)StatusInfo.SystemInEligible; } else { iStatusValue = (int)StatusInfo.SystemEligible; } } } if (iStatusValue == -1) { iStatusValue = StatusValue; } return(iStatusValue); }
private int StatusBasedOnInterfaith(string FJCID, int StatusValue) { CamperApplication oCA = new CamperApplication(); int iStatusValue = -1; DataSet dsInterfaith; dsInterfaith = oCA.getCamperAnswers(FJCID, "1014", "1014", "N"); DataRow drInterfaith; int IsInterfaithFamily; if (dsInterfaith.Tables[0].Rows.Count > 0) { drInterfaith = dsInterfaith.Tables[0].Rows[0]; if (!string.IsNullOrEmpty(drInterfaith["OptionID"].ToString())) { IsInterfaithFamily = Convert.ToInt32(drInterfaith["OptionID"]); if (IsInterfaithFamily == 2) { iStatusValue = (int)StatusInfo.SystemInEligible; } else { iStatusValue = (int)StatusInfo.SystemEligible; } } } if (iStatusValue == -1) { iStatusValue = StatusValue; } return(iStatusValue); }
protected int NumberOfSaturdays(string FJCID) { CamperApplication oCA = new CamperApplication(); DataSet dsCampSession; dsCampSession = oCA.getCamperAnswers(FJCID, "12", "12", "N"); DataRow drStartDate; DataRow drEndDate; int NumbOfSat = 0; if (dsCampSession.Tables[0].Rows.Count > 1) { drStartDate = dsCampSession.Tables[0].Rows[0]; drEndDate = dsCampSession.Tables[0].Rows[1]; if (!string.IsNullOrEmpty(drStartDate["Answer"].ToString())) { string strStartDate = Convert.ToString(drStartDate["Answer"]); string strEndDate = Convert.ToString(drEndDate["Answer"]); DateTime dtStartDate = Convert.ToDateTime(strStartDate); DateTime dtEndDate = Convert.ToDateTime(strEndDate); //int iDays = DateTime. TimeSpan span = dtEndDate.Subtract(dtStartDate); NumbOfSat = calNoOfSaturdays(dtStartDate, dtEndDate); } } return(NumbOfSat); }
private int StatusBasedOnSchool(string FJCID, int StatusValue) { CamperApplication oCA = new CamperApplication(); int iStatusValue = -1; DataSet dsSchoolOption; dsSchoolOption = oCA.getCamperAnswers(FJCID, "7", "7", "N"); DataRow drSchoolOption; int SchoolOption; if (dsSchoolOption.Tables[0].Rows.Count > 0) { drSchoolOption = dsSchoolOption.Tables[0].Rows[0]; if (!string.IsNullOrEmpty(drSchoolOption["OptionID"].ToString())) { SchoolOption = Convert.ToInt32(drSchoolOption["OptionID"]); if (SchoolOption == 4) { iStatusValue = (int)StatusInfo.SystemInEligible; } else { iStatusValue = (int)AllowDaySchool(FJCID); } } } if (iStatusValue == -1) { iStatusValue = StatusValue; } return(iStatusValue); }
private int StatusBasedOnGrade(string FJCID, int StatusValue) { var oCA = new CamperApplication(); var dsAnswers = oCA.getCamperAnswers(FJCID, "1", "1", "6,10"); var campId = dsAnswers.Tables[0].Select("QuestionID = 10")[0]["Answer"].ToString(); int grade = Convert.ToInt32(dsAnswers.Tables[0].Select("QuestionID = 6")[0]["Answer"]); string last3Digits = campId.Substring(campId.Length - 3); int iStatusValue = Convert.ToInt32(StatusInfo.SystemInEligible);; if (last3Digits == "079") // California { if (grade > 2 && grade < 11) { iStatusValue = Convert.ToInt32(StatusInfo.SystemEligible); } } else { var objGeneral = new General(); if (objGeneral.GetEligiblityForGrades(FJCID, grade.ToString()) == "1") { iStatusValue = Convert.ToInt32(StatusInfo.SystemEligible); } } return(iStatusValue); }
private void StatusBasedOnGrade(string FJCID, out int StatusValue) { CamperApplication oCA = new CamperApplication(); DataSet dsGrade = oCA.getCamperAnswers(FJCID, "6", "6", "N"); DataRow drGrade; int Grade = 0; if (dsGrade.Tables[0].Rows.Count > 0) { drGrade = dsGrade.Tables[0].Rows[0]; if (DBNull.Value.Equals(drGrade["Answer"])) { StatusValue = Convert.ToInt32(StatusInfo.SystemInEligible); } else { General objGeneral = new General(); Grade = Convert.ToInt32(drGrade["Answer"]); if (objGeneral.GetEligiblityForGrades(FJCID, Grade.ToString()) == "1") { StatusValue = Convert.ToInt32(StatusInfo.SystemEligible); } else { StatusValue = Convert.ToInt32(StatusInfo.SystemInEligible); } } } else { StatusValue = Convert.ToInt32(StatusInfo.SystemInEligible); } return; }
private int StatusBasedOnSynagogue(string FJCID, int StatusValue) { CamperApplication oCA = new CamperApplication(); DataSet dsSynagogue; dsSynagogue = oCA.getCamperAnswers(FJCID, "31", "31", "N"); DataRow drSynagogue; string Synagogue; if (dsSynagogue.Tables[0].Rows.Count > 0) { drSynagogue = dsSynagogue.Tables[0].Rows[0]; if (DBNull.Value.Equals(drSynagogue["Answer"])) { intSynagogueID = 0; } else { if (!drSynagogue["OptionID"].Equals(DBNull.Value)) { if (drSynagogue["OptionID"].ToString() == "1") { if (!drSynagogue["Answer"].Equals(DBNull.Value)) { Synagogue = drSynagogue["Answer"].ToString(); intSynagogueID = Convert.ToInt32(Synagogue); } } } } } return(intSynagogueID); }
private void StatusBasedOnSchool(string FJCID, out int StatusValue, string specialCode = "None") { var oCA = new CamperApplication(); DataSet dsJewishSchool = oCA.getCamperAnswers(FJCID, "7", "7", "N"); if (dsJewishSchool.Tables[0].Rows.Count > 0) { DataRow drJewishSchool = dsJewishSchool.Tables[0].Rows[0]; if (!string.IsNullOrEmpty(drJewishSchool["OptionID"].ToString())) { int JewishSchoolOption = Convert.ToInt32(drJewishSchool["OptionID"]); if (JewishSchoolOption == 4) { //if (specialCode == "PJGTC2017") // StatusValue = (int)StatusInfo.SystemInEligible; //else // StatusValue = (int)StatusInfo.SystemInEligible; StatusValue = (int)StatusInfo.SystemEligible; } else { StatusValue = (int)StatusInfo.SystemEligible; } } else { StatusValue = (int)StatusInfo.SystemInEligible; } } else { StatusValue = (int)StatusInfo.SystemInEligible; } }
private int StatusBasedOnCamp(string FJCID, int StatusValue, bool PendingSchool) { CamperApplication oCA = new CamperApplication(); DataSet dsCamp; dsCamp = oCA.getCamperAnswers(FJCID, "10", "10", "N"); DataRow drCamp; int CampID = 0; int CampOption = 0; int iStatusValue = -1; if (dsCamp.Tables[0].Rows.Count > 0) { int i; for (i = 0; i < dsCamp.Tables[0].Rows.Count; i++) { drCamp = dsCamp.Tables[0].Rows[i]; if (!DBNull.Value.Equals(drCamp["OptionID"])) { CampOption = Convert.ToInt32(drCamp["OptionID"]); } if (CampOption == 2) { CampID = Convert.ToInt32(drCamp["Answer"]); if (CampID == 0) { if (PendingSchool) { iStatusValue = Convert.ToInt32(StatusInfo.PendingSchoolAndCamp); } else { iStatusValue = Convert.ToInt32(StatusInfo.EligibleNoCamp); } } else { if (PendingSchool) { iStatusValue = (int)StatusInfo.EligiblePendingSchool; } else { iStatusValue = Convert.ToInt32(StatusInfo.SystemEligible); } } } } } if (iStatusValue == -1) { iStatusValue = StatusValue; } return(iStatusValue); }
//to get the camper answers from the database void getCamperAnswers() { string strFJCID = hdnFJCIDStep2_2.Value; DataSet dsAnswers = CamperAppl.getCamperAnswers(strFJCID, "", "", "3,6,7,8,1032,1033,1034,1063"); foreach (DataRow dr in dsAnswers.Tables[0].Rows) { int qID = Convert.ToInt32(dr["QuestionId"]); if (qID == 3) // Is this your first time to attend a Non-profit Jewish overnight camp, for 3 weeks or longer: { if (dr["OptionID"].Equals(DBNull.Value)) { continue; } if (dr["OptionID"].ToString() == "1") { rdoFirstTimerYes.Checked = true; } else { rdoFirstTimerNo.Checked = true; } } else if (qID == 6) // Grade { if (!dr["Answer"].Equals(DBNull.Value)) { ddlGrade.SelectedValue = dr["Answer"].ToString(); } } else if (qID == 7) //What kind of the school the camper go to { if (dr["OptionID"].Equals(DBNull.Value)) { continue; } rdoSchoolType.SelectedValue = dr["OptionID"].ToString(); if (dr["OptionID"].ToString() == "3") { txtSchoolName.Enabled = false; } } else if (qID == 8) // Name of the school Camper attends: { if (!dr["Answer"].Equals(DBNull.Value)) { txtSchoolName.Text = dr["Answer"].ToString(); } } } }
void PopulateAnswers() { DataSet dsAnswers = CamperAppl.getCamperAnswers(hdnFJCIDStep2_2.Value, "", "", "3,6,7,8,1063"); foreach (DataRow dr in dsAnswers.Tables[0].Rows) { var qID = (QuestionId)dr["QuestionId"]; if (qID == QuestionId.FirstTime) // Is this your first time to attend a Non-profit Jewish overnight camp, for 3 weeks or longer: { if (dr["OptionID"].Equals(DBNull.Value)) { continue; } if (dr["OptionID"].ToString() == "1") { rdoFirstTimerYes.Checked = true; } else { rdoFirstTimerNo.Checked = true; } } else if (qID == QuestionId.Grade) // Grade (Mention the grade of the camper after he/she attends the camp session): { if (!dr["Answer"].Equals(DBNull.Value)) { ddlGrade.SelectedValue = dr["Answer"].ToString(); } } else if (qID == QuestionId.SchoolType) // What kind of the school the camper go to { if (dr["OptionID"].Equals(DBNull.Value)) { continue; } rdoSchoolType.SelectedValue = dr["OptionID"].ToString(); if (dr["OptionID"].ToString() == "3") { txtSchoolName.Enabled = false; } } else if (qID == QuestionId.SchoolName) // Name of the school Camper attends: { if (!dr["Answer"].Equals(DBNull.Value)) { txtSchoolName.Text = dr["Answer"].ToString(); } } } }
void PopulateAnswers() { DataSet dsAnswers = CamperAppl.getCamperAnswers(hdnFJCID.Value, "", "", "3,6,7,8"); foreach (DataRow dr in dsAnswers.Tables[0].Rows) { var qID = (QuestionId)dr["QuestionId"]; switch (qID) { case QuestionId.FirstTime: if (dr["OptionID"].Equals(DBNull.Value)) { continue; } if (dr["OptionID"].ToString() == "1") { rdoFirstTimerYes.Checked = true; } else if (dr["OptionID"].ToString() == "2") { rdoFirstTimerNo.Checked = true; } break; case QuestionId.Grade: if (!dr["Answer"].Equals(DBNull.Value)) { ddlGrade.SelectedValue = dr["Answer"].ToString(); } break; case QuestionId.SchoolType: if (dr["OptionID"].Equals(DBNull.Value)) { continue; } rdoSchoolType.SelectedValue = dr["OptionID"].ToString(); if (dr["OptionID"].ToString() == "3") { txtSchoolName.Enabled = false; } break; case QuestionId.SchoolName: if (!dr["Answer"].Equals(DBNull.Value)) { txtSchoolName.Text = dr["Answer"].ToString(); } break; } } }
private int StatusBasedOnSchool(string FJCID, int StatusValue, string specialCode = "None") { CamperApplication oCA = new CamperApplication(); int iStatusValue = -1; DataSet dsSchoolOption; dsSchoolOption = oCA.getCamperAnswers(FJCID, "1", "1", "7,17"); DataRow drSchoolOption; int SchoolOption; int JewishSchool; DataRow drJewishSchool; if (dsSchoolOption.Tables[0].Rows.Count > 0) { drSchoolOption = dsSchoolOption.Tables[0].Rows[0]; if (!string.IsNullOrEmpty(drSchoolOption["OptionID"].ToString())) { SchoolOption = Convert.ToInt32(drSchoolOption["OptionID"]); drJewishSchool = dsSchoolOption.Tables[0].Rows[1]; JewishSchool = Convert.ToInt32(drJewishSchool["OptionID"]); if (SchoolOption == 4) { if (JewishSchool == 3) { iStatusValue = (int)AllowDaySchool(FJCID); if (iStatusValue == (int)StatusInfo.SystemInEligible) { if (specialCode == "PJGTC2017") { iStatusValue = (int)StatusInfo.EligiblePJLottery; } } } else { iStatusValue = (int)StatusInfo.SystemEligible; } } else { iStatusValue = (int)StatusInfo.SystemEligible; } } } if (iStatusValue == -1) { iStatusValue = StatusValue; } return(iStatusValue); }
public static int getDaysInCamp(string FJCID) { CamperApplication oCA = new CamperApplication(); DataSet dsCamperApplication; DataRow drCamper; int Days = 0; dsCamperApplication = oCA.getCamperApplication(FJCID); if (dsCamperApplication.Tables[0].Rows.Count > 0) { drCamper = dsCamperApplication.Tables[0].Rows[0]; if (!Convert.IsDBNull(drCamper["Days"])) { Days = Convert.ToInt32(drCamper["Days"]); } } //if number of days was not entered by Camp Director //it needs to be retirieved from a camper application if (Days == 0) { DataSet dsCampSession; dsCampSession = oCA.getCamperAnswers(FJCID, "12", "12", "N"); DataRow drStartDate; DataRow drEndDate; if (dsCampSession.Tables[0].Rows.Count > 1) { drStartDate = dsCampSession.Tables[0].Rows[0]; drEndDate = dsCampSession.Tables[0].Rows[1]; if (!string.IsNullOrEmpty(drStartDate["Answer"].ToString()) && !string.IsNullOrEmpty(drEndDate["Answer"].ToString())) { try { string strStartDate = Convert.ToString(drStartDate["Answer"]); string strEndDate = Convert.ToString(drEndDate["Answer"]); DateTime dtStartDate = Convert.ToDateTime(strStartDate); DateTime dtEndDate = Convert.ToDateTime(strEndDate); TimeSpan span = dtEndDate.Subtract(dtStartDate); Days = span.Days + 1; } catch { Days = 0; } //in case of wrong data } } } return(Days); }
private void StatusBasedOnSchool(string FJCID, out int StatusValue, StatusInfo currentStatus) { //StatusValue = (int)StatusInfo.SystemEligible; //return; CamperApplication oCA = new CamperApplication(); DataSet dsJewishSchool; dsJewishSchool = oCA.getCamperAnswers(FJCID, "7", "7", "N"); DataRow drJewishSchool; int JewishSchoolOption = 0; if (dsJewishSchool.Tables[0].Rows.Count > 0) { drJewishSchool = dsJewishSchool.Tables[0].Rows[0]; if (!string.IsNullOrEmpty(drJewishSchool["OptionID"].ToString())) { JewishSchoolOption = Convert.ToInt32(drJewishSchool["OptionID"]); if (JewishSchoolOption == 4) { //StatusValue = (int)StatusInfo.SystemInEligible; // 2014-10-14 if regular PJ program user chooses JDS (typically from zip code with no community program), we automatically mark it PendingLottery StatusValue = (int)StatusInfo.EligiblePJLottery; //2014-08-20 If it's EligiblePJLottery, we temporarily make it eligible, so the process can still keep the EligiblePJLottery on Step2_2 if (currentStatus == StatusInfo.EligiblePJLottery) { StatusValue = (int)StatusInfo.SystemEligible; } } else { StatusValue = (int)StatusInfo.SystemEligible; } } else { StatusValue = (int)StatusInfo.SystemInEligible; } } else { StatusValue = (int)StatusInfo.SystemInEligible; } }
public override bool checkEligibilityforStep2(string FJCID, out int StatusValue) { bool EligibleNoCamp = false; if (checkEligibilityCommon(FJCID, out StatusValue)) { return(true); } //Added by sandhya - Rename the variables to Second Timer from 3rd //to ineligible the first time campers int ThirdTimeCamperOption = 0; CamperApplication oCA = new CamperApplication(); DataSet dsThirdTimeCamper; dsThirdTimeCamper = oCA.getCamperAnswers(FJCID, "3", "3", "N"); DataRow drSTC; if (dsThirdTimeCamper.Tables[0].Rows.Count > 0) { drSTC = dsThirdTimeCamper.Tables[0].Rows[0]; //To ineligible the first time campers if (!string.IsNullOrEmpty(drSTC["OptionID"].ToString())) { ThirdTimeCamperOption = Convert.ToInt32(drSTC["OptionID"]); if (ThirdTimeCamperOption == 2) { StatusValue = (int)StatusInfo.SystemEligible; } else { StatusValue = (int)StatusInfo.SystemInEligible; return(true); } } } StatusValue = StatusBasedOnSchool(FJCID, EligibleNoCamp, StatusValue); if (StatusValue == Convert.ToInt32(StatusInfo.SystemInEligible)) { return(true); } return(true); }
private int StatusBasedOnGrade(string FJCID, int StatusValue) { var oCA = new CamperApplication(); var dsAnswers = oCA.getCamperAnswers(FJCID, "1", "1", "6"); int grade = Convert.ToInt32(dsAnswers.Tables[0].Select("QuestionID = 6")[0]["Answer"]); int iStatusValue = Convert.ToInt32(StatusInfo.SystemInEligible);; var objGeneral = new General(); if (objGeneral.GetEligiblityForGrades(FJCID, grade.ToString()) == "1") { iStatusValue = Convert.ToInt32(StatusInfo.SystemEligible); } return(iStatusValue); }
private int StatusBasedOnCamp(string FJCID, int StatusValue) { return(Convert.ToInt32(StatusInfo.SystemEligible)); CamperApplication oCA = new CamperApplication(); DataSet dsCamp; dsCamp = oCA.getCamperAnswers(FJCID, "10", "10", "N"); DataRow drCamp; int CampID = 0; int CampOption = 0; int iStatusValue = -1; if (dsCamp.Tables[0].Rows.Count > 0) { int i; for (i = 0; i < dsCamp.Tables[0].Rows.Count; i++) { drCamp = dsCamp.Tables[0].Rows[i]; if (!DBNull.Value.Equals(drCamp["OptionID"])) { CampOption = Convert.ToInt32(drCamp["OptionID"]); } if (CampOption == 2) { CampID = Convert.ToInt32(drCamp["Answer"]); if (CampID == 0) { // 2016-07-04 EligibleNoCamp is no longer existing from now on, and it's possible for PJL to have no camp selected iStatusValue = Convert.ToInt32(StatusInfo.SystemEligible); } else { iStatusValue = Convert.ToInt32(StatusInfo.SystemEligible); } } } } if (iStatusValue == -1) { iStatusValue = StatusValue; } return(iStatusValue); }
string GetGrade() { string Grade = ""; CamperApplication oCA = new CamperApplication(); string strFJCID; strFJCID = hdnFJCID.Value; DataSet dsGrade; dsGrade = oCA.getCamperAnswers(strFJCID, "6", "6", "N"); DataRow drGrade; if (dsGrade.Tables[0].Rows.Count > 0) { drGrade = dsGrade.Tables[0].Rows[0]; Grade = drGrade["Answer"].ToString(); } return(Grade); }
private int StatusBasedOnSchool(string FJCID, int StatusValue, string specialCode = "None") { CamperApplication oCA = new CamperApplication(); DataSet dsJewishSchool = oCA.getCamperAnswers(FJCID, "", "", "7, 10"); int iStatusValue = -1; if (dsJewishSchool.Tables[0].Rows.Count > 0) { DataRow drJewishSchool = dsJewishSchool.Tables[0].Select("QuestionID = 7")[0]; // 2013-09-08 URJ Six Points Sci-Tech is the only camp allows day school string CampID = dsJewishSchool.Tables[0].Select("QuestionID = 10")[0]["Answer"].ToString(); string last3digits = CampID.Substring(CampID.Length - 3); if (!string.IsNullOrEmpty(drJewishSchool["OptionID"].ToString())) { int JewishSchoolOption = Convert.ToInt32(drJewishSchool["OptionID"]); if (JewishSchoolOption == 4) { if (specialCode == "PJGTC2017") { iStatusValue = (int)StatusInfo.SystemInEligible; } else { iStatusValue = (int)AllowDaySchool(FJCID); } } else { iStatusValue = (int)StatusInfo.SystemEligible; } } } if (iStatusValue == -1) { iStatusValue = StatusValue; } return(iStatusValue); }
//to get the camps based on the state selected //if state is not selected then all the camps are populated private void getCamps(string StateId, string CampYear) { var isJDS = false; CamperApplication oCA = new CamperApplication(); var dsJewishSchool = oCA.getCamperAnswers(Session["FJCID"].ToString(), "7", "7", "N"); if (dsJewishSchool.Tables[0].Rows.Count > 0) { var drJewishSchool = dsJewishSchool.Tables[0].Rows[0]; if (!string.IsNullOrEmpty(drJewishSchool["OptionID"].ToString())) { int JewishSchoolOption = Convert.ToInt32(drJewishSchool["OptionID"]); if (JewishSchoolOption == 4) { isJDS = true; } } } //if (StateId == "0") //{ var dsCamps = objGeneral.GetFedCamps(intFederationID, CampYear, isJDS); //} //else //{ // dsCamps = objGeneral.get_CampsForFederationState(intFederationID, StateId); //} ddlCamp.DataSource = dsCamps; ddlCamp.DataTextField = "Camp"; ddlCamp.DataValueField = "CampID"; ddlCamp.DataBind(); ddlCamp.Items.Insert(0, new ListItem("-- Select --", "0")); //if (!isJDS) ddlCamp.Items.Insert(ddlCamp.Items.Count, new ListItem("Other", "-1")); }
private int StatusBasedOnGrade(string FJCID, int StatusValue) { CamperApplication oCA = new CamperApplication(); DataSet dsGrade; dsGrade = oCA.getCamperAnswers(FJCID, "6", "6", "N"); DataRow drGrade; int iStatusValue = -1; int Grade; if (dsGrade.Tables[0].Rows.Count > 0) { drGrade = dsGrade.Tables[0].Rows[0]; if (DBNull.Value.Equals(drGrade["Answer"])) { iStatusValue = Convert.ToInt32(StatusInfo.SystemInEligible); } else { // Camper grade value must be between 3 - 11 Grade = Convert.ToInt32(drGrade["Answer"]); if ((Grade > 2) && (Grade < 12)) { iStatusValue = Convert.ToInt32(StatusInfo.SystemEligible); } else { iStatusValue = Convert.ToInt32(StatusInfo.SystemInEligible); } } } if (iStatusValue == -1) { iStatusValue = StatusValue; } return(iStatusValue); }
private int StatusBasedOnCamp(string FJCID, out bool EligibleNoCamp) { EligibleNoCamp = false; CamperApplication oCA = new CamperApplication(); DataSet dsCamp; dsCamp = oCA.getCamperAnswers(FJCID, "10", "10", "N"); DataRow drCamp; int CampID = 0; int StatusValue = (int)StatusInfo.SystemEligible; if (dsCamp.Tables[0].Rows.Count > 0) { drCamp = dsCamp.Tables[0].Rows[0]; // Camper Camp value is null if (DBNull.Value.Equals(drCamp["OptionID"])) { StatusValue = Convert.ToInt32(StatusInfo.EligibleNoCamp); oCA.UpdateAmount(FJCID, 0.00, 0, ""); EligibleNoCamp = true; } else { CampID = Convert.ToInt32(drCamp["OptionID"]); if (CampID == -1) { StatusValue = Convert.ToInt32(StatusInfo.EligibleNoCamp); oCA.UpdateAmount(FJCID, 0.00, 0, ""); EligibleNoCamp = true; } else { StatusValue = Convert.ToInt32(StatusInfo.SystemEligible); } } } return(StatusValue); }
private int StatusBasedOnCamp(string FJCID, int StatusValue) { CamperApplication oCA = new CamperApplication(); DataSet dsCamp; dsCamp = oCA.getCamperAnswers(FJCID, "10", "10", "N"); DataRow drCamp; int CampID = 0; int iStatusValue = -1; if (dsCamp.Tables[0].Rows.Count > 0) { drCamp = dsCamp.Tables[0].Rows[0]; // Camper Camp value is null if (DBNull.Value.Equals(drCamp["OptionID"])) { iStatusValue = Convert.ToInt32(StatusInfo.EligibleNoCamp); } else { CampID = Convert.ToInt32(drCamp["OptionID"]); if (CampID == 0) { iStatusValue = Convert.ToInt32(StatusInfo.EligibleNoCamp); } else { iStatusValue = Convert.ToInt32(StatusInfo.SystemEligible); } } } if (iStatusValue == -1) { iStatusValue = StatusValue; } return(iStatusValue); }