private void frmPrincipal_Load(object sender, EventArgs e) { cmbUsuarios.DataSource = null; cmbUsuarios.ValueMember = "idUser"; cmbUsuarios.DisplayMember = "username"; cmbUsuarios.DataSource = AppUserDAO.GetLista(); cmbNegociosProd.DataSource = null; cmbNegociosProd.ValueMember = "idBusiness"; cmbNegociosProd.DisplayMember = "name"; cmbNegociosProd.DataSource = BusinessDAO.GetLista(); cmbNegocios.DataSource = null; cmbNegocios.ValueMember = "idBusiness"; cmbNegocios.DisplayMember = "name"; cmbNegocios.DataSource = BusinessDAO.GetLista(); cmbProds.DataSource = null; cmbProds.ValueMember = "idProduct"; cmbProds.DisplayMember = "name"; cmbProds.DataSource = ProducDAO.GetProdsNeg(); dgUsuarios.DataSource = null; dgUsuarios.DataSource = AppUserDAO.GetLista(); dgNegocios.DataSource = null; dgNegocios.DataSource = BusinessDAO.GetLista(); }
void actualizarDatos() { cmbUsuarios.DataSource = AppUserDAO.GetLista(); dgUsuarios.DataSource = AppUserDAO.GetLista(); cmbNegociosProd.DataSource = BusinessDAO.GetLista(); dgNegocios.DataSource = BusinessDAO.GetLista(); cmbNegocios.DataSource = BusinessDAO.GetLista(); dgOrdenes.DataSource = AppOrderDAO.GetLista(); cmbProds.DataSource = ProducDAO.GetProdsNeg(); }