Exemple #1
0
        protected void ArticuloDropDownList_SelectedIndexChanged(object sender, EventArgs e)
        {
            Articulos art = new Articulos();

            PrecioDropDownList.DataSource     = art.Listado("ArticuloId,Precio", "ArticuloId =" + ArticuloDropDownList.SelectedValue, "");
            PrecioDropDownList.DataTextField  = "Precio";
            PrecioDropDownList.DataValueField = "Precio";
            PrecioDropDownList.DataBind();
        }
        private void LlenarDropDownList()
        {
            MaterialDropDownList.DataSource     = material.Listado(" * ", " 1=1 ", " ");
            MaterialDropDownList.DataTextField  = "Descripcion";
            MaterialDropDownList.DataValueField = "IdMaterial";
            MaterialDropDownList.DataBind();

            PrecioDropDownList.DataSource     = material.Listado(" * ", " 1=1 ", " ");
            PrecioDropDownList.DataTextField  = "Precio";
            PrecioDropDownList.DataValueField = "IdMaterial";
            PrecioDropDownList.DataBind();
        }