Ejemplo n.º 1
0
 private void LISTAR_EMPRESA()
 {
     CBOEMPRESA.DataSource     = OBJLOGUEO.LISTAR_EMPRESA();
     CBOEMPRESA.DataValueField = "ID_EMPRESA";
     CBOEMPRESA.DataTextField  = "DESCRIPCION";
     CBOEMPRESA.DataBind();
 }
        void llenar_combo_empresa()
        {
            List <E_COMBO> List = new List <E_COMBO>();

            List.Add(new E_COMBO {
                valor = Session["ID_EMPRESA"].ToString(), nombre = Session["NOMBRE_EMPRESA"].ToString()
            });

            CBOEMPRESA.DataSource     = List;
            CBOEMPRESA.DataTextField  = "nombre";
            CBOEMPRESA.DataValueField = "valor";
            CBOEMPRESA.SelectedIndex  = 0;
            CBOEMPRESA.DataBind();
        }