// fetch all rows from the SOAP layer and populate the ComboBox with it // links: // docLink: http://sql2x.org/documentationLink/4ccfdfd8-9986-4cfe-8743-e0bcde887284 public void PopulateCombo() { if (!DesignMode && cboRef.DataSource == null) { CrudeAirportTypeRefServiceClient airportTypeRef = null; try { airportTypeRef = new CrudeAirportTypeRefServiceClient(); List <CrudeAirportTypeRefContract> contracts = airportTypeRef.FetchAll(); cboRef.DataSource = contracts; cboRef.DisplayMember = "AirportTypeName"; cboRef.ValueMember = "AirportTypeRcd"; } catch (Exception ex) { if (ex != null) { } } finally { if (airportTypeRef != null) { airportTypeRef.Close(); } } } }