Пример #1
0
    //to fill the user details which has been captured in the STep1.aspx
    private void FillUserDetails()
    {
        string strFJCID = hdnFJCID_ParentInfo.Value;

        if (strFJCID != string.Empty)
        {
            UserInfo = CamperAppl.getCamperInfo(strFJCID);
            if (UserInfo.FirstName != null)
            {
                //setting the user input values from the struct 'UserInfo'
                txtAddress1.Text          = UserInfo.Address;
                ddlCountry1.SelectedValue = UserInfo.Country;
                //AG
                get_CountryStates(ddlState1, int.Parse(UserInfo.Country));

                ddlState1.SelectedValue = UserInfo.State;
                txtCity1.Text           = UserInfo.City;
                txtZipCode1.Text        = UserInfo.ZipCode;

                txtHomePhone1.Text = UserInfo.HomePhone;

                //txtAddress2.Text = UserInfo.Address;
                //ddlCountry2.SelectedValue = UserInfo.Country;
                //ddlState2.SelectedValue = UserInfo.State;
                //txtCity2.Text = UserInfo.City;
                //txtZipCode2.Text = UserInfo.ZipCode;

                ddlCountry2.SelectedValue = UserInfo.Country;
                get_CountryStates(ddlState2, int.Parse(UserInfo.Country));
                SetState2Label(UserInfo.Country);
            }
        }
    }
Пример #2
0
    //to get the Camper Info from the database
    protected void getUserInfo()
    {
        string strFJCID = hdnFJCID.Value;
        string strDOB, strAge;

        if (!strFJCID.Equals(string.Empty))
        {
            UserInfo = CamperAppl.getCamperInfo(strFJCID);
            if (UserInfo.FirstName != null || UserInfo.LastName != null)
            {
                //update action has to be performed
                hdnPerformAction.Value = "UPDATE";
                strDOB = UserInfo.DateofBirth;
                strAge = UserInfo.Age;
                if (objGeneral.IsDate(strDOB))
                {
                    strDOB = Convert.ToDateTime(strDOB).ToShortDateString();
                }
                else
                {
                    strDOB = string.Empty;
                    strAge = string.Empty;
                }
                //setting the user input values to the struct 'UserInfo'
                txtFirstName.Text        = UserInfo.FirstName;
                txtLastName.Text         = UserInfo.LastName;
                txtAddress.Text          = UserInfo.Address;
                ddlCountry.SelectedValue = UserInfo.Country;
                ddlState.SelectedValue   = UserInfo.State;
                //txtCity.Text = UserInfo.City;
                txtZipCode.Text = UserInfo.ZipCode;
                txtEmail.Text   = UserInfo.PersonalEmail;
                txtDOB.Text     = strDOB;
                txtAge.Text     = strAge;

                //populate city combo and select the value
                getCities(UserInfo.ZipCode, UserInfo.City);

                getGenders(strFJCID, UserInfo.Gender);
                //ddlGender.SelectedValue = UserInfo.Gender;
                SetCountryValidationRules(UserInfo.Country);
            }
            else //new user - perform insert
            {
                hdnPerformAction.Value = "INSERT";
            }
        }
        else //new application
        {
            hdnPerformAction.Value = "INSERT";
        }
    }
Пример #3
0
        protected bool IsCamperRepiting(string FJCID)
        {
            General           objGeneral = new General();
            UserDetails       UserInfo;
            CamperApplication CamperAppl = new CamperApplication();

            UserInfo = CamperAppl.getCamperInfo(FJCID);

            DataSet dsLAHist = objGeneral.GetLAFederationForCamper(UserInfo.FirstName, UserInfo.LastName, UserInfo.DateofBirth);

            if (dsLAHist.Tables[0].Rows.Count > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
Пример #4
0
        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;
            DataSet dsLAHist = new DataSet();
            bool    isinLALookup = false;
            bool    firstTimeCamper, secondTimeCamper;

            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
                {
                    // Eligible grades for LA CIP 1st time camper: 3-5, 9 & 11 (6-8 goes to Jwest)
                    //changes made by Ram
                    UserDetails UserInfo = oCA.getCamperInfo(FJCID);
                    firstTimeCamper = secondTimeCamper = false;
                    if (UserInfo.FirstName != null && UserInfo.LastName != null)
                    {
                        dsLAHist = new General().GetLAFederationForCamper(UserInfo.FirstName, UserInfo.LastName, UserInfo.DateofBirth);
                    }
                    if (dsLAHist.Tables[0].Rows.Count > 0)
                    {
                        secondTimeCamper = true;
                    }
                    if (!secondTimeCamper)
                    {
                        if (TimeInCamp(FJCID) == 1)
                        {
                            firstTimeCamper = true;
                        }
                        else if (TimeInCamp(FJCID) >= 2)
                        {
                            secondTimeCamper = true;
                        }
                    }
                    General objGeneral = new General();
                    Grade = Convert.ToInt32(drGrade["Answer"]);
                    if (firstTimeCamper)
                    {
                        if (objGeneral.GetEligiblityForGrades(FJCID, Grade.ToString()) == "1")
                        {
                            StatusValue = Convert.ToInt32(StatusInfo.SystemEligible);
                        }
                        else
                        {
                            StatusValue = Convert.ToInt32(StatusInfo.SystemInEligible);
                        }
                    }
                    else if (secondTimeCamper)
                    {
                        if (objGeneral.GetEligiblityForGrades(FJCID, Grade.ToString()) == "1")
                        {
                            StatusValue = Convert.ToInt32(StatusInfo.SystemEligible);
                        }
                        else
                        {
                            StatusValue = Convert.ToInt32(StatusInfo.SystemInEligible);
                        }
                    }
                    //// Eligible grades for LA CIP: 3-5, 9-11 (6-8 goes to Jwest)
                    //Grade = Convert.ToInt32(drGrade["Answer"]);
                    //if ( ((Grade >= 3) && (Grade <= 5)) || ((Grade >= 9) && (Grade <= 11)) )
                    //{
                    //    iStatusValue = Convert.ToInt32(StatusInfo.SystemEligible);
                    //}
                    //else
                    //{
                    //    iStatusValue = Convert.ToInt32(StatusInfo.SystemInEligible);
                    //}
                }
            }
            if (iStatusValue == -1)
            {
                iStatusValue = StatusValue;
            }

            return(iStatusValue);
        }