Exemplo n.º 1
0
        private void fillcitydropdown(string Country_ID)
        {
            ddlAddCity.Items.Clear();
            //var resSet = masterdata.GetMasterCityData(new Guid(Country_ID));
            var result = _objMasterData.GetMasterCityData(Country_ID);

            if (Country_ID != "")
            {
                ddlAddCity.DataSource     = result;
                ddlAddCity.DataValueField = "City_Id";
                ddlAddCity.DataTextField  = "Name";
                ddlAddCity.DataBind();
                ddlAddCity.Items.Insert(0, new ListItem("--ALL--", ""));
            }
        }
        private void fillcities(Guid Country_Id)
        {
            var CityList = _objMasterSVC.GetMasterCityData(Country_Id.ToString());

            if (CityList != null)
            {
                if (CityList.Count() > 0)
                {
                    ddlCity.DataSource     = CityList;
                    ddlCity.DataTextField  = "Name";
                    ddlCity.DataValueField = "City_Id";
                    ddlCity.DataBind();
                }
            }
        }
 private void fillcitydropdown(string source, string Country_ID, DropDownList ddl)
 {
     if (source == "search")
     {
         if (Country_ID != "")
         {
             var result = _objMasterData.GetMasterCityData(Country_ID);
             ddl.DataSource     = result;
             ddl.DataValueField = "City_Id";
             ddl.DataTextField  = "Name";
             ddl.DataBind();
         }
         else
         {
             ddl.Items.Clear();
         }
         ddl.Items.Insert(0, new ListItem("---ALL---", "0"));
     }
 }