Пример #1
0
        void locationCity(string countryCode)
        {
            DataTable dt;

            Classes.Locations l = new Classes.Locations();
            dt = l.citiesList(countryCode);

            DropDownListCity.Items.Clear();
            DropDownListCity.Items.Add(new ListItem("Select City", "0"));
            for (int i = 0; i < dt.Rows.Count; i++)
            {
                DropDownListCity.Items.Add(new ListItem(dt.Rows[i]["CityName"].ToString(), dt.Rows[i]["LocationId"].ToString()));
            }
        }
Пример #2
0
        protected void DropDownListCountry_SelectedIndexChanged(object sender, EventArgs e)
        {
            DataTable dt;

            Classes.Locations l = new Classes.Locations();
            dt = l.citiesList(DropDownListCountry.SelectedValue);

            DropDownListCity.Items.Clear();
            DropDownListCity.Items.Add(new ListItem("Select City", "0"));
            for (int i = 0; i < dt.Rows.Count; i++)
            {
                DropDownListCity.Items.Add(new ListItem(dt.Rows[i]["CityName"].ToString(), dt.Rows[i]["LocationId"].ToString()));
            }
        }
Пример #3
0
        void locationCity(int stateId)
        {
            DataTable dt;

            Classes.Locations l = new Classes.Locations();
            dt = l.citiesList(Convert.ToInt32(DropDownListState.SelectedValue));

            List <System.Web.UI.WebControls.ListItem> states = new List <System.Web.UI.WebControls.ListItem>();

            DropDownListCity.Items.Clear();
            DropDownListCity.Items.Add(new ListItem("Select City", "0"));
            for (int i = 0; i < dt.Rows.Count; i++)
            {
                DropDownListCity.Items.Add(new ListItem(dt.Rows[i]["CityName"].ToString(), dt.Rows[i]["CityId"].ToString()));
            }
        }
Пример #4
0
        void locationCity(string countryCode)
        {
            DataTable dt;
            Classes.Locations l = new Classes.Locations();
            dt = l.citiesList(DropDownListCountry.SelectedValue);

            DropDownListCity.Items.Clear();
            DropDownListCity.Items.Add(new ListItem("Select City", "0"));
            for (int i = 0; i < dt.Rows.Count; i++)
            {
                DropDownListCity.Items.Add(new ListItem(dt.Rows[i]["CityName"].ToString(), dt.Rows[i]["LocationId"].ToString()));
            }
        }
Пример #5
0
        protected void DropDownListState_SelectedIndexChanged(object sender, EventArgs e)
        {
            DataTable dt;
            Classes.Locations l = new Classes.Locations();
            dt = l.citiesList(Convert.ToInt32(DropDownListState.SelectedValue));

            List<System.Web.UI.WebControls.ListItem> states = new List<System.Web.UI.WebControls.ListItem>();
            DropDownListCity.Items.Clear();
            DropDownListCity.Items.Add(new ListItem("Select City", "0"));
            for (int i = 0; i < dt.Rows.Count; i++)
            {
                DropDownListCity.Items.Add(new ListItem(dt.Rows[i]["CityName"].ToString(), dt.Rows[i]["CityId"].ToString()));
            }
        }
Пример #6
0
        void locationCity(int stateId)
        {
            DataTable dt;
            Classes.Locations l = new Classes.Locations();
            dt = l.citiesList(stateId);

            List<System.Web.UI.WebControls.ListItem> states = new List<System.Web.UI.WebControls.ListItem>();
            DropDownListCity.Items.Clear();
            DropDownListCity.Items.Add(new ListItem("Select City", "0"));
            for (int i = 0; i < dt.Rows.Count; i++)
            {
                DropDownListCity.Items.Add(new ListItem(dt.Rows[i]["CityName"].ToString(), dt.Rows[i]["CityId"].ToString()));
            }
        }
Пример #7
0
        protected void DropDownListCountry_SelectedIndexChanged(object sender, EventArgs e)
        {
            DataTable dt;
            Classes.Locations l = new Classes.Locations();
            dt = l.citiesList(DropDownListCountry.SelectedValue);

            DropDownListCity.Items.Clear();
            DropDownListCity.Items.Add(new ListItem("Select City", "0"));
            for (int i = 0; i < dt.Rows.Count; i++)
            {
                DropDownListCity.Items.Add(new ListItem(dt.Rows[i]["CityName"].ToString(), dt.Rows[i]["LocationId"].ToString()));
            }
        }