private void LoadCountryComboBox()
        {
            List <Country> country = countryManager.GetAllCountrys();

            countryDropDownList.DataSource     = country;
            countryDropDownList.DataTextField  = "CountryName";
            countryDropDownList.DataValueField = "Id";
            countryDropDownList.DataBind();
        }
        private void LoadCountryComboBox()
        {
            List <Country> country = countryManager.GetAllCountrys();
            //if (country == null)
            //{
            //    country = new List<Country>();
            //}
            Country dcountry = new Country();

            dcountry.Id          = -1;
            dcountry.CountryName = "Select..";
            country.Insert(0, dcountry);



            CountryDropDownList.DataSource = country;

            CountryDropDownList.DataTextField  = "CountryName";
            CountryDropDownList.DataValueField = "CountryName";
            CountryDropDownList.DataBind();
        }
예제 #3
0
 public IActionResult Index()
 {
     return(View(countryManager.GetAllCountrys()));
 }
 public void GetShowAllCountry()
 {
     countrysGridView.DataSource = countryManager.GetAllCountrys();
     countrysGridView.DataBind();
 }