private void cbxSection_SelectedIndexChanged(object sender, EventArgs e) { LocationProvider.LocationProvider locprov = new OpenHBC.LocationProvider.LocationProvider(); string selected = cbxSection.SelectedItem.ToString(); string[][] compounds = locprov.GetCompounds(selected); cbxCompound.Items.Clear(); if (compounds != null) { foreach (string[] s in compounds) { cbxCompound.Items.Add(s[1]); } } //cbxSection.Items.AddRange(strDistricts); cbxCompound.Enabled = true; }
private void cbxParish_SelectedIndexChanged(object sender, EventArgs e) { LocationProvider.LocationProvider locprov = new OpenHBC.LocationProvider.LocationProvider(); string selected = ""; if (cbxParish.SelectedIndex != -1) { selected = cbxParish.SelectedItem.ToString(); } string[][] strDistricts = locprov.GetSections(selected); cbxSection.Items.Clear(); if (strDistricts != null) { foreach (string[] s in strDistricts) { cbxSection.Items.Add(s[1]); } } //cbxSection.Items.AddRange(strDistricts); cbxSection.Enabled = true; }