private void GetValidLocation() { LocationCombo.Clear(); var reader = SqlUtils.ExecuteQueryReader("select * from valid_location", false); while (reader.Read()) { LocationCombo.AddItem(reader["location"].ToString()); } }
public void Initializer() { // Fields: LocationCombo , PaymentCombo List <string> locations = FetchValidLocation(); List <string> payments = FetchValidPayment(); PaymentCombo.Clear(); LocationCombo.Clear(); foreach (var location in locations) { LocationCombo.AddItem(location); } foreach (var payment in payments) { PaymentCombo.AddItem(payment); } }