//----------------------------------------------- #endregion #region ---------------LoadCountries--------------- //----------------------------------------------- //LoadCountries //----------------------------------------------- protected void LoadCountries() { List <SystemCountriesEntity> countriesList = SystemCountriesFactory.GetAll(); string DataTextField = "country_ar"; Languages lang = SiteSettings.GetCurrentLanguage(); if (lang != Languages.Ar) { DataTextField = "country"; } if (countriesList != null && countriesList.Count > 0) { ddlSenderCountry.DataSource = countriesList; ddlSenderCountry.DataTextField = DataTextField; ddlSenderCountry.DataValueField = "id"; ddlSenderCountry.DataBind(); ddlSenderCountry.Items.Insert(0, new ListItem(Resources.User.Choose, "-1")); ddlSenderCountry.SelectedValue = SiteSettings.Admininstration_SiteDefaultCountryID.ToString(); ddlSenderCountry.Enabled = true; } else { ddlSenderCountry.Items.Clear(); ddlSenderCountry.Items.Insert(0, new ListItem(Resources.User.NoData, "-1")); ddlSenderCountry.Enabled = false; } }
//----------------------------------------------- //LoadCountries //----------------------------------------------- protected void LoadCountries() { List <SystemCountriesEntity> countriesList = SystemCountriesFactory.GetAll(); string DataTextField = "country_ar"; //Languages lang = SiteSettings.GetCurrentLanguage(); //if (lang != Languages.Ar) // DataTextField = "country"; OurDropDownList.LoadDropDownList(countriesList, ddlCountries, DataTextField, "id", true); }
//----------------------------------------------- #endregion #region --------------Load_ddlSystemCountries()-------------- //--------------------------------------------------------- //Load_ddlSystemCountries //--------------------------------------------------------- protected void Load_ddlSystemCountries() { List <SystemCountriesEntity> SystemCountriesList = SystemCountriesFactory.GetAll(); if (SystemCountriesList != null && SystemCountriesList.Count > 0) { ddlSystemCountries.DataSource = SystemCountriesList; ddlSystemCountries.DataTextField = "country_ar"; ddlSystemCountries.DataValueField = "id"; ddlSystemCountries.DataBind(); // ddlSystemCountries.Items.Insert(0, new ListItem(Resources.AdminText.Choose, "-1")); ddlSystemCountries.Enabled = true; } else { ddlSystemCountries.Items.Clear(); ddlSystemCountries.Items.Insert(0, new ListItem(Resources.AdminText.ThereIsNoData, "-1")); ddlSystemCountries.Enabled = false; } }