Ejemplo n.º 1
0
        protected void LlenaCombo()
        {
            ViewState["Combos"] = new Combos();
            RepositorioBase <Productos> repositorioBase = new RepositorioBase <Productos>();

            ProductoIdDropDownList.DataSource     = repositorioBase.GetList(t => true);
            ProductoIdDropDownList.DataValueField = "ProductoId";
            ProductoIdDropDownList.DataTextField  = "NombreProducto";
            ProductoIdDropDownList.DataBind();
        }
Ejemplo n.º 2
0
        private void LlenaDropDown()
        {
            RepositorioBase <Productos> repositorio = new RepositorioBase <Productos>();

            ProductoIdDropDownList.DataSource           = repositorio.GetList(p => true);
            ProductoIdDropDownList.DataValueField       = "ProductoId";
            ProductoIdDropDownList.DataTextField        = "Nombre";
            ProductoIdDropDownList.AppendDataBoundItems = true;
            ProductoIdDropDownList.DataBind();
        }