Esempio n. 1
0
        protected void btnAceptarnuevaCarga_ServerClick(object sender, EventArgs e)
        {
            try
            {
                listingredientes = lista.Traeraux();

                BindingList <Comida> pedido = lista.TraerComidas();
                id = lista.AddNewcomida(txtnewdesc.Value, float.Parse(txtnewprecio.Value));
                foreach (Item item in listingredientes)
                {
                    lista.AddNewcxi(item.Id, float.Parse(txtnewcant.Value.ToString()), id, item.tipo);
                }

                pnlCarga.Visible    = false;
                pnlCargadiv.Visible = true;
                pedido = lista.TraerComidas();

                ingredientes2.DataSource = pedido;
                ingredientes2.DataBind();
                Response.Redirect("BandejaComidas.aspx", false);
            }
            catch (Exception ex)
            {
                Console.Write(ex);
            }
        }