private void populateControls() { cmbUsername.DataSource = null; cmbUsername.ValueMember = "password"; cmbUsername.DisplayMember = "username"; cmbUsername.DataSource = APPUSERDAO.getList(); }
private void frmChangePassword_Load(object sender, EventArgs e) { cmbUsername.DataSource = null; cmbUsername.ValueMember = "password"; cmbUsername.DisplayMember = "username"; cmbUsername.DataSource = APPUSERDAO.getList(); }
//Update private void actualizarControles() { // Realizar consulta a la base de datos List <APPUSER> lista = APPUSERDAO.getList(); List <BUSINESS> list = BUSINESSDAO.getList(); List <PRODUCT> listado = PRODUCTDAO.getList(); List <APPORDER> listi = APPORDERDAO.getList(); List <ADDRESS> listo = ADDRESSDAO.getList(); // Tabla (data grid view) dvgUser.DataSource = null; dvgUser.DataSource = lista; // Menu desplegable (combo box) //txtName.DataSource = null; cmbUsername.DataSource = null; cmbUsername.ValueMember = "password"; cmbUsername.DisplayMember = "username"; cmbUsername.DataSource = lista; cmbUsernameId.DataSource = null; cmbUsernameId.ValueMember = "password"; cmbUsernameId.DisplayMember = "username"; cmbUsernameId.DataSource = lista; //cmbUsuario.ValueMember = "contrasena"; //cmbUsuario.DisplayMember = "usuario"; //cmbUsuario.DataSource = lista; // Grafico con estadisticas //poblarGrafico(); dgvBusiness.DataSource = null; dgvBusiness.DataSource = list; cmbBusiness.DataSource = null; cmbBusiness.ValueMember = "businessname"; cmbBusiness.DisplayMember = "businessname"; cmbBusiness.DataSource = list; cmbUsernameAddress.DataSource = null; cmbUsernameAddress.ValueMember = "password"; cmbUsernameAddress.DisplayMember = "username"; cmbUsernameAddress.DataSource = lista; dgvProducts.DataSource = null; dgvProducts.DataSource = listado; dgvProductsOptions.DataSource = null; dgvProductsOptions.DataSource = listado; dgvOrders.DataSource = null; dgvOrders.DataSource = listi; dgvAllOrders.DataSource = null; dgvAllOrders.DataSource = listi; dgvAddressModify.DataSource = null; dgvAddressModify.DataSource = listo; }