Пример #1
0
        protected void btnBorrar_ServerClick(object sender, EventArgs e)
        {
            try
            {
                PedidosManager stock = new PedidosManager();
                stock.DelComida(int.Parse(ddlIng.SelectedValue.ToString()));
                stock.DelallCxi(int.Parse(ddlIng.SelectedValue.ToString()));
                BindingList <Comida> lista = stock.TraerComidas();
                ddlIng.DataSource = lista;

                ddlIng.DataTextField = "Descripcion";

                ddlIng.DataValueField = "Id";
                ddlIng.DataBind();
            }
            catch (Exception ex)
            {
                Console.Write(ex);
            }
        }