private void AddDistrict_Click(object sender, EventArgs e) { var district = new StateOrDistrict(InputDistrict.Text, TableDistrict, ListState.SelectedItem.ToString()); district.Add(sqlConnection); ListDistrict.DataSource = StateOrDistrict.LoadListState(TableDistrict, ListState.SelectedItem.ToString(), sqlConnection); InputDistrict.Text = ""; }
private void AddState_Click(object sender, EventArgs e) { var state = new StateOrDistrict(InputState.Text, TableState, ListCountry.SelectedItem.ToString()); state.Add(sqlConnection); ListState.DataSource = StateOrDistrict.LoadListState(TableState, ListCountry.SelectedItem.ToString(), sqlConnection); InputState.Text = ""; }