protected void BindFormData() { //OLD logic //Counselors = AgencyLogic.GetAgencyUsers(ViewData.AgencyId, Descriptor.Counselor, true).OrderBy(p => p.Value); Counselors = GetCounselors(ViewData.AgencyId); CMSSpecialFields = Logic.GetCMSSpecialFields(); StateSpecialFields = Logic.GetStateSpecialFields(ViewData.AgencyState); CounselorCounties = AgencyLogic.GetCounties(ViewData.AgencyState.Code); ClientCounties = LookupBLL.GetCountiesForZipCode(ViewData.ClientZIPCode); CounselorCounties = CounselorCounties; CounselorZipCodes = LookupBLL.GetZipCodeForCountyFips2(ViewData.CounselorCountyCode); }
protected void textBoxClientZIPCode_TextChanged(object sender, EventArgs e) { var textBoxClientAIPCode = (TextBox)sender; var proxyValidatorClientZIPCode = formViewEditClientContact.FindControl("proxyValidatorClientZIPCode") as PropertyProxyValidator; var dropDownClientCountyCode = formViewEditClientContact.FindControl("dropDownClientCountyCode") as DropDownList; proxyValidatorClientZIPCode.Validate(); if (!proxyValidatorClientZIPCode.IsValid) { return; } dropDownClientCountyCode.DataSource = LookupBLL.GetCountiesForZipCode(textBoxClientAIPCode.Text); dropDownClientCountyCode.DataBind(); //if there are more than one value make the 1st item as selected item.. //As the counties are orderd by zipCounty.displayorder if (dropDownClientCountyCode.Items.Count > 1) { dropDownClientCountyCode.SelectedIndex = 0; } dropDownClientCountyCode.Focus(); }