Ejemplo n.º 1
0
        protected void EntityAddressCounty_OnSelectedIndexChanged(Object sender, Telerik.Web.UI.RadComboBoxSelectedIndexChangedEventArgs eventArgs)
        {
            if (MercuryApplication == null)
            {
                return;
            }

            if (EntityAddressCounty.SelectedItem == null)
            {
                return;
            }

            if (EntityAddressCounty.SelectedValue == String.Empty)
            {
                return;
            }

            foreach (String currentCounty in MercuryApplication.CountyReferenceByState(EntityAddressState.SelectedValue))
            {
                EntityAddressCounty.Items.Add(new Telerik.Web.UI.RadComboBoxItem(currentCounty, currentCounty));
            } /* END FOREACH */

            //EntityAddressCity.Items.Clear ();

            //foreach (String currentCity in MercuryApplication.CityReferenceByCounty (EntityAddressCounty.SelectedValue)) {

            //    EntityAddressCity.Items.Add (new Telerik.Web.UI.RadComboBoxItem (currentCity, currentCity));

            //} /* END FOREACH */

            return;
        }
Ejemplo n.º 2
0
        protected void EntityAddressState_OnSelectedIndexChanged(Object sender, Telerik.Web.UI.RadComboBoxSelectedIndexChangedEventArgs eventArgs)
        {
            if (MercuryApplication == null)
            {
                return;
            }

            if (EntityAddressState.SelectedItem == null)
            {
                return;
            }

            if (EntityAddressState.SelectedValue == String.Empty)
            {
                InitializeState();
            }

            else
            {
                EntityAddressCity.Items.Clear();

                foreach (Mercury.Server.Application.CityStateZipCodeView currentCity in MercuryApplication.CityReferenceByState(EntityAddressState.SelectedValue, true))
                {
                    EntityAddressCity.Items.Add(new Telerik.Web.UI.RadComboBoxItem(currentCity.City, currentCity.City));
                } /* END FOREACH */

                EntityAddressCounty.Items.Clear();

                foreach (String currentCounty in MercuryApplication.CountyReferenceByState(EntityAddressState.SelectedValue))
                {
                    EntityAddressCounty.Items.Add(new Telerik.Web.UI.RadComboBoxItem(currentCounty, currentCounty));
                } /* END FOREACH */
            }

            return;
        }