/// <summary> /// GetCamperApplicationDetails (CurrentFederation, PJLCode,MiiPCode,SadiegoZipCode if JWest,etc required for the redirection logic from the FJCID) /// </summary> /// <param name="FJCID"></param> private void GetCamperApplicationDetails(string FJCID) { CamperApplication _objCamperApplication = new CamperApplication(); DataSet dsCamperApplication = _objCamperApplication.getCamperApplication(FJCID); string zipCode = string.Empty; string pjlCode = string.Empty; string camperID = string.Empty; if (dsCamperApplication.Tables.Count > 0) { if (dsCamperApplication.Tables[0].Rows.Count > 0) { DataRow dr = dsCamperApplication.Tables[0].Rows[0]; if (String.IsNullOrEmpty(dr["CMART_MiiP_ReferalCode"].ToString())) { IsValidMiiPCodeEntered = false; } else { IsValidMiiPCodeEntered = true; } if (String.IsNullOrEmpty(dr["PJLCode"].ToString())) { IsValidPJLCodeEntered = false; } else { IsValidPJLCodeEntered = true; pjlCode = dr["PJLCode"].ToString(); } if (String.IsNullOrEmpty(dr["FederationId"].ToString())) { CurrentFederationId = 0; } else { CurrentFederationId = Int32.Parse(dr["FederationId"].ToString()); } if (!String.IsNullOrEmpty(dr["Zip"].ToString())) { zipCode = dr["Zip"].ToString(); } if (!String.IsNullOrEmpty(dr["CamperID"].ToString())) { camperID = dr["CamperID"].ToString(); } } } if (zipCode != String.Empty) { General _objGeneral = new General(); DataSet dsFederation = _objGeneral.GetFederationForZipCode(zipCode); if (dsFederation.Tables.Count > 0) { if (dsFederation.Tables[0].Rows.Count > 0) { DataRow dr = dsFederation.Tables[0].Rows[0]; if (dr["Federation"].ToString() == "72") { IsSandiegoZipCode = true; } else { IsSandiegoZipCode = false; } if (dr["Federation"].ToString() == "93") { IsColoradoZipCode = true; } else { IsColoradoZipCode = false; } if (dr["Federation"].ToString() == "95") { IsPalmSpringsZipCode = true; } else { IsPalmSpringsZipCode = false; } if (dr["Federation"].ToString() == "98") { IsSanFranciscoZipCode = true; } else { IsSanFranciscoZipCode = false; } } } } else { IsSandiegoZipCode = false; IsColoradoZipCode = false; IsPalmSpringsZipCode = false; IsSanFranciscoZipCode = false; } if (zipCode != String.Empty) { General _objGeneral = new General(); DataSet dsFederation = _objGeneral.GetFederationForZipCode(zipCode); if (dsFederation.Tables.Count > 0) { if (dsFederation.Tables[0].Rows.Count > 0) { DataRow dr = dsFederation.Tables[0].Rows[0]; if (dr["Federation"].ToString() == "23") { IsLACIPZipCode = true; } else { IsLACIPZipCode = false; } } } } else { IsLACIPZipCode = false; } if (camperID != string.Empty) // This will check if the camper has already submitted MiiP/PJL application using this redirection logic { DataSet dsListOfDeletedCamperApplications = new DataSet(); DataRow[] drArray = new DataRow[0]; dsListOfDeletedCamperApplications = _objCamperApplication.GetCamperApplicationsFromCamperID(camperID); if (dsListOfDeletedCamperApplications.Tables.Count > 0) { if (dsListOfDeletedCamperApplications.Tables[0].Rows.Count > 0) { drArray = dsListOfDeletedCamperApplications.Tables[0].Select("Type='D'", "FJCID ASC"); } } if (drArray.Length > 0) { foreach (DataRow dr in drArray) { if (dr["FederationID"].ToString() == "72") { BeenToSandiego = true; } if (dr["FederationID"].ToString() == "98") { BeenToSanFrancisco = true; } if (dr["FederationID"].ToString() == "93") { BeenToColorado = true; } if (dr["FederationID"].ToString() == "23") { BeenToLACIP = true; } if (dr["FederationID"].ToString() == "48") { BeenToMiiP = true; } if (dr["FederationID"].ToString() == "63" || pjlCode.ToLower() == ConfigurationManager.AppSettings["SpecialPJLCode"].ToLower()) { BeenToPJL = true; } } } } }