Created
August 1, 2017 21:59
-
-
Save jofese/e27ca2b30b52b67cbedf031fbba3eb8d to your computer and use it in GitHub Desktop.
llenar unh combobox
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void LlenarComboConvenios() | |
{ | |
//Llenar combo | |
//this.cbxConvenios.Items.Clear(); | |
this.cbxConvenios.DataSource = null; | |
cls_ConveniosDAO oConveniosDAO = new cls_ConveniosDAO(); | |
List<cls_Convenios> ListaConvenios = new List<cls_Convenios>(); | |
ListaConvenios = oConveniosDAO.ListarTodos(); | |
if (ListaConvenios.Count > 0) | |
{ | |
cbxConvenios.DisplayMember = "Convenio"; | |
cbxConvenios.ValueMember = "IdConvenio"; | |
cbxConvenios.SelectedIndex = -1; | |
cbxConvenios.DataSource = ListaConvenios; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment