Populating a Winforms ComboBox with csharp
private void PoblarComboPais()
{
// Trae las sociedades correspondientes al país
Cursor.Current = Cursors.WaitCursor;
// Conexión
string cn = SqlOptions.ConnectionString();
// DataReader
this.cboPais.DataSource = SqlHelper.ExecuteDataset(cn,CommandType.Text , "SELECT * FROM MAE_PAIS").Tables[0];
this.cboPais.ValueMember = "chrPais";
this.cboPais.DisplayMember = "chrPaisNombre";
//Puntero del mouse normal
Cursor.Current = Cursors.Default;
}
{
// Trae las sociedades correspondientes al país
Cursor.Current = Cursors.WaitCursor;
// Conexión
string cn = SqlOptions.ConnectionString();
// DataReader
this.cboPais.DataSource = SqlHelper.ExecuteDataset(cn,CommandType.Text , "SELECT * FROM MAE_PAIS").Tables[0];
this.cboPais.ValueMember = "chrPais";
this.cboPais.DisplayMember = "chrPaisNombre";
//Puntero del mouse normal
Cursor.Current = Cursors.Default;
}