Пример #1
0
    private void Initialize()
    {
        Session["OldPasswords"] = new List <string> {
            "Password@1", "Password@2", "Password@3"
        };

        rdoCountry.DataSource     = LookupBusiness.GetCountries();
        rdoCountry.DataValueField = "Code";
        rdoCountry.DataTextField  = "Value";
        rdoCountry.DataBind();

        Candidate candidate = Session["Candidate"] as Candidate;

        if (candidate != null)
        {
            rdoCountry.SelectedValue = candidate.CountryCode.ToString();
            rdoStates.DataSource     = LookupBusiness.GetStates(candidate.CountryCode);
            rdoStates.DataValueField = "StateID";
            rdoStates.DataTextField  = "StateName";
            rdoStates.DataBind();
            rdoStates.SelectedValue = candidate.StateID.ToString();

            txtFirstName.Text                = candidate.FirstName;
            txtLastName.Text                 = candidate.LastName;
            txtEmailID.Text                  = candidate.EmailID;
            txtAlternateEmailID.Text         = candidate.AlternateEmailID;
            ddlCandidateStatus.SelectedValue = candidate.CandidateStatus;
            txtPhoneHome.Text                = candidate.PhoneHome;
            txtPhoneCell.Text                = candidate.PhoneCell;
            txtPhoneWork.Text                = candidate.PhoneWork;
            txtAddress1.Text                 = candidate.Address1;
            txtAddress2.Text                 = candidate.Address2;
            txtCity.Text    = candidate.City;
            txtZipCode.Text = candidate.ZipCode;



            hdnCountryCode.Value  = candidate.CountryCode.ToString();
            hdnCountryValue.Value = candidate.CountryValue;



            hdnStateID.Value   = candidate.StateID.ToString();
            hdnStateName.Value = candidate.StateName.ToString();
        }
    }
Пример #2
0
 public List <State> GetStates(int countryID)
 {
     return(LookupBusiness.GetStates(countryID));
 }