예제 #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            CountryCityManager countryCityManager = new CountryCityManager();

            viewCountryGridView.DataSource = countryCityManager.ShowCountryCity();
            viewCountryGridView.DataBind();
        }
예제 #2
0
        protected void Button1_Click(object sender, EventArgs e)
        {
            CountryCityManager countryCityManager = new CountryCityManager();

            viewCountryGridView.DataSource = countryCityManager.ShowCountryByName(countrySearchTextBox.Text);
            viewCountryGridView.DataBind();
            Clear();
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            CountryCityManager countryCityManager = new CountryCityManager();

            countryCityGridView.DataSource = countryCityManager.ShowCountryCity();
            countryCityGridView.DataBind();

            if (!IsPostBack)
            {
                countryDropDownList.DataTextField  = "CountryName";
                countryDropDownList.DataValueField = "CountryName";
                countryDropDownList.DataSource     = countryCityManager.ShowCountry();
                countryDropDownList.DataBind();
            }
        }
        protected void countryCityButton_Click(object sender, EventArgs e)
        {
            CountryCityManager countryCityManager = new CountryCityManager();

            if (cityRadioButton.Checked)
            {
                countryCityGridView.DataSource = countryCityManager.ShowCountryCityByCityName(citySearchTextBox.Text);
                countryCityGridView.DataBind();
            }
            if (countryRadioButton.Checked)
            {
                // countryCityGridView.DataSource = countryCityManager.ShowCountryCityByCityName(countryDropDownList.SelectedValue);
                countryCityGridView.DataSource =
                    countryCityManager.ShowCountryCityByCountryName(countryDropDownList.SelectedValue);
                countryCityGridView.DataBind();
            }
        }