private void ComboBoxUpdateCounty_DropDown(object sender, EventArgs e)
        {
            BLCounty bLCounty = new BLCounty();
            BindingList <CountyModel> lista = new BindingList <CountyModel>();

            lista = bLCounty.CountyList();
            var source = new BindingSource(lista, null);

            comboBoxUpdateCounty.ValueMember   = "CountyId";
            comboBoxUpdateCounty.DisplayMember = "CountyName";
            comboBoxUpdateCounty.DataSource    = source;
            comboBoxUpdateCity.Enabled         = false;
        }
Beispiel #2
0
        private void AddAddressForm_Load(object sender, EventArgs e)
        {
            BLCounty  bLCounty = new BLCounty();
            DataTable dt       = new DataTable();
            BindingList <CountyModel> lista = new BindingList <CountyModel>();

            lista = bLCounty.CountyList();
            var source = new BindingSource(lista, null);

            DACountyGet getCounties      = new DACountyGet();
            DataTable   getCountiesTable = getCounties.getCounty();

            comboBoxCounty.ValueMember   = "CountyId";
            comboBoxCounty.DisplayMember = "CountyName";
            comboBoxCounty.DataSource    = source;
            comboBoxGetCity.Enabled      = false;
        }