예제 #1
0
 private void CargarCombo()
 {
     this.ASPxComboBox1.DataSource = Ac.Regresaunatabla("Select indice, Planes from Planes");
     this.ASPxComboBox1.ValueField = "indice";
     this.ASPxComboBox1.TextField  = "Planes";
     this.ASPxComboBox1.DataBind();
 }
예제 #2
0
        public void cargarcombos()
        {
            AcesoDatos ac = new AcesoDatos();

            GridView1.DataSource = ac.Regresaunatabla("Select indice,  usuario, rol from vendedores where ifnull(status,0) != 0 ");
            GridView1.DataBind();

            GridView2.DataSource = ac.Regresaunatabla("Select * from menu ");
            GridView2.DataBind();

            GridView3.DataSource = ac.Regresaunatabla("Select * from submenu");
            GridView3.DataBind();

            GridView4.DataSource = ac.Regresaunatabla("Select * from roles");
            GridView4.DataBind();

            GridView5.DataSource = ac.Regresaunatabla("Select * from roldetalle");
            GridView5.DataBind();

            this.cboUsuario.DataSource = ac.Regresaunatabla("Select usuario, indice from vendedores where ifnull(status,0) != 0 ");
            cboUsuario.DataTextField   = "usuario";
            cboUsuario.DataValueField  = "indice";
            this.cboUsuario.DataBind();


            this.cboRol.DataSource = ac.Regresaunatabla("Select rolnombre, indice from roles");
            cboRol.DataTextField   = "rolnombre";
            cboRol.DataValueField  = "indice";
            this.cboRol.DataBind();

            this.cbMenu.DataSource = ac.Regresaunatabla("Select nombre, indice from menu");
            cbMenu.DataTextField   = "nombre";
            cbMenu.DataValueField  = "indice";
            this.cbMenu.DataBind();

            this.cbSubMenu.DataSource = ac.Regresaunatabla("Select nombre, indice from submenu");
            cbSubMenu.DataTextField   = "nombre";
            cbSubMenu.DataValueField  = "indice";
            this.cbSubMenu.DataBind();

            this.cbMenu2.DataSource = ac.Regresaunatabla("Select nombre, indice from menu");
            cbMenu2.DataTextField   = "nombre";
            cbMenu2.DataValueField  = "indice";
            this.cbMenu2.DataBind();

            this.cdRol2.DataSource = ac.Regresaunatabla("Select rolnombre, indice from roles");
            cdRol2.DataTextField   = "rolnombre";
            cdRol2.DataValueField  = "indice";
            this.cdRol2.DataBind();

            this.cmbSuMenus.DataSource = ac.Regresaunatabla("Select nombre, indice from submenu");
            cmbSuMenus.DataTextField   = "nombre";
            cmbSuMenus.DataValueField  = "indice";
            this.cmbSuMenus.DataBind();

            this.cmbRolParaSubMenu.DataSource = ac.Regresaunatabla("Select rolnombre, indice from roles");
            cmbRolParaSubMenu.DataTextField   = "rolnombre";
            cmbRolParaSubMenu.DataValueField  = "indice";
            this.cmbRolParaSubMenu.DataBind();
        }